Provide full titles for next and previous tunes in web pages.
This commit is contained in:
parent
9e27b13c6b
commit
127c0380db
|
@ -241,8 +241,13 @@ if __name__ == "__main__":
|
||||||
def process(f, dir, options):
|
def process(f, dir, options):
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
if options.display:
|
if options.display:
|
||||||
|
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)
|
line = getFieldDisplayText(lines, dir, options.field, options.index, options.starts, options.latex)
|
||||||
else:
|
else:
|
||||||
|
if options.field.upper() == "FT":
|
||||||
|
options.field = "T"
|
||||||
line = getFieldText(lines, options.field, options.index, options.starts)
|
line = getFieldText(lines, options.field, options.index, options.starts)
|
||||||
if line:
|
if line:
|
||||||
print(line)
|
print(line)
|
||||||
|
|
|
@ -144,7 +144,7 @@
|
||||||
<div class="dottes-tune-footer-learner-next-column"></div>
|
<div class="dottes-tune-footer-learner-next-column"></div>
|
||||||
<div class="dottes-tune-footer-learner-row">
|
<div class="dottes-tune-footer-learner-row">
|
||||||
<div class="dottes-tune-footer-learner-prev">
|
<div class="dottes-tune-footer-learner-prev">
|
||||||
<a href="${prevpage}">${prevtitle}</a>
|
<a href="${prevpage}">${prevfulltitle}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="dottes-tune-footer-learner-booke">
|
<div class="dottes-tune-footer-learner-booke">
|
||||||
<a class="dottes-tune-icon-link" href="${name}.html">
|
<a class="dottes-tune-icon-link" href="${name}.html">
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="dottes-tune-footer-learner-next">
|
<div class="dottes-tune-footer-learner-next">
|
||||||
<a href="${nextpage}">${nexttitle}</a>
|
<a href="${nextpage}">${nextfulltitle}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="dottes-tune-footer-row">
|
<div class="dottes-tune-footer-row">
|
||||||
<div class="dottes-tune-footer-prev">
|
<div class="dottes-tune-footer-prev">
|
||||||
<a href="${prevpage}">${prevtitle}</a>
|
<a href="${prevpage}">${prevfulltitle}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="dottes-tune-footer-booke">
|
<div class="dottes-tune-footer-booke">
|
||||||
<a class="dottes-tune-icon-link" href="learner-${name}.html">
|
<a class="dottes-tune-icon-link" href="learner-${name}.html">
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="dottes-tune-footer-next">
|
<div class="dottes-tune-footer-next">
|
||||||
<a href="${nextpage}">${nexttitle}</a>
|
<a href="${nextpage}">${nextfulltitle}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -96,18 +96,22 @@ do
|
||||||
# Get previous and next tune page names and titles.
|
# Get previous and next tune page names and titles.
|
||||||
prevpage=""
|
prevpage=""
|
||||||
prevtitle=""
|
prevtitle=""
|
||||||
|
prevfulltitle=""
|
||||||
nextpage=""
|
nextpage=""
|
||||||
nexttitle=""
|
nexttitle=""
|
||||||
|
nextfulltitle=""
|
||||||
|
|
||||||
if [ $i -gt 0 ]; then
|
if [ $i -gt 0 ]; then
|
||||||
prev=${filenames[$((i - 1))]}
|
prev=${filenames[$((i - 1))]}
|
||||||
prevpage=`basename $prev .abc`.html
|
prevpage=`basename $prev .abc`.html
|
||||||
prevtitle=`./abcfield.py --display --field="T" $prev`
|
prevtitle=`./abcfield.py --display --field="T" $prev`
|
||||||
|
prevfulltitle=`./abcfield.py --display --field="FT" $prev`
|
||||||
fi
|
fi
|
||||||
if [ $i -lt $((nofiles - 1)) ]; then
|
if [ $i -lt $((nofiles - 1)) ]; then
|
||||||
next=${filenames[$((i + 1))]}
|
next=${filenames[$((i + 1))]}
|
||||||
nextpage=`basename $next .abc`.html
|
nextpage=`basename $next .abc`.html
|
||||||
nexttitle=`./abcfield.py --display --field="T" $next`
|
nexttitle=`./abcfield.py --display --field="T" $next`
|
||||||
|
nextfulltitle=`./abcfield.py --display --field="FT" $next`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate the tune web page.
|
# Generate the tune web page.
|
||||||
|
@ -119,16 +123,20 @@ do
|
||||||
--value "lastchanged=${lastchanged}" \
|
--value "lastchanged=${lastchanged}" \
|
||||||
--value "prevpage=${prevpage}" \
|
--value "prevpage=${prevpage}" \
|
||||||
--value "prevtitle=${prevtitle}" \
|
--value "prevtitle=${prevtitle}" \
|
||||||
|
--value "prevfulltitle=${prevfulltitle}" \
|
||||||
--value "nextpage=${nextpage}" \
|
--value "nextpage=${nextpage}" \
|
||||||
--value "nexttitle=${nexttitle}" \
|
--value "nexttitle=${nexttitle}" \
|
||||||
|
--value "nextfulltitle=${nextfulltitle}" \
|
||||||
--template dottes.html.tune $filename > $webdir/$tunepage
|
--template dottes.html.tune $filename > $webdir/$tunepage
|
||||||
$dir/abctemplate.py \
|
$dir/abctemplate.py \
|
||||||
--value "masterbooke=${masterbooke}" \
|
--value "masterbooke=${masterbooke}" \
|
||||||
--value "lastchanged=${lastchanged}" \
|
--value "lastchanged=${lastchanged}" \
|
||||||
--value "prevpage=learner-${prevpage}" \
|
--value "prevpage=learner-${prevpage}" \
|
||||||
--value "prevtitle=${prevtitle}" \
|
--value "prevtitle=${prevtitle}" \
|
||||||
|
--value "prevfulltitle=${prevfulltitle}" \
|
||||||
--value "nextpage=learner-${nextpage}" \
|
--value "nextpage=learner-${nextpage}" \
|
||||||
--value "nexttitle=${nexttitle}" \
|
--value "nexttitle=${nexttitle}" \
|
||||||
|
--value "nextfulltitle=${nextfulltitle}" \
|
||||||
--template dottes.html.learnertune $filename > $webdir/$learnerpage
|
--template dottes.html.learnertune $filename > $webdir/$learnerpage
|
||||||
$dir/abctemplate.py --template dottes.html.tuneindex $filename >> $webdir/$tunelist
|
$dir/abctemplate.py --template dottes.html.tuneindex $filename >> $webdir/$tunelist
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue