diff makeBookeTunePages.sh @ 588:afc031477784

Replace sed substitution with Python templating for HTML and LaTeX output.
author Jim Hague <jim.hague@acm.org>
date Wed, 02 Nov 2016 00:21:18 +0000
parents daa3b76bd11f
children 507d853433ef
line wrap: on
line diff
--- a/makeBookeTunePages.sh	Mon Oct 31 23:55:28 2016 +0000
+++ b/makeBookeTunePages.sh	Wed Nov 02 00:21:18 2016 +0000
@@ -30,21 +30,6 @@
 find $booke -name "*.abc" | sort |
     while read filename
     do
-        name=`basename $filename .abc`
-        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`
-        changename=""
-        changetitle=""
-        if [ -n "$changefile" ]; then
-            changename=`basename $changefile .abc`
-            changetitle=`$dir/abcfield.py --field T --latex --display $booke/$changefile`
-        fi
-
-        credit=`$dir/abcfield.py --field N --starts "Credit:" $filename`
-        echo -E "\showtune{$name}{$title}{$subtitle}{$composer}{$graphicsdir/$name}{$changename}{$changetitle}{$credit}" >> $tunesoutput
-
-        echo -E "\showfirstline{$name}{$title}{$graphicsdir/firstline-$name}" >> $indexoutput
+        $dir/abctemplate.py --latex --value "graphicsdir=$graphicsdir" --template $dir/dottes.tex.tune $filename >> $tunesoutput
+        $dir/abctemplate.py --latex --value "graphicsdir=$graphicsdir" --template $dir/dottes.tex.firstline-tune $filename >> $indexoutput
     done