Mercurial > dottes
comparison makeWeb.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 | b61c39beac5f |
children | b233893b4c51 2a7d03d6a89f |
comparison
equal
deleted
inserted
replaced
325:21615733c3f3 | 326:27f29e8aafea |
---|---|
65 title=`$dir/abcfield.py --field T --html $filename` | 65 title=`$dir/abcfield.py --field T --html $filename` |
66 fixtitle "$title" | 66 fixtitle "$title" |
67 title=$retval | 67 title=$retval |
68 subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` | 68 subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` |
69 composer=`$dir/abcfield.py --field C --latex $filename` | 69 composer=`$dir/abcfield.py --field C --latex $filename` |
70 changefile=`$dir/abcfield.py --field N $filename | grep "Change:" | sed -e "s/Change: *//"` | 70 changefile=`$dir/abcfield.py --field N --contains "Change:" $filename | sed -e "s/Change: *//"` |
71 changetitle="" | 71 changetitle="" |
72 changevisibility="no" | 72 changevisibility="no" |
73 if [ -n "$changefile" ]; then | 73 if [ -n "$changefile" ]; then |
74 changetitle=`$dir/abcfield.py --field T --html $bookedir/$changefile` | 74 changetitle=`$dir/abcfield.py --field T --html $bookedir/$changefile` |
75 changevisibility="yes" | 75 changevisibility="yes" |
76 | 76 |
77 fixtitle "$changetitle" | 77 fixtitle "$changetitle" |
78 changetitle=$retval | 78 changetitle=$retval |
79 fi | |
80 credit=`$dir/abcfield.py --field N --contains "Credit:" $filename | sed -e "s/Credit: *//"` | |
81 creditvisibility="no" | |
82 if [ -n "$credit" ]; then | |
83 creditvisibility="yes" | |
79 fi | 84 fi |
80 | 85 |
81 # Copy the ABC into the web. | 86 # Copy the ABC into the web. |
82 cp $filename $webdir | 87 cp $filename $webdir |
83 | 88 |
91 -e "s/@COMPOSER@/${composer}/" \ | 96 -e "s/@COMPOSER@/${composer}/" \ |
92 -e "s/@MASTERBOOKE@/${masterbooke}/" \ | 97 -e "s/@MASTERBOOKE@/${masterbooke}/" \ |
93 -e "s/@CHANGETITLE@/${changetitle//&/\&}/" \ | 98 -e "s/@CHANGETITLE@/${changetitle//&/\&}/" \ |
94 -e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \ | 99 -e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \ |
95 -e "s/@CHANGEVISIBILITY@/${changevisibility}/" \ | 100 -e "s/@CHANGEVISIBILITY@/${changevisibility}/" \ |
101 -e "s/@CREDIT@/${credit}/" \ | |
102 -e "s/@CREDITVISIBILITY@/${creditvisibility}/" \ | |
96 -e "s/@TUNE@/${name}/" dottes.html.tune > $webdir/$tunepage | 103 -e "s/@TUNE@/${name}/" dottes.html.tune > $webdir/$tunepage |
97 | 104 |
98 sed -e "s/@TITLE@/${title//&/\&}/" \ | 105 sed -e "s/@TITLE@/${title//&/\&}/" \ |
99 -e "s/@TUNE@/${name}/" dottes.html.tuneindex >> $webdir/$output | 106 -e "s/@TUNE@/${name}/" dottes.html.tuneindex >> $webdir/$output |
100 done | 107 done |