Mercurial > dottes
diff makeWebItems.sh @ 43:d92717f8130c
First go at producing a very simple website.
Templating done with sed, and minimal HTML.
author | Jim Hague <jim.hague@laicatc.com> |
---|---|
date | Sun, 04 Mar 2012 12:39:12 +0000 |
parents | |
children | 6f4667d1372d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makeWebItems.sh Sun Mar 04 12:39:12 2012 +0000 @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Make items required for the website but not for the book. +# They go into web/<book>. +# + +if [ $# != 1 ]; then + echo "Usage: makeWebItems.sh <book dir name>" + exit 1 +fi + +dir=`pwd` + +booke=$dir/$1 +builddir=$dir/web/$1 +graphicsdir=$dir/graphics/$1 + +mkdir -p $builddir + +# Now, for each tune, make the tune JPG and sound. +find $booke -name "*.abc" | sort | + while read filename + do + name=`basename $filename .abc` + convert $graphicsdir/${name}.eps $builddir/${name}.jpg + + abc2midi $filename -o $builddir/${name}.mid + timidity -Ow -o $builddir/${name}.wav $builddir/${name}.mid + lame --quiet $builddir/${name}.wav $builddir/${name}.mp3 + rm $builddir/${name}.wav + done +