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:

Apache
Perl
HTML::Mason
Ghostscript
abcm2ps
abc2midi

and assumes a Unixy environment.


abc-fakebook-0.11.tar.gz Mon Oct 9 23:24:42 2006 Changes.txt
abc-fakebook-0.09.tar.gz Sun Feb 6 21:47:53 2005 Changes.txt
abc-fakebook-0.08.tar.gz Sun Feb 6 00:13:24 2005 Changes.txt
abc-fakebook-0.06.tar.gz Sun Feb 6 00:13:24 2005 Changes.txt
abc-fakebook-0.05.tar.gz Sun Feb 6 00:13:24 2005 Changes.txt
abc-fakebook-0.04.tar.gz Sun Feb 6 00:13:24 2005 Changes.txt
abc-fakebook-0.03.tar.gz Sun Feb 6 00:13:24 2005 Changes.txt
abc-fakebook-0.02.tar.gz Sun Feb 6 00:13:24 2005 Changes.txt
abc-fakebook-0.01.tar.gz Sun Feb 6 00:13:24 2005 Changes.txt


The site is set up like this:

	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:
    | abcm2ps - -O- 2>/dev/null | gs -sDEVICE=jpeg -sOutputFile=$tempfilename -q - -c quit 

midi:
    | abc2midi - -o $tempdir/output.mid

pdf:
    | abcm2ps - -O- 2>/dev/null | gs -sDEVICE=pdfwrite -sOutputFile=$tempfilename -q - -c quit