changeset 321:b61c39beac5f

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.
author Jim Hague <jim.hague@acm.org>
date Wed, 17 Jul 2013 18:28:07 +0100
parents c0262e58abf6
children b4a0161e8870
files makeWeb.sh makeWebGraphics.sh singletuneweb.fmt
diffstat 3 files changed, 26 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/makeWeb.sh	Tue Jul 16 17:21:42 2013 +0100
+++ b/makeWeb.sh	Wed Jul 17 18:28:07 2013 +0100
@@ -78,10 +78,7 @@
             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.
--- a/makeWebGraphics.sh	Tue Jul 16 17:21:42 2013 +0100
+++ b/makeWebGraphics.sh	Wed Jul 17 18:28:07 2013 +0100
@@ -30,4 +30,9 @@
 
         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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/singletuneweb.fmt	Wed Jul 17 18:28:07 2013 +0100
@@ -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