From 7befd21cf44756bce0c12978380d22c33446b92e Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Wed, 21 Aug 2013 10:21:19 +0100 Subject: [PATCH 1/3] Change wording to say some tunes MAY have an identifiable author. There's a chance that a book will have no tunes with an identifiable author. --- dottes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dottes.tex b/dottes.tex index 1901a60..9cbd2af 100644 --- a/dottes.tex +++ b/dottes.tex @@ -191,7 +191,7 @@ in any way \emph{correct}. This is just how we go about them. The majority of tunes in this book have no identifiable author, and are unquestionably in the public domain. Rather than litter the pages with \emph{Trad.} or \emph{Anon.}, I have left them unattributed. -Some, however, have an identifiable author or arranger and copyright +Some, however, may have an identifiable author or arranger and copyright unquestionably remains with that person. I believe these tunes to enjoy widespread currency on the folk music scene, and therefore there is at least tacit approval by the authors for their dissemination. From ed0ef9ce66d0401a74a765fa56fe0d92e712de85 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Wed, 21 Aug 2013 10:28:10 +0100 Subject: [PATCH 2/3] Use txt2tags to format intro text. That way we can include basic markup in the into text and use it in both LaTeX and HTML. Take advantage of this to expand the wording of the intro text in all books. --- Library/intro.txt | 9 ++++++++- Morris/intro.txt | 8 +++++++- Session/intro.txt | 14 +++++++++++++- dottes.tex | 2 +- makeBooke.sh | 11 ++++++++++- makeWeb.sh | 2 +- 6 files changed, 40 insertions(+), 6 deletions(-) diff --git a/Library/intro.txt b/Library/intro.txt index c5c2373..906e0eb 100644 --- a/Library/intro.txt +++ b/Library/intro.txt @@ -1 +1,8 @@ -This book is for tunes that may not be part of the regular Havoc session or dance repertoire, but which I want to try over. +This is a txt2tags input file. +The first 3 lines are headers, and are ignored. + +This book is for tunes that are not part of the regular +Havoc session or dance repertoire. + +Typically these tunes have either fallen out of popularity at sessions, +or are simply tunes that I like. diff --git a/Morris/intro.txt b/Morris/intro.txt index 7fada5d..832aa80 100644 --- a/Morris/intro.txt +++ b/Morris/intro.txt @@ -1 +1,7 @@ -This book provides the dots for all dance tunes commonly performed by Cry Havoc. +This is a txt2tags input file. +The first 3 lines are headers, and are ignored. + +This book provides the dots for the music to all the dances +performed by Cry Havoc. The name of the dance is given as the tune title. +If the name of the tune differs from the name of the dance, the tune +name is given in the subtitle. diff --git a/Session/intro.txt b/Session/intro.txt index ecd7c11..65aac71 100644 --- a/Session/intro.txt +++ b/Session/intro.txt @@ -1 +1,13 @@ -This book provides the dots for all tunes commonly played at Cry Havoc music sessions. +This is a txt2tags input file. +The first 3 lines are headers, and are ignored. + +This book provides the dots for the tunes commonly played at Cry Havoc +music sessions. + +The set of tunes played at sessions does tend to vary over time. Some +tunes are perennial favourites and so are included here automatically. +Others are less regular, and so their inclusion is to some extent a +personal choice. I aim to only include tunes that I remember hearing at +a session in the not too distant past, but nobody keeps a detailed log +of what gets played, so the choice is imprecise. And may well be influenced +by personal preference. diff --git a/dottes.tex b/dottes.tex index 9cbd2af..c3c4486 100644 --- a/dottes.tex +++ b/dottes.tex @@ -181,7 +181,7 @@ Havoc musicians come in all shades of experience and ability. This collection is intended to help those like me who are inexpert with instrument and folk music generally, but have a little musical background. -\input{intro.txt} +\input{intro.tex} Being folk tunes, many of the tunes herein have many variations. The music presented here is my attempt at reflecting what the musicians diff --git a/makeBooke.sh b/makeBooke.sh index 476d442..2dcb9b7 100755 --- a/makeBooke.sh +++ b/makeBooke.sh @@ -25,7 +25,7 @@ mkdir -p $builddir cp dottes.tex $builddir cp buildno.txt $builddir cp buzzard.pdf $builddir -for item in title subtitle intro instrument +for item in title subtitle instrument do rm -f $builddir/$item.txt if [ -r $booke/$item.txt ]; then @@ -34,6 +34,15 @@ do touch $builddir/$item.txt fi done +for item in intro +do + rm -f $builddir/$item.tex + if [ -r $booke/$item.txt ]; then + txt2tags --no-headers --target=tex --outfile=$builddir/$item.tex $booke/$item.txt + else + touch $builddir/$item.tex + fi +done for filename in $dir/*.${papersize}.tex do diff --git a/makeWeb.sh b/makeWeb.sh index 7b1a072..b96d017 100755 --- a/makeWeb.sh +++ b/makeWeb.sh @@ -38,7 +38,7 @@ if [ -r $bookedir/subtitle.txt ]; then subtitle=`cat $bookedir/subtitle.txt` fi if [ -r $bookedir/intro.txt ]; then - intro=`cat $bookedir/intro.txt` + intro=`txt2tags --no-headers --target=html --outfile=- $bookedir/intro.txt` fi if [ -n "$instrument" ]; then From 8766830f70f847569608a181e2fad9c97a8389a2 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Wed, 21 Aug 2013 10:32:50 +0100 Subject: [PATCH 3/3] Use server-side includes (with Apache XBitHack setting) in web. This means that we can have one main web page, dottes.html, for each book and include the intro and tunelist to make the page. This removes the separate header and footer components. Perhaps we should use a template engine instead to generate the output. That means choosing one. And preferably one that isn't aimed only at HTML so we could use it for the printed books. More research required. --- dottes.html.header => dottes.html | 7 +++++++ dottes.html.footer | 4 ---- makeWeb.sh | 24 ++++++++++++++++-------- 3 files changed, 23 insertions(+), 12 deletions(-) rename dottes.html.header => dottes.html (92%) delete mode 100644 dottes.html.footer 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