Mercurial > dottes
view makeGraphics.sh @ 370:ecc62b487e57 build-default-165
Some empty "" chords may be causing trouble with Jenkins.
Jenkins builds are stalling when generating PDFs for some morris tunes. I suspect the problem
may be an empty chord "" and abc2abc's attempt to transpose it.
I've been meaning to remove the chords from the horn output, because abc2abc transposes them too,
which renders them not terribly useful. So get on and do it. Also remove "" from the morris
tunes where it occurs.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Wed, 28 Aug 2013 14:57:11 +0100 |
parents | aa803fd1c3a6 |
children | ce5c7214f9aa |
line wrap: on
line source
#!/bin/bash # # Make the tune graphics, EPS, PDF required by web and book into # graphics/<book>. # if [ $# != 1 ]; then echo "Usage: makeGraphics.sh <book dir name>" exit 1 fi dir=`pwd` booke=$dir/$1 graphicsdir=$dir/graphics/$1 mkdir -p $graphicsdir # Now, for each tune, make the tune graphic. find $booke -name "*.abc" | sort | while read filename do name=`basename $filename .abc` # Make the tune graphic. abcm2ps -E -F singletune -O $graphicsdir/$name.eps $filename # Make $name.eps so we can build with LaTeX. mv $graphicsdir/${name}001.eps $graphicsdir/${name}.eps # And make the corresponding PDF. epstopdf --outfile=$graphicsdir/$name-tocrop.pdf $graphicsdir/${name}.eps # And crop it, so the graphic is as big as possible on the page. pdfcrop $graphicsdir/$name-tocrop.pdf $graphicsdir/$name.pdf rm $graphicsdir/$name-tocrop.pdf # and make the first line graphic. $dir/abcfirstline.py $filename > firstline.abc abcm2ps -E -F firstline -O $graphicsdir/firstline-$name.eps firstline.abc mv $graphicsdir/firstline-${name}001.eps $graphicsdir/firstline-${name}.eps rm firstline.abc epstopdf --outfile=$graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-${name}.eps # And crop it, so the graphic is as big as possible on the page. pdfcrop $graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-$name.pdf rm $graphicsdir/firstline-$name-tocrop.pdf done