Mercurial > dottes
changeset 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 | 833e6185b6a2 |
children | 9b562923ac71 |
files | abcfield.py dottes.html.learnertune dottes.html.tune makeWeb.sh |
diffstat | 4 files changed, 18 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/abcfield.py Wed Oct 11 17:09:31 2017 +0100 +++ b/abcfield.py Wed Oct 11 17:45:27 2017 +0100 @@ -241,8 +241,13 @@ def process(f, dir, options): lines = f.readlines() if options.display: - line = getFieldDisplayText(lines, dir, options.field, options.index, options.starts, options.latex) + if options.field.upper() == "FT": + line = getFullTitle(lines, dir, options.starts, options.latex) + else: + line = getFieldDisplayText(lines, dir, options.field, options.index, options.starts, options.latex) else: + if options.field.upper() == "FT": + options.field = "T" line = getFieldText(lines, options.field, options.index, options.starts) if line: print(line)
--- a/dottes.html.learnertune Wed Oct 11 17:09:31 2017 +0100 +++ b/dottes.html.learnertune Wed Oct 11 17:45:27 2017 +0100 @@ -144,7 +144,7 @@ <div class="dottes-tune-footer-learner-next-column"></div> <div class="dottes-tune-footer-learner-row"> <div class="dottes-tune-footer-learner-prev"> - <a href="${prevpage}">${prevtitle}</a> + <a href="${prevpage}">${prevfulltitle}</a> </div> <div class="dottes-tune-footer-learner-booke"> <a class="dottes-tune-icon-link" href="${name}.html"> @@ -157,7 +157,7 @@ </a> </div> <div class="dottes-tune-footer-learner-next"> - <a href="${nextpage}">${nexttitle}</a> + <a href="${nextpage}">${nextfulltitle}</a> </div> </div> </div>
--- a/dottes.html.tune Wed Oct 11 17:09:31 2017 +0100 +++ b/dottes.html.tune Wed Oct 11 17:45:27 2017 +0100 @@ -79,7 +79,7 @@ </div> <div class="dottes-tune-footer-row"> <div class="dottes-tune-footer-prev"> - <a href="${prevpage}">${prevtitle}</a> + <a href="${prevpage}">${prevfulltitle}</a> </div> <div class="dottes-tune-footer-booke"> <a class="dottes-tune-icon-link" href="learner-${name}.html"> @@ -92,7 +92,7 @@ </a> </div> <div class="dottes-tune-footer-next"> - <a href="${nextpage}">${nexttitle}</a> + <a href="${nextpage}">${nextfulltitle}</a> </div> </div> </div>
--- a/makeWeb.sh Wed Oct 11 17:09:31 2017 +0100 +++ b/makeWeb.sh Wed Oct 11 17:45:27 2017 +0100 @@ -96,18 +96,22 @@ # Get previous and next tune page names and titles. prevpage="" prevtitle="" + prevfulltitle="" nextpage="" nexttitle="" + nextfulltitle="" if [ $i -gt 0 ]; then prev=${filenames[$((i - 1))]} prevpage=`basename $prev .abc`.html prevtitle=`./abcfield.py --display --field="T" $prev` + prevfulltitle=`./abcfield.py --display --field="FT" $prev` fi if [ $i -lt $((nofiles - 1)) ]; then next=${filenames[$((i + 1))]} nextpage=`basename $next .abc`.html nexttitle=`./abcfield.py --display --field="T" $next` + nextfulltitle=`./abcfield.py --display --field="FT" $next` fi # Generate the tune web page. @@ -119,16 +123,20 @@ --value "lastchanged=${lastchanged}" \ --value "prevpage=${prevpage}" \ --value "prevtitle=${prevtitle}" \ + --value "prevfulltitle=${prevfulltitle}" \ --value "nextpage=${nextpage}" \ --value "nexttitle=${nexttitle}" \ + --value "nextfulltitle=${nextfulltitle}" \ --template dottes.html.tune $filename > $webdir/$tunepage $dir/abctemplate.py \ --value "masterbooke=${masterbooke}" \ --value "lastchanged=${lastchanged}" \ --value "prevpage=learner-${prevpage}" \ --value "prevtitle=${prevtitle}" \ + --value "prevfulltitle=${prevfulltitle}" \ --value "nextpage=learner-${nextpage}" \ --value "nexttitle=${nexttitle}" \ + --value "nextfulltitle=${nextfulltitle}" \ --template dottes.html.learnertune $filename > $webdir/$learnerpage $dir/abctemplate.py --template dottes.html.tuneindex $filename >> $webdir/$tunelist done