diff --git a/dottes.html.header b/dottes.html similarity index 92% rename from dottes.html.header rename to dottes.html index 20fa3de..57c136c 100644 --- a/dottes.html.header +++ b/dottes.html @@ -21,6 +21,7 @@

@SUBTITLE@

+

@INTRO@

You can download a PDF with a booklet of these tunes. There is an A5 landscape book with one @@ -40,3 +41,9 @@

The tunes

+ +
+
+
+ + diff --git a/dottes.html.footer b/dottes.html.footer deleted file mode 100644 index 2f323c1..0000000 --- a/dottes.html.footer +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/makeWeb.sh b/makeWeb.sh index b96d017..9849d21 100755 --- a/makeWeb.sh +++ b/makeWeb.sh @@ -24,6 +24,7 @@ bookedir=$dir/$1 webdir=$dir/web/$1 graphicsdir=$dir/graphics/$1 output=index.html +tunelist=tunelist.html booke=$1 masterbooke=$2 title=$booke @@ -37,9 +38,6 @@ intro= if [ -r $bookedir/subtitle.txt ]; then subtitle=`cat $bookedir/subtitle.txt` fi -if [ -r $bookedir/intro.txt ]; then - intro=`txt2tags --no-headers --target=html --outfile=- $bookedir/intro.txt` -fi if [ -n "$instrument" ]; then title="${title} ($instrument)" @@ -49,8 +47,20 @@ fi mkdir -p $webdir sed -e "s/@BUILD@/$buildno/" -e "s/@SUBTITLE@/$subtitle/" \ - -e "s/@TITLE@/$title/" -e "s/@INTRO@/$intro/" \ - -e "s/@BOOK@/$booke/" dottes.html.header > $webdir/$output + -e "s/@TITLE@/$title/" -e "s/@BOOK@/$booke/" dottes.html > $webdir/$output + +# Mark output as executable so it is scanned for server-side includes. +chmod +x $webdir/$output + +for item in intro +do + rm -f $webdir/$item.html + if [ -r $booke/$item.txt ]; then + txt2tags --no-headers --target=html --outfile=$webdir/$item.html $booke/$item.txt + else + touch $webdir/$item.html + fi +done # Copy in the book PDFs. Like the graphics, Midi etc. these are assumed # to be already generated. @@ -103,7 +113,5 @@ find $bookedir -name "*.abc" | sort | -e "s/@TUNE@/${name}/" dottes.html.tune > $webdir/$tunepage sed -e "s/@TITLE@/${title//&/\&}/" \ - -e "s/@TUNE@/${name}/" dottes.html.tuneindex >> $webdir/$output + -e "s/@TUNE@/${name}/" dottes.html.tuneindex >> $webdir/$tunelist done - -cat dottes.html.footer >> $webdir/$output