forked from CryHavoc/dottes
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):
|
||||
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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -96,18 +96,22 @@ do
|
|||
# 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 @@ do
|
|||
--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
|
||||
|
|
Loading…
Reference in New Issue