diff makeBookeTunePages.sh @ 586:daa3b76bd11f

More abcfield.py updates and mark it Python 3. - Move title fixups into Python. - Move key display name expansion into Python. - Add Dottes-specific header continuation line format. None of the usual tools appears to support the official +: continuation.
author Jim Hague <jim.hague@acm.org>
date Mon, 31 Oct 2016 23:48:45 +0000
parents 760d0ae5acea
children afc031477784
line wrap: on
line diff
--- a/makeBookeTunePages.sh	Mon Oct 31 23:45:00 2016 +0000
+++ b/makeBookeTunePages.sh	Mon Oct 31 23:48:45 2016 +0000
@@ -8,13 +8,6 @@
 # makeGraphics.sh to make these.
 #
 
-# Restore titles like 'Exploding Potato, The' to the
-# expected 'The Exploding Potato'.
-fixtitle()
-{
-    retval=`echo "$1" | sed -e "s/\(.*\), *\(.*\)/\2 \1/"`
-}
-
 if [ $# != 1 ]; then
     echo "Usage: makeBookeTunePages.sh <book dir name>"
     exit 1
@@ -38,12 +31,8 @@
     while read filename
     do
         name=`basename $filename .abc`
-        title=`$dir/abcfield.py --field T --latex $filename`
-        fixtitle "$title"
-        title=$retval
-        subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename`
-        fixtitle "$subtitle"
-        subtitle=$retval
+        title=`$dir/abcfield.py --field T --latex --display $filename`
+        subtitle=`$dir/abcfield.py --index 2 --field T --latex --display $filename`
         composer=`$dir/abcfield.py --field C --latex $filename`
 
         changefile=`$dir/abcfield.py --field N --starts "Change:" $filename`
@@ -51,9 +40,7 @@
         changetitle=""
         if [ -n "$changefile" ]; then
             changename=`basename $changefile .abc`
-            changetitle=`$dir/abcfield.py --field T --latex $booke/$changefile`
-            fixtitle "$changetitle"
-            changetitle=$retval
+            changetitle=`$dir/abcfield.py --field T --latex --display $booke/$changefile`
         fi
 
         credit=`$dir/abcfield.py --field N --starts "Credit:" $filename`