%#THIS FILE IS NOT PART OF MAKE DIST OR MAKE INSTALL %#make siteupdate copies it to /home/httpd/html/mason/abc-fakebook/index.html The package that creates the ABC tunes site is called ABC-Fakebook, and can be used to manage a gallery of ABC tunes. It requires:
and assumes a Unixy environment.
autohandler config index.html abc-src/ *.abc (the source abc files) abc/ dhandler pdf/ dhandler jpg/ dhandler midi/ dhandler
To add new .abc files, just drop them into the abc-src/ directory, everything else takes care of itself.
Requests to urls for abc/, pdf/, jpg/ or midi/ are handled by the dhandler in that directory which takes care of generating the requested file and caching it for future use.
The output is generated using subshells and temp files. I'd rather use pipes than tempfiles but not all the utilities are fully pipeable, and I wasn't able to find a good solution using two-way pipes and/or forking under mod_perl. I'm open to suggestions.
If you're curious, the commands used to generate the output looks like this:
jpg: | jcabc2ps 2>/dev/null | gs -sDEVICE=jpeg -sOutputFile=$tempfilename -q - -c quit midi: | abc2midi - -o $tempdir/output.mid pdf: | jcabc2ps 2>/dev/null | gs -sDEVICE=pdfwrite -sOutputFile=$tempfilename -q - -c quit abc: (transpose) abc2abc $path-to-file.abc -b -t $t |