lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A small script


From: Atte André Jensen
Subject: A small script
Date: Thu, 29 May 2003 13:10:36 +0200

I wrote a (very) modest but quite handy bash script that puts all .ly
files in the current directory into one big .pdf-file with twosided
pagenumbering. Thought someone else might find it usefull, maybe it
could even be stuck somewhere in the documentation...

It uses ly2dvi (of course), texexec and pdfinfo.

-- begin bash --
#!/bin/bash
start=1;
for i in *.ly; do
        ly2dvi --pdf --set=latexoptions=twoside --set=pagenumber=$start
$i
        this=$(pdfinfo `basename $i .ly`.pdf|grep Pages|awk '{print
$2;}');
        start=`expr $this + $start`;
        rm `basename $i .ly`.ps;
        rm `basename $i .ly`.dvi;
done
rm out.pdf
texexec --pdfarrange --result=out.pdf `ls *.pdf`
rm texexec.*
rm mp*
rm *.log
-- end bash --

-- 
peace, love & harmony
Atte




reply via email to

[Prev in Thread] Current Thread [Next in Thread]