From 0bea7c9b59452a9c11e0f1b573807781f8fb6918 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Wed, 17 Jul 2013 18:28:07 +0100 Subject: [PATCH] Generate different tune PDF for web site download. For website download, generate a tune PDF with the tune title and composer. Seems a bit silly to download a PDF giving an anonymouse tune. --- makeWeb.sh | 5 +---- makeWebGraphics.sh | 5 +++++ singletuneweb.fmt | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 singletuneweb.fmt diff --git a/makeWeb.sh b/makeWeb.sh index 3d2ec62..cb8b9b7 100755 --- a/makeWeb.sh +++ b/makeWeb.sh @@ -78,10 +78,7 @@ find $bookedir -name "*.abc" | sort | changetitle=$retval fi - # Copy tune PDF from common graphics. - cp $graphicsdir/${name}.pdf $webdir - - # And copy the ABC. + # Copy the ABC into the web. cp $filename $webdir # Generate the tune web page. diff --git a/makeWebGraphics.sh b/makeWebGraphics.sh index 17f850a..b166213 100755 --- a/makeWebGraphics.sh +++ b/makeWebGraphics.sh @@ -30,4 +30,9 @@ find $booke -name "*.abc" | sort | mv $builddir/${tmpname}.png $builddir/${name}.png mv $builddir/firstline-${tmpname}.png $builddir/firstline-${name}.png + + # Make the web downloadable PDF with the tune title. + abcm2ps -E -F singletuneweb -O $builddir/$name.eps $filename + # And make the corresponding PDF. + epstopdf --outfile=$builddir/$name.pdf $builddir/${name}001.eps done diff --git a/singletuneweb.fmt b/singletuneweb.fmt new file mode 100644 index 0000000..2033fe5 --- /dev/null +++ b/singletuneweb.fmt @@ -0,0 +1,20 @@ +% Format for a web graphic with a single tune with tune title +botmargin 0 +leftmargin 0 +rightmarin 0 +topmargin 0 +scale 0.9 +titleformat T0 C1 +topspace 0 +% I don't want any info fields in the graphics. To turn off the +% fields, give a blank infoname for that letter. +infoname S +infoname R +infoname B +infoname D +infoname Z +infoname H +infoname N +infoline true +writehistory true +continueall false