Mercurial > dottes
diff 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 |
line wrap: on
line diff
--- a/makeWeb.sh Sun Aug 04 21:28:05 2013 +0100 +++ b/makeWeb.sh Sun Aug 04 22:09:25 2013 +0100 @@ -67,7 +67,7 @@ title=$retval subtitle=`$dir/abcfield.py --index 2 --field T --latex $filename` composer=`$dir/abcfield.py --field C --latex $filename` - changefile=`$dir/abcfield.py --field N $filename | grep "Change:" | sed -e "s/Change: *//"` + changefile=`$dir/abcfield.py --field N --contains "Change:" $filename | sed -e "s/Change: *//"` changetitle="" changevisibility="no" if [ -n "$changefile" ]; then @@ -77,6 +77,11 @@ fixtitle "$changetitle" changetitle=$retval fi + credit=`$dir/abcfield.py --field N --contains "Credit:" $filename | sed -e "s/Credit: *//"` + creditvisibility="no" + if [ -n "$credit" ]; then + creditvisibility="yes" + fi # Copy the ABC into the web. cp $filename $webdir @@ -93,6 +98,8 @@ -e "s/@CHANGETITLE@/${changetitle//&/\&}/" \ -e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \ -e "s/@CHANGEVISIBILITY@/${changevisibility}/" \ + -e "s/@CREDIT@/${credit}/" \ + -e "s/@CREDITVISIBILITY@/${creditvisibility}/" \ -e "s/@TUNE@/${name}/" dottes.html.tune > $webdir/$tunepage sed -e "s/@TITLE@/${title//&/\&}/" \