2013-06-26 23:37:45 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Generate the LaTeX for the Booke tune pages (tunes.tex) and the index
|
|
|
|
# of first lines (firstlines.tex). These are generated into the build
|
|
|
|
# directory.
|
|
|
|
#
|
|
|
|
# All EPS and PDF tune graphics must be present already. Run
|
|
|
|
# makeGraphics.sh to make these.
|
|
|
|
#
|
|
|
|
|
|
|
|
if [ $# != 1 ]; then
|
|
|
|
echo "Usage: makeBookeTunePages.sh <book dir name>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
dir=`pwd`
|
|
|
|
|
|
|
|
booke=$dir/$1
|
|
|
|
builddir=$dir/build
|
|
|
|
graphicsdir=$dir/graphics/$1
|
2016-11-04 00:03:54 +00:00
|
|
|
tunesoutput=$builddir/$1-tunes.tex
|
|
|
|
indexoutput=$builddir/$1-firstlines.tex
|
2013-06-26 23:37:45 +01:00
|
|
|
|
|
|
|
mkdir -p $builddir
|
|
|
|
|
|
|
|
rm -f $tunesoutput $indexoutput
|
|
|
|
|
|
|
|
# Now, for each tune, make the tune graphic and add it, inside a
|
|
|
|
# centre section, so the document. Then add a TOC entry.
|
|
|
|
find $booke -name "*.abc" | sort |
|
|
|
|
while read filename
|
|
|
|
do
|
2016-11-02 00:21:18 +00:00
|
|
|
$dir/abctemplate.py --latex --value "graphicsdir=$graphicsdir" --template $dir/dottes.tex.tune $filename >> $tunesoutput
|
|
|
|
$dir/abctemplate.py --latex --value "graphicsdir=$graphicsdir" --template $dir/dottes.tex.firstline-tune $filename >> $indexoutput
|
2013-06-26 23:37:45 +01:00
|
|
|
done
|