EmacsMuseMode |
Muse is a tool for easily authoring and publishing documents. It allows for rapid prototyping of hyperlinked text, which may then be exported to multiple output formats — such as HTML, LaTeX, Texinfo, etc.
Muse is the next stage in emacs-wiki's evolution. I have decided to focus on the authoring/publishing aspect, and to move the Wikiness to a separate (and optional) module. This is based on my own needs, as I have been maintaining my website (http://www.newartisans.com/johnw) using emacs-wiki for some time, and wanted more flexibility in terms of output.
The intent is for Muse to make it trivial to write documents that can be published into multiple formats. Of course, this is not a new idea, just that Muse is tailored to Emacs users.
I currently have just under 1500 pages in my 'Public' project (the project from which this site is published). I've been slowing publishing a few pages at a time. Until I get them all published, I don't want to use muse-publish-project. I whipped up a quick and simple shell script to find .muse files that have changed since the .html file was last built, and then call emacsclient to call muse-publish-file. Calling lisp from emacsclient in a shell script is one of my favorite tricks. You need a recent version of emacsclient to use the "-e" flag.
#!/bin/bash # path to emacsclient - i use carbon emacs for OSX emacsclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient" musedir="/Users/wu/Muse/Public" htmldir="$musedir/html" remote="server:/path/to/muse/webdir/" cd $htmldir for file in *.html do basename=${file%%.html} #if true if [ ../$basename.muse -nt $basename.html ] then echo Publishing: $basename $emacsclient -e "$command (muse-publish-file \"$musedir/$basename.muse\" \"xhtml\" \"$htmldir\" t)" || ( echo "Error publishing file $basename" && exit 1 ) sleep 1; fi done echo echo rsync -ravuz --delete --exclude '.svn/' $htmldir/ $remote