view makeGraphics.sh @ 282:ced1d1ba42f6

Various revisions of printed book presentation. 1. Purple background on the front and and new blank back pages. 2. UK English for hyphenation and date presentation. 3. Dedication and 'About Havoc' section. 4. Footer just page number in centre of page. 5. Revised copyright discussion. 6. Since it's a book, make content, intro and first lines to chapters. And prompt individual tunes to sections. 7. Omit 'Tunes' chapter heading. It doesn't look good in A5.
author Jim Hague <jim.hague@acm.org>
date Fri, 05 Jul 2013 18:56:34 +0100
parents 295ba8275ab4
children 67dc98ae4816
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.pdf $graphicsdir/${name}.eps

        # and make the first line graphic.
        $dir/abcfirstline.py $filename > firstline.abc
        abcm2ps +c -M +Q -E -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.pdf $graphicsdir/firstline-${name}.eps
    done