[Top][All Lists]

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

Re: adding to the LSR

From: Jonathan Kulp
Subject: Re: adding to the LSR
Date: Wed, 29 Apr 2009 11:37:11 -0500
User-agent: Thunderbird (X11/20090318)

Carl D. Sorensen wrote:
This was a very simple script.  I learned a good bit of scripting with
the help of Patrick Horgan a while back when I was writing my lily2image
script.  Here's the script for any interested folks (first I did
"convert-ly -e *.ly" on the whole directory):


# Run Lilypond on a lot of files and save #
# the terminal output in text files       #

for LILYFILE in *.ly
   STEM=$(basename "$LILYFILE" .ly)
   echo "running $LILYFILE..."
   lilypond --format=png "$LILYFILE" >& "$STEM".txt
   rm "$STEM".ps

Cool!  I still think that you ought to put it all (including the grep part)
into a single script and store it in the source tree.  And it ought to be
added to the CG so that we have it tracked for the next time we release a
stable version (I assume it will happen quickly, once Graham gets home from
Singapore -- although maybe going to Scotland doesn't qualify as "home").

I'd be very pleased if it were added to the CG and source tree but I don't have the push privileges to put it there, so I'll attach it to this email with the name "check-snippets". I didn't put the "convert-ly -e" command into the script because for reasons unknown to me I feel like it belongs as a separate process. I did stick the grep command in at the end and tested it again--works just fine. :) I wasn't certain whether it would wait until all the files had been run before grepping but it did. It finished looping and then moved on to the grep command.

I looked through the script and I feel now as though I need to learn some Python. I especially like the way it deals with command-line options--much more intuitive than what I've been doing with bash scripting. Maybe I'll experiment a bit with the convert-ly rules on my own copy of the script and see what I can learn. :)

Jonathan Kulp

Attachment: check-snippets
Description: Text document

reply via email to

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