diff --git a/.hgignore b/.hgignore index db1efc0..268d89f 100644 --- a/.hgignore +++ b/.hgignore @@ -9,3 +9,4 @@ syntax: glob syntax: regexp build/ graphics/ +web/Session/ diff --git a/Session/intro.txt b/Session/intro.txt index 3b148b0..ecd7c11 100644 --- a/Session/intro.txt +++ b/Session/intro.txt @@ -1,2 +1 @@ -This book provides the dots for all tunes commonly played at Cry Havoc music -sessions. +This book provides the dots for all tunes commonly played at Cry Havoc music sessions. diff --git a/dottes.html.footer b/dottes.html.footer new file mode 100644 index 0000000..81d8c88 --- /dev/null +++ b/dottes.html.footer @@ -0,0 +1,3 @@ + + + diff --git a/dottes.html.header b/dottes.html.header new file mode 100644 index 0000000..4282700 --- /dev/null +++ b/dottes.html.header @@ -0,0 +1,12 @@ + + +Cry Havoc tunes - @BOOK@ + + +

@SUBTITLE@

+

+@INTRO@ +

+Issue @BUILD@ +

+ diff --git a/makeWeb.sh b/makeWeb.sh new file mode 100755 index 0000000..bcd4bde --- /dev/null +++ b/makeWeb.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# +# Build the website. The common items and the web items are assumed +# to be already built. +# + +if [ $# != 1 ]; then + echo "Usage: makeWeb.sh " + exit 1 +fi + +dir=`pwd` + +booke=$dir/$1 +webdir=$dir/web/$1 +graphicsdir=$dir/graphics/$1 +output=index.html + +buildno=`cat buildno.txt` +subtitle= +intro= +if [ -r $booke/subtitle.txt ]; then + subtitle=`cat $booke/subtitle.txt` +fi +if [ -r $booke/intro.txt ]; then + intro=`cat $booke/intro.txt` +fi + +mkdir -p $webdir + +sed -e "s/@BUILD@/$buildno/" -e "s/@SUBTITLE@/$subtitle/" \ + -e "s/@INTRO@/$intro/" -e "s/@BOOK@/$1/" dottes.html.header > $webdir/$output + +# Now, for each tune, make the tune graphic and sound. +find $booke -name "*.abc" | sort | + while read filename + do + title=`grep "^T:" $filename | head -1 | sed -e "s/^T: *//"` + name=`basename $filename .abc` + + # Copy tune PDF from common graphics. + cp $graphicsdir/${name}.pdf $webdir + + # And copy the ABC. + cp $filename $webdir + + echo "" >> $webdir/$output + echo "" >> $webdir/$output + echo "" >> $webdir/$output + echo "" >> $webdir/$output + echo "" >> $webdir/$output + echo "" >> $webdir/$output + echo "" >> $webdir/$output + echo "" >> $webdir/$output + done + +cat dottes.html.footer >> $webdir/$output diff --git a/makeWebItems.sh b/makeWebItems.sh new file mode 100755 index 0000000..803f3f0 --- /dev/null +++ b/makeWebItems.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Make items required for the website but not for the book. +# They go into web/. +# + +if [ $# != 1 ]; then + echo "Usage: makeWebItems.sh " + 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 + diff --git a/web/buzzard.jpg b/web/buzzard.jpg new file mode 100644 index 0000000..ad202c9 Binary files /dev/null and b/web/buzzard.jpg differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..35f0c84 --- /dev/null +++ b/web/index.html @@ -0,0 +1,16 @@ + + +Ye Crie Havock Booke of Dottes + + +

Ye Crie Havock Booke of Dottes

+

+

+Buzzard logo +
+

+The music of Cry Havoc, a reference. +

+Sessions + +

${title}JPGPDFMIDIMP3ABC