comparison makeGraphics.sh @ 748:ce5c7214f9aa

Introduce mechanism for having different tune images for compact printed output. Sort alternate .abc in subdir 'Compact' under the booke dir. Use that as the graphic for A5 output, assuming it will be vertically more compact. Use Bear Dance as an example, as it has commentary that currently overflows an A5 landscape page. For the moment, transposed Bookes don't transpose and so don't use Compact.
author Jim Hague <jim.hague@acm.org>
date Fri, 13 Oct 2017 15:44:15 +0100
parents aa803fd1c3a6
children b83b49f2a0a0
comparison
equal deleted inserted replaced
746:34c7947b4542 748:ce5c7214f9aa
15 graphicsdir=$dir/graphics/$1 15 graphicsdir=$dir/graphics/$1
16 16
17 mkdir -p $graphicsdir 17 mkdir -p $graphicsdir
18 18
19 # Now, for each tune, make the tune graphic. 19 # Now, for each tune, make the tune graphic.
20 find $booke -name "*.abc" | sort | 20 find $booke -depth 1 -name "*.abc" | sort |
21 while read filename 21 while read filename
22 do 22 do
23 name=`basename $filename .abc` 23 name=`basename $filename .abc`
24 24
25 # Make the tune graphic. 25 # Make the tune graphic.
40 epstopdf --outfile=$graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-${name}.eps 40 epstopdf --outfile=$graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-${name}.eps
41 # And crop it, so the graphic is as big as possible on the page. 41 # And crop it, so the graphic is as big as possible on the page.
42 pdfcrop $graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-$name.pdf 42 pdfcrop $graphicsdir/firstline-$name-tocrop.pdf $graphicsdir/firstline-$name.pdf
43 rm $graphicsdir/firstline-$name-tocrop.pdf 43 rm $graphicsdir/firstline-$name-tocrop.pdf
44 done 44 done
45
46 # And make any compact tune graphics.
47 if [ ! -d ${booke}/Compact ]; then
48 exit
49 fi
50
51 find ${booke}/Compact -depth 1 -name "*.abc" | sort |
52 while read filename
53 do
54 name=`basename $filename .abc`
55
56 # Make the tune graphic.
57 abcm2ps -E -F singletune -O $graphicsdir/compact-${name}.eps $filename
58 # Make $name.eps so we can build with LaTeX.
59 mv $graphicsdir/compact-${name}001.eps $graphicsdir/compact-${name}.eps
60 # And make the corresponding PDF.
61 epstopdf --outfile=$graphicsdir/compact-${name}-tocrop.pdf $graphicsdir/compact-${name}.eps
62 # And crop it, so the graphic is as big as possible on the page.
63 pdfcrop $graphicsdir/compact-${name}-tocrop.pdf $graphicsdir/compact-${name}.pdf
64 rm $graphicsdir/compact-${name}-tocrop.pdf
65 done