forked from CryHavoc/dottes
Modify Change tune handling.
Change all change notes to reference the filename of the tune to change to. Modify web and document generators to pull the change note out of the abc and generate an appropiate bit of content. This is now, in both cases, a hyperlink. In the process, remove the tune-specific .tex facility. It wasn't being used. I could really do with a proper templating system, and using some sort of templating in the LaTeX generation.
This commit is contained in:
parent
2dfc0109f5
commit
6c091c1470
|
@ -1,7 +1,7 @@
|
|||
X: 1
|
||||
T: A La Mode de France
|
||||
T: Nonesuch
|
||||
N: Change: Rufty Tufty
|
||||
N: Change: RuftyTufty.abc
|
||||
M: C
|
||||
L: 1/4
|
||||
K: Gmaj
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
X: 1
|
||||
T: Bonny Kate
|
||||
M: C
|
||||
N: Change: Harper's Frolick
|
||||
N: Change: HarpersFrolick.abc
|
||||
L: 1/4
|
||||
K: G
|
||||
d e f | "G" g>f g>f | "G" g d d B | "C" c/d/ e d>c |\
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
X: 1
|
||||
T: Captain Rock's Farewell
|
||||
N: Change: Orange in Bloom
|
||||
N: Change: OrangeInBloom.abc
|
||||
M: 3/4
|
||||
L: 1/4
|
||||
K: Gmaj
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
X: 1
|
||||
T: Elizabeth Clare
|
||||
C: Chris Wood
|
||||
N: Change: Michael Turner's Waltz
|
||||
N: Change: MichaelTurnersWaltz.abc
|
||||
M: 3/4
|
||||
L: 1/8
|
||||
R: waltz
|
||||
|
@ -14,4 +14,3 @@ K: Gmaj
|
|||
"C" c2 cd c2 | "G" B2 Bc B2 | "Am" A2 G2 E2 |
|
||||
"D" D2>D2 GA | "G" B2 Bc B2 | "D" A2 AB A2 | "C" G2 E2 GE |\
|
||||
"G" D2>D2 GA | "G" B2 d2 e2 | d2 c2 B2 | "D" A2 G2 F2 | "G" G3 :|
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
X: 1
|
||||
T: Exploding Potato, The
|
||||
C: Ed Pritchard
|
||||
N: Change: The Extension Reel
|
||||
N: Change: ExtensionReel.abc
|
||||
M: C
|
||||
L: 1/4
|
||||
K: Gmaj
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
X:1
|
||||
T:Grandfather's Tune
|
||||
S:Nick Barber
|
||||
N:Change: The Sloe
|
||||
N:Change: Sloe.abc
|
||||
R:Reel
|
||||
M:4/4
|
||||
Q:160
|
||||
|
|
|
@ -2,7 +2,7 @@ X:102
|
|||
T:Harper's Frolick
|
||||
S:Nick Barber
|
||||
R:Polka
|
||||
N:Change: Three Around Three
|
||||
N:Change: ThreeAroundThree.abc
|
||||
M:4/4
|
||||
L:1/4
|
||||
Q:160
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
X:1
|
||||
T:Just as the tide was flowing
|
||||
S:Nick Barber
|
||||
N:Change: Rochdale Coconut Dance
|
||||
N:Change: RochdaleCoconutDance.abc
|
||||
L:1/4
|
||||
Q:160
|
||||
M:C
|
||||
|
@ -16,4 +16,3 @@ P:B
|
|||
"G" d B B/A/G/A/ | "Em" B/A/G/F/ "C" E "D" D |
|
||||
"G" G G "C" E "D" D | "G" G G "D" A G/A/ |\
|
||||
"G" B B "D" c/B/A/G/ | "C" E "D" F "G" G :|
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ T: King Of The Fairies
|
|||
M: 4/4
|
||||
L: 1/8
|
||||
R: Hornpipe
|
||||
N: Change: Lanigan's Ball
|
||||
N: Change: LanigansBall.abc
|
||||
K: Em
|
||||
B,2 |\
|
||||
|: "Em" (ED)uEvF (GF)vGuA | B2B2 G3 A | B2E2 (EF)GE | "D" (FG)FE D3 B,2 |
|
||||
|
|
|
@ -2,7 +2,7 @@ X:1
|
|||
T:Laride 6
|
||||
M:2/2
|
||||
L:1/4
|
||||
N: Change: Bear Dance
|
||||
N: Change: BearDance.abc
|
||||
O:France
|
||||
A:Bretagne
|
||||
K:G
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
X: 6
|
||||
T:Mazurka de Lapleau
|
||||
N: Change: Mazurka d'Avignon
|
||||
N: Change: MazurkaAvignon.abc
|
||||
M:3/4
|
||||
L:1/8
|
||||
K:G
|
||||
|
|
|
@ -2,7 +2,7 @@ X: 1
|
|||
T: Plane Tree, The
|
||||
C: Undine Hornby
|
||||
S: Nick Barber
|
||||
N: Change: Herbert the Sherbert
|
||||
N: Change: HerbertTheSherbert.abc
|
||||
M: 6/8
|
||||
L: 1/8
|
||||
R: jig
|
||||
|
|
|
@ -3,10 +3,9 @@ T: Rogues' March
|
|||
M: 6/8
|
||||
L: 1/4
|
||||
K: Gmaj
|
||||
N: Change: Captain Lanoe's Quick March
|
||||
N: Change: CaptainLanoesQuickMarch.abc
|
||||
"G" B B/ B/c/d/ | "C" e e<e | "D" d/d/d/ d e/ | "D" d c/ B A/ |
|
||||
"G" B B/ B/c/d/ | "C" e e<e | "D" d/e/f/ "G" g/d/B/ | "D" A3/2 "G" G3/2 :|
|
||||
"Em" g3/2 "D" f3/2 | "C" e3/2 "D" d3/2 |\
|
||||
"Em" g3/2 "D" f3/2 | "C" e3/2 "D" d c/ |
|
||||
"G" B B/ B/c/d/ | "C" e e<e | "D" d/e/f/ "G" g/d/B/ | "D" A3/2 "G" G3/2 :|
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
X:397
|
||||
T:Sheriff's Ride, The
|
||||
N: Change: Bear Dance
|
||||
N: Change: BearDance.abc
|
||||
M:4/4
|
||||
L:1/8
|
||||
K:Emin
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
X: 1
|
||||
T: Will's Way
|
||||
C: Trad.
|
||||
N: Change: Three Around Three
|
||||
N: Change: ThreeAroundThree.abc
|
||||
M: 4/4
|
||||
L: 1/8
|
||||
Q: 140
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
X: 1
|
||||
T: Winster Gallop, The
|
||||
M: C
|
||||
N: Change: Salmon Tails
|
||||
N: Change: SalmonTails.abc
|
||||
L: 1/4
|
||||
Q: 240
|
||||
R: polka
|
||||
|
|
|
@ -20,7 +20,12 @@
|
|||
</a>
|
||||
|
||||
<div class="grid_12 dottes-body">
|
||||
<h1>@TITLE@</h1>
|
||||
<img class="dottes-png" src="@TUNE@.png" alt="@TITLE@ dots">
|
||||
<div class="dottes-change-@CHANGEVISIBILITY@">
|
||||
Change: <a class="dottes-change-link"
|
||||
href="@CHANGETUNE@">@CHANGETITLE@</a>
|
||||
</div>
|
||||
<ul class="tune-data-list">
|
||||
<li><a class="dottes-link-tune dottes-pdf"
|
||||
href="@TUNE@.pdf">PDF</a></li>
|
||||
|
|
|
@ -7,6 +7,13 @@
|
|||
# makeGraphics.sh to make these.
|
||||
#
|
||||
|
||||
# Restore titles like 'Exploding Potato, The' to the
|
||||
# expected 'The Exploding Potato'.
|
||||
fixtitle()
|
||||
{
|
||||
retval=`echo "$1" | sed -e "s/\(.*\), *\(.*\)/\2 \1/"`
|
||||
}
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo "Usage: makeBookeA4.sh <book dir name>"
|
||||
exit 1
|
||||
|
@ -41,16 +48,25 @@ cp dottes.tex.a4header $builddir/$output
|
|||
find $booke -name "*.abc" | sort |
|
||||
while read filename
|
||||
do
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
name=`basename $filename .abc`
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
fixtitle "$title"
|
||||
title=$retval
|
||||
|
||||
echo -E "\begin{center}" >> $builddir/$output
|
||||
echo -E "\phantomsection" >> $builddir/$output
|
||||
echo -E "\hypertarget{$name}{\includegraphics[width=\textwidth,keepaspectratio]{$graphicsdir/$name}}" >> $builddir/$output
|
||||
echo -E "\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output
|
||||
echo -E "\end{center}" >> $builddir/$output
|
||||
text=$booke/$name.tex
|
||||
if [ -r $text ]; then
|
||||
cat $text >> $builddir/$output
|
||||
|
||||
changefile=`$dir/abcfield.py --field N $filename | grep "Change:" | sed -e "s/Change: *//"`
|
||||
changetitle=""
|
||||
if [ -n "$changefile" ]; then
|
||||
changetitle=`$dir/abcfield.py --field T --latex $booke/$changefile`
|
||||
fixtitle "$changetitle"
|
||||
changetitle=$retval
|
||||
changename=`basename $changefile .abc`
|
||||
echo -E "Change: \hyperlink{$changename}{$changetitle}" >> $builddir/$output
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -59,8 +75,10 @@ cat dottes.tex.firstlines >> $builddir/$output
|
|||
find $booke -name "*.abc" | sort |
|
||||
while read filename
|
||||
do
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
name=`basename $filename .abc`
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
fixtitle "$title"
|
||||
title=$retval
|
||||
echo -E "\hyperlink{$name}{$title} & \raisebox{-.25\height}{\includegraphics[width=0.6\textwidth]{$graphicsdir/firstline-$name}} \\\\" >> $builddir/$output
|
||||
done
|
||||
|
||||
|
|
|
@ -7,6 +7,13 @@
|
|||
# makeGraphics.sh to make these.
|
||||
#
|
||||
|
||||
# Restore titles like 'Exploding Potato, The' to the
|
||||
# expected 'The Exploding Potato'.
|
||||
fixtitle()
|
||||
{
|
||||
retval=`echo "$1" | sed -e "s/\(.*\), *\(.*\)/\2 \1/"`
|
||||
}
|
||||
|
||||
if [ $# != 1 ]; then
|
||||
echo "Usage: makeBookeA5.sh <book dir name>"
|
||||
exit 1
|
||||
|
@ -43,17 +50,26 @@ cp dottes.tex.a5header $builddir/$output
|
|||
find $booke -name "*.abc" | sort |
|
||||
while read filename
|
||||
do
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
name=`basename $filename .abc`
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
fixtitle "$title"
|
||||
title=$retval
|
||||
|
||||
echo -E "\newpage" >> $builddir/$output
|
||||
echo -E "\begin{center}" >> $builddir/$output
|
||||
echo -E "\phantomsection" >> $builddir/$output
|
||||
echo -E "\hypertarget{$name}{\includegraphics[width=\textwidth,height=0.9\textheight,keepaspectratio]{$graphicsdir/$name}}" >> $builddir/$output
|
||||
echo -E "\hypertarget{$name}{\includegraphics[width=\textwidth,height=0.85\textheight,keepaspectratio]{$graphicsdir/$name}}" >> $builddir/$output
|
||||
echo -E "\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output
|
||||
echo -E "\end{center}" >> $builddir/$output
|
||||
text=$booke/$name.tex
|
||||
if [ -r $text ]; then
|
||||
cat $text >> $builddir/$output
|
||||
|
||||
changefile=`$dir/abcfield.py --field N $filename | grep "Change:" | sed -e "s/Change: *//"`
|
||||
changetitle=""
|
||||
if [ -n "$changefile" ]; then
|
||||
changetitle=`$dir/abcfield.py --field T --latex $booke/$changefile`
|
||||
fixtitle "$changetitle"
|
||||
changetitle=$retval
|
||||
changename=`basename $changefile .abc`
|
||||
echo -E "Change: \hyperlink{$changename}{$changetitle}" >> $builddir/$output
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -62,8 +78,10 @@ cat dottes.tex.firstlines >> $builddir/$output
|
|||
find $booke -name "*.abc" | sort |
|
||||
while read filename
|
||||
do
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
name=`basename $filename .abc`
|
||||
title=`$dir/abcfield.py --field T --latex $filename`
|
||||
fixtitle "$title"
|
||||
title=$retval
|
||||
echo -E "\hyperlink{$name}{$title} & \raisebox{-.25\height}{\includegraphics[width=0.6\textwidth]{$graphicsdir/firstline-$name}} \\\\" >> $builddir/$output
|
||||
done
|
||||
|
||||
|
|
30
makeWeb.sh
30
makeWeb.sh
|
@ -4,6 +4,15 @@
|
|||
# to be already built.
|
||||
#
|
||||
|
||||
#set -x
|
||||
|
||||
# Restore titles like 'Exploding Potato, The' to the
|
||||
# expected 'The Exploding Potato'.
|
||||
fixtitle()
|
||||
{
|
||||
retval=`echo "$1" | sed -e "s/\(.*\), *\(.*\)/\2 \1/"`
|
||||
}
|
||||
|
||||
if [ $# -lt 2 -o $# -gt 3 ]; then
|
||||
echo "Usage: makeWeb.sh <book dir name> <master book dir name> [<instrument name>]"
|
||||
exit 1
|
||||
|
@ -31,7 +40,6 @@ if [ -r $bookedir/intro.txt ]; then
|
|||
fi
|
||||
|
||||
if [ -n "$instrument" ]; then
|
||||
# Remove any transposition tag from title.
|
||||
title="${title} ($instrument)"
|
||||
subtitle="${subtitle} ($instrument)"
|
||||
fi
|
||||
|
@ -50,12 +58,21 @@ cp $1-*.pdf $webdir
|
|||
find $bookedir -name "*.abc" | sort |
|
||||
while read filename
|
||||
do
|
||||
title=`$dir/abcfield.py --field T --html $filename`
|
||||
name=`basename $filename .abc`
|
||||
|
||||
# Restore titles like 'Exploding Potato, The' to the
|
||||
# expected 'The Exploding Potato'.
|
||||
title=`echo $title | sed -e "s/\(.*\), *\(.*\)/\2 \1/"`
|
||||
title=`$dir/abcfield.py --field T --html $filename`
|
||||
fixtitle "$title"
|
||||
title=$retval
|
||||
changefile=`$dir/abcfield.py --field N $filename | grep "Change:" | sed -e "s/Change: *//"`
|
||||
changetitle=""
|
||||
changevisibility="no"
|
||||
if [ -n "$changefile" ]; then
|
||||
changetitle=`$dir/abcfield.py --field T --html $bookedir/$changefile`
|
||||
changevisibility="yes"
|
||||
|
||||
fixtitle "$changetitle"
|
||||
changetitle=$retval
|
||||
fi
|
||||
|
||||
# Copy tune PDF from common graphics.
|
||||
cp $graphicsdir/${name}.pdf $webdir
|
||||
|
@ -70,6 +87,9 @@ find $bookedir -name "*.abc" | sort |
|
|||
# initial '&' in the title - it means things to sed.
|
||||
sed -e "s/@TITLE@/${title//&/\&}/" \
|
||||
-e "s/@MASTERBOOKE@/${masterbooke}/" \
|
||||
-e "s/@CHANGETITLE@/${changetitle//&/\&}/" \
|
||||
-e "s/@CHANGETUNE@/${changefile/.abc/.html}/" \
|
||||
-e "s/@CHANGEVISIBILITY@/${changevisibility}/" \
|
||||
-e "s/@TUNE@/${name}/" dottes.html.tune > $webdir/$tunepage
|
||||
|
||||
sed -e "s/@TITLE@/${title//&/\&}/" \
|
||||
|
|
|
@ -8,13 +8,14 @@ scale 0.9
|
|||
titleformat T0 C1
|
||||
titlespace 0
|
||||
topspace 0
|
||||
% I only want to include Notes in the tune graphics. To turn off the
|
||||
% other fields, give a blank infoname for that letter.
|
||||
% I don't want any info fields in the graphics. To turn off the
|
||||
% fields, give a blank infoname for that letter.
|
||||
infoname S
|
||||
infoname R
|
||||
infoname B
|
||||
infoname D
|
||||
infoname Z
|
||||
infoname H
|
||||
infoname N
|
||||
infoline true
|
||||
writehistory true
|
||||
|
|
|
@ -180,3 +180,18 @@ div.dottes-tune-list-item-image
|
|||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.dottes-change-no
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.dottes-change-yes
|
||||
{
|
||||
display: block;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
div.dottes-change-link
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue