Mercurial > dottes
comparison makeBookeTunePages.sh @ 326:27f29e8aafea
Add --contains flag to abcfield.py.
Currently we rely on any N: field with a Change: subnotice being the first
N: field. Add --contains field to abcfield.py to remove this restriction.
Also use it to extract new subfield Credit: and add that if present
to the tune information in print and on web.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Sun, 04 Aug 2013 22:09:25 +0100 |
parents | 1a240d1e2032 |
children | b44fbcaeba38 |
comparison
equal
deleted
inserted
replaced
325:21615733c3f3 | 326:27f29e8aafea |
---|---|
42 fixtitle "$title" | 42 fixtitle "$title" |
43 title=$retval | 43 title=$retval |
44 subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` | 44 subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` |
45 composer=`$dir/abcfield.py --field C --latex $filename` | 45 composer=`$dir/abcfield.py --field C --latex $filename` |
46 | 46 |
47 changefile=`$dir/abcfield.py --field N $filename | grep "Change:" | sed -e "s/Change: *//"` | 47 changefile=`$dir/abcfield.py --field N --contains "Change:" $filename | sed -e "s/Change: *//"` |
48 changename="" | 48 changename="" |
49 changetitle="" | 49 changetitle="" |
50 if [ -n "$changefile" ]; then | 50 if [ -n "$changefile" ]; then |
51 changename=`basename $changefile .abc` | 51 changename=`basename $changefile .abc` |
52 changetitle=`$dir/abcfield.py --field T --latex $booke/$changefile` | 52 changetitle=`$dir/abcfield.py --field T --latex $booke/$changefile` |
53 fixtitle "$changetitle" | 53 fixtitle "$changetitle" |
54 changetitle=$retval | 54 changetitle=$retval |
55 fi | 55 fi |
56 echo -E "\showtune{$name}{$title}{$subtitle}{$composer}{$graphicsdir/$name}{$changename}{$changetitle}" >> $tunesoutput | 56 |
57 credit=`$dir/abcfield.py --field N --contains "Credit:" $filename | sed -e "s/Credit: *//"` | |
58 echo -E "\showtune{$name}{$title}{$subtitle}{$composer}{$graphicsdir/$name}{$changename}{$changetitle}{$credit}" >> $tunesoutput | |
57 | 59 |
58 echo -E "\showfirstline{$name}{$title}{$graphicsdir/firstline-$name}" >> $indexoutput | 60 echo -E "\showfirstline{$name}{$title}{$graphicsdir/firstline-$name}" >> $indexoutput |
59 done | 61 done |