From 14cc350ffb6060d44d7ab86bf26ca83bac459633 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Sun, 13 Dec 2015 17:50:23 +0000 Subject: [PATCH] Correct web generation. 1. Subtitle and composer to be HTML not Latex. 2. Fix escaping of & in sed patterns. --- Library/Mourisque.abc | 14 ++++++++++++++ makeWeb.sh | 14 +++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 Library/Mourisque.abc diff --git a/Library/Mourisque.abc b/Library/Mourisque.abc new file mode 100644 index 0000000..a087d07 --- /dev/null +++ b/Library/Mourisque.abc @@ -0,0 +1,14 @@ +X:1 +T:La Mourisque +T:La Basse danse 5 +R:March +C:Tielman Susato 1551 +O:Flemish +N:Credit: Paul Hardy's Session Tunebook +Z:Paul Hardy's Session Tunebook 2014 (see www.paulhardy.net). Creative Commons cc by-nc-sa licenced. +M:4/4 +L:1/4 +Q:1/4=180 +K:G +"G"B/ c/ d d e|d3 c|B G "Em"G A|"Am7"F>E "D"D2|"G"B/ c/ d d e|d3 c|B/A/ "D"G A F|"G"G3 A:| +|:"G"B G G A|B G "C"c A|"G"B G "Em"G A|"Am"F>E "D7"D2|"G"B G G A|B G "C"c A|"G"B/A/ "D"G A F|"G"G4:| diff --git a/makeWeb.sh b/makeWeb.sh index 01759e7..40d5a76 100755 --- a/makeWeb.sh +++ b/makeWeb.sh @@ -108,10 +108,10 @@ find $bookedir -name "*.abc" | sort | title=`$dir/abcfield.py --field T --html $filename` fixtitle "$title" title=$retval - subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` + subtitle=`$dir/abcfield.py --index 2 --field T --html $filename` fixtitle "$subtitle" subtitle=$retval - composer=`$dir/abcfield.py --field C --latex $filename` + composer=`$dir/abcfield.py --field C --html $filename` changefile=`$dir/abcfield.py --field N --contains "Change:" $filename | sed -e "s/Change: *//"` changetitle="" changevisibility="no" @@ -154,12 +154,12 @@ find $bookedir -name "*.abc" | sort | # If the title contains HTML character entities, escape # initial '&' in the title - it means things to sed. - sed -e "s/@TITLE@/${title//&/\&}/" \ + sed -e "s/@TITLE@/${title//&/\\&}/" \ -e "s/@SUBTITLE@/${subtitle}/" \ -e "s/@COMPOSER@/${composer}/" \ -e "s/@KEY@/${key}/" \ -e "s/@MASTERBOOKE@/${masterbooke}/" \ - -e "s/@CHANGETITLE@/${changetitle//&/\&}/" \ + -e "s/@CHANGETITLE@/${changetitle//&/\\&}/" \ -e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \ -e "s/@CHANGEVISIBILITY@/${changevisibility}/" \ -e "s/@CREDIT@/${credit}/" \ @@ -167,12 +167,12 @@ find $bookedir -name "*.abc" | sort | -e "s/@LASTCHANGED@/${lastchanged}/" \ -e "s/@TUNE@/${name}/" dottes.html.tune > $webdir/$tunepage - sed -e "s/@TITLE@/${title//&/\&}/" \ + sed -e "s/@TITLE@/${title//&/\\&}/" \ -e "s/@SUBTITLE@/${subtitle}/" \ -e "s/@COMPOSER@/${composer}/" \ -e "s/@KEY@/${key}/" \ -e "s/@MASTERBOOKE@/${masterbooke}/" \ - -e "s/@CHANGETITLE@/${changetitle//&/\&}/" \ + -e "s/@CHANGETITLE@/${changetitle//&/\\&}/" \ -e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \ -e "s/@CHANGEVISIBILITY@/${changevisibility}/" \ -e "s/@CREDIT@/${credit}/" \ @@ -180,6 +180,6 @@ find $bookedir -name "*.abc" | sort | -e "s/@LASTCHANGED@/${lastchanged}/" \ -e "s/@TUNE@/${name}/" dottes.html.learnertune > $webdir/$learnerpage - sed -e "s/@TITLE@/${title//&/\&}/" \ + sed -e "s/@TITLE@/${title//&/\\&}/" \ -e "s/@TUNE@/${name}/" dottes.html.tuneindex >> $webdir/$tunelist done