From 2edd15e2d6255c5376e984e240c592749c563fca Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Sun, 4 Mar 2012 12:39:12 +0000 Subject: [PATCH] First go at producing a very simple website. Templating done with sed, and minimal HTML. --- .hgignore | 1 + Session/intro.txt | 3 +-- dottes.html.footer | 3 +++ dottes.html.header | 12 ++++++++++ makeWeb.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++ makeWebItems.sh | 32 +++++++++++++++++++++++++ web/buzzard.jpg | Bin 0 -> 2141 bytes web/index.html | 16 +++++++++++++ 8 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 dottes.html.footer create mode 100644 dottes.html.header create mode 100755 makeWeb.sh create mode 100755 makeWebItems.sh create mode 100644 web/buzzard.jpg create mode 100644 web/index.html 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 0000000000000000000000000000000000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wRHW=| zeP+ARd5~w*&p%5GO>4=NZ;%@Ubs87OnQ1^-th?u?1>CCIL<9Wn*mlN5`q>~36W{l} zbXVi+ZC^whwQs+9rQ0TE)g5D|=cM=Yvs7T}%!b^Oc7L}QT`8pd!?oCso1J+4^Kj`G zgMDud7^x;^uP{p1P>o2ze)I7$!Lz8a+A9PD)HrJkGiBE%=ydn_GQsFAyunLqO1ph; ztyjUS)TXr81aG`xjs%wi5`Yq4#7U|0f>WWUpE5dhUqx`nUVhg>LY=!Ne91E_q7mjh zy5J#aZ8XlBT>eeqqOFR#fG2w%aT9OiT#_=k7&GdwifXD!z^AK~9i(@j)1qdNW(`X@ z&i0$L6z-3#> z8?N4)oY}zSSR1z0R`xy!zUkxI-SotdXCfIrApBD9nDz`k3afAmEv0JMUwCzDgkM(1 z#L#d`F`ZXvYkkAqIk(Xrz~C#HwFhRyo-1G8N?-olo8i5L>`mWCM9j)yiF~kKTn)Jj zK|)cOueHEsbC)2Rnh;(Qr?NA1yQa&Nj{h;{6S<^i&bH>~HBT`tTXZt^)wE+#!bQNq zEA7Xpv%}jmCVGqRwm+FzIpk`HYwNUFzT}gFdHB`vn%{e4q30E^|KPA>PpcEtfmd%} hJe!TFjAHI^Wd!w3HahFE@DWvr{n;J=X*Jt<_YXNot5yI2 literal 0 HcmV?d00001 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