comparison makeWeb.sh @ 581:760d0ae5acea

Revise abcfield.py to recognise continuation fields. Also default to HTML entity output, and replace --contains with --starts, which does the same thing but checks only the start of the line and removes the matched item.
author Jim Hague <jim.hague@acm.org>
date Sat, 29 Oct 2016 19:32:53 +0100
parents 36d43edbd3f5
children 0206ab9fd6ba
comparison
equal deleted inserted replaced
580:575f1eae4137 581:760d0ae5acea
103 while read filename 103 while read filename
104 do 104 do
105 name=`basename $filename .abc` 105 name=`basename $filename .abc`
106 106
107 # Extract items to substitute in the web page. 107 # Extract items to substitute in the web page.
108 title=`$dir/abcfield.py --field T --html $filename` 108 title=`$dir/abcfield.py --field T $filename`
109 fixtitle "$title" 109 fixtitle "$title"
110 title=$retval 110 title=$retval
111 subtitle=`$dir/abcfield.py --index 2 --field T --html $filename` 111 subtitle=`$dir/abcfield.py --index 2 --field T $filename`
112 fixtitle "$subtitle" 112 fixtitle "$subtitle"
113 subtitle=$retval 113 subtitle=$retval
114 composer=`$dir/abcfield.py --field C --html $filename` 114 composer=`$dir/abcfield.py --field C $filename`
115 changefile=`$dir/abcfield.py --field N --contains "Change:" $filename | sed -e "s/Change: *//"` 115 changefile=`$dir/abcfield.py --field N --starts "Change:" $filename`
116 changetitle="" 116 changetitle=""
117 changevisibility="no" 117 changevisibility="no"
118 if [ -n "$changefile" ]; then 118 if [ -n "$changefile" ]; then
119 changetitle=`$dir/abcfield.py --field T --html $bookedir/$changefile` 119 changetitle=`$dir/abcfield.py --field T $bookedir/$changefile`
120 changevisibility="yes" 120 changevisibility="yes"
121 121
122 fixtitle "$changetitle" 122 fixtitle "$changetitle"
123 changetitle=$retval 123 changetitle=$retval
124 fi 124 fi
125 credit=`$dir/abcfield.py --field N --contains "Credit:" $filename | sed -e "s/Credit: *//"` 125 credit=`$dir/abcfield.py --field N --starts "Credit:" $filename`
126 creditvisibility="no" 126 creditvisibility="no"
127 if [ -n "$credit" ]; then 127 if [ -n "$credit" ]; then
128 creditvisibility="yes" 128 creditvisibility="yes"
129 fi 129 fi
130 lastchanged=`hg log --limit 1 --template "{date|shortdate}" $masterbookedir/${name}.abc` 130 lastchanged=`hg log --limit 1 --template "{date|shortdate}" $masterbookedir/${name}.abc`