Changes to get Beginners booke building.

The web pages include prev and next links, so to get those right we
have to make the tune filenames distinct from the main booke names.
So fall back to taking the easy way, and just prefix all tune names with
@ or _.
This commit is contained in:
Jim Hague 2020-02-18 15:13:38 +00:00
parent 447c65ed31
commit 94aee4ec02
23 changed files with 26 additions and 0 deletions

View File

@ -189,6 +189,10 @@ def expandCustomMarkdown(t, dir):
def getTitleLink(m): def getTitleLink(m):
fname = m.group(1) + ".abc" fname = m.group(1) + ".abc"
path = pathlib.Path(dir, fname) path = pathlib.Path(dir, fname)
if not path.exists():
path = pathlib.Path(dir, '@' + fname)
if not path.exists():
path = pathlib.Path(dir, '_' + fname)
with path.open() as f: with path.open() as f:
lines = f.readlines() lines = f.readlines()
return "[" + getFullTitle(lines, dir) + "](" + fname + ")" return "[" + getFullTitle(lines, dir) + "](" + fname + ")"

View File

@ -22,6 +22,11 @@ find $booke -maxdepth 1 -name "*.abc" |
do do
name=`basename $filename .abc` name=`basename $filename .abc`
# Already generated?
if [ -f $graphicsdir/${name}.pdf ]; then
continue
fi
# Make the tune graphic. # Make the tune graphic.
abcm2ps -E -F singletune -O $graphicsdir/$name.eps $filename abcm2ps -E -F singletune -O $graphicsdir/$name.eps $filename
# Make $name.eps so we can build with LaTeX. # Make $name.eps so we can build with LaTeX.
@ -53,6 +58,11 @@ find ${booke}/Compact -maxdepth 1 -name "*.abc" |
do do
name=`basename $filename .abc` name=`basename $filename .abc`
# Already generated?
if [ -f $graphicsdir/compact-${name}.pdf ]; then
continue
fi
# Make the tune graphic. # Make the tune graphic.
abcm2ps -E -F singletune -O $graphicsdir/compact-${name}.eps $filename abcm2ps -E -F singletune -O $graphicsdir/compact-${name}.eps $filename
# Make $name.eps so we can build with LaTeX. # Make $name.eps so we can build with LaTeX.

View File

@ -78,6 +78,12 @@ find $booke -maxdepth 1 -name "*.abc" | sort |
do do
name=`basename $filename .abc` name=`basename $filename .abc`
tunedir=$basetunedir/$name tunedir=$basetunedir/$name
# Already generated?
if [ -f $tunedir/${name}.mp3 ]; then
continue
fi
mkdir -p $tunedir mkdir -p $tunedir
makeaudiofiles $filename $tunedir makeaudiofiles $filename $tunedir

View File

@ -29,6 +29,12 @@ find $booke -maxdepth 1 -name "*.abc" | sort |
do do
name=`basename $filename .abc` name=`basename $filename .abc`
tunedir=$basetunedir/$name tunedir=$basetunedir/$name
# Already generated?
if [ -f $tunedir/${name}.pdf ]; then
continue
fi
mkdir -p $tunedir mkdir -p $tunedir
tmpname=${name}.tmp tmpname=${name}.tmp