diff makeWeb.sh @ 533:36d43edbd3f5

Correct web generation. 1. Subtitle and composer to be HTML not Latex. 2. Fix escaping of & in sed patterns.
author Jim Hague <jim.hague@acm.org>
date Sun, 13 Dec 2015 17:50:23 +0000
parents 4cc739fe13ab
children 760d0ae5acea
line wrap: on
line diff
--- a/makeWeb.sh	Sat Dec 12 22:33:41 2015 +0000
+++ b/makeWeb.sh	Sun Dec 13 17:50:23 2015 +0000
@@ -108,10 +108,10 @@
         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 @@
 
         # 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 @@
             -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 @@
             -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