Mercurial > dottes
comparison makeWeb.sh @ 727:772402f5f8ea
Provide full titles for next and previous tunes in web pages.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Wed, 11 Oct 2017 17:45:27 +0100 |
parents | f8ab14cc9d8d |
children | c81a1ed21877 |
comparison
equal
deleted
inserted
replaced
726:833e6185b6a2 | 727:772402f5f8ea |
---|---|
94 lastchanged=`hg log --limit 1 --template "{date|shortdate}" $masterbookedir/${name}.abc` | 94 lastchanged=`hg log --limit 1 --template "{date|shortdate}" $masterbookedir/${name}.abc` |
95 | 95 |
96 # Get previous and next tune page names and titles. | 96 # Get previous and next tune page names and titles. |
97 prevpage="" | 97 prevpage="" |
98 prevtitle="" | 98 prevtitle="" |
99 prevfulltitle="" | |
99 nextpage="" | 100 nextpage="" |
100 nexttitle="" | 101 nexttitle="" |
102 nextfulltitle="" | |
101 | 103 |
102 if [ $i -gt 0 ]; then | 104 if [ $i -gt 0 ]; then |
103 prev=${filenames[$((i - 1))]} | 105 prev=${filenames[$((i - 1))]} |
104 prevpage=`basename $prev .abc`.html | 106 prevpage=`basename $prev .abc`.html |
105 prevtitle=`./abcfield.py --display --field="T" $prev` | 107 prevtitle=`./abcfield.py --display --field="T" $prev` |
108 prevfulltitle=`./abcfield.py --display --field="FT" $prev` | |
106 fi | 109 fi |
107 if [ $i -lt $((nofiles - 1)) ]; then | 110 if [ $i -lt $((nofiles - 1)) ]; then |
108 next=${filenames[$((i + 1))]} | 111 next=${filenames[$((i + 1))]} |
109 nextpage=`basename $next .abc`.html | 112 nextpage=`basename $next .abc`.html |
110 nexttitle=`./abcfield.py --display --field="T" $next` | 113 nexttitle=`./abcfield.py --display --field="T" $next` |
114 nextfulltitle=`./abcfield.py --display --field="FT" $next` | |
111 fi | 115 fi |
112 | 116 |
113 # Generate the tune web page. | 117 # Generate the tune web page. |
114 tunepage=${name}.html | 118 tunepage=${name}.html |
115 learnerpage=learner-${name}.html | 119 learnerpage=learner-${name}.html |
117 $dir/abctemplate.py \ | 121 $dir/abctemplate.py \ |
118 --value "masterbooke=${masterbooke}" \ | 122 --value "masterbooke=${masterbooke}" \ |
119 --value "lastchanged=${lastchanged}" \ | 123 --value "lastchanged=${lastchanged}" \ |
120 --value "prevpage=${prevpage}" \ | 124 --value "prevpage=${prevpage}" \ |
121 --value "prevtitle=${prevtitle}" \ | 125 --value "prevtitle=${prevtitle}" \ |
126 --value "prevfulltitle=${prevfulltitle}" \ | |
122 --value "nextpage=${nextpage}" \ | 127 --value "nextpage=${nextpage}" \ |
123 --value "nexttitle=${nexttitle}" \ | 128 --value "nexttitle=${nexttitle}" \ |
129 --value "nextfulltitle=${nextfulltitle}" \ | |
124 --template dottes.html.tune $filename > $webdir/$tunepage | 130 --template dottes.html.tune $filename > $webdir/$tunepage |
125 $dir/abctemplate.py \ | 131 $dir/abctemplate.py \ |
126 --value "masterbooke=${masterbooke}" \ | 132 --value "masterbooke=${masterbooke}" \ |
127 --value "lastchanged=${lastchanged}" \ | 133 --value "lastchanged=${lastchanged}" \ |
128 --value "prevpage=learner-${prevpage}" \ | 134 --value "prevpage=learner-${prevpage}" \ |
129 --value "prevtitle=${prevtitle}" \ | 135 --value "prevtitle=${prevtitle}" \ |
136 --value "prevfulltitle=${prevfulltitle}" \ | |
130 --value "nextpage=learner-${nextpage}" \ | 137 --value "nextpage=learner-${nextpage}" \ |
131 --value "nexttitle=${nexttitle}" \ | 138 --value "nexttitle=${nexttitle}" \ |
139 --value "nextfulltitle=${nextfulltitle}" \ | |
132 --template dottes.html.learnertune $filename > $webdir/$learnerpage | 140 --template dottes.html.learnertune $filename > $webdir/$learnerpage |
133 $dir/abctemplate.py --template dottes.html.tuneindex $filename >> $webdir/$tunelist | 141 $dir/abctemplate.py --template dottes.html.tuneindex $filename >> $webdir/$tunelist |
134 done | 142 done |