lilypond-user
[Top][All Lists]
Advanced

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

Re: preprocessing an included file with system command


From: David Raleigh Arnold
Subject: Re: preprocessing an included file with system command
Date: Mon, 17 Oct 2011 11:31:48 -0400

On Sat, 2011-10-01 at 14:13 -0400, Michael Ellis wrote:
> For anyone who wants to make use of it, I've attached a short python
> script I wrote this morning for general purpose monitoring of files
> with given extensions in an arbitrary list of directories.  Should be
> self-explanatory to python hackers and adaptable to any application
> where you need to detect file changes automatically and apply some
> processing that creates a derived file.
> 
> 
> Works on OS X or Linux.  Should work on Windows, too, but I haven't
> tried it.
> 
> 
> For me, this ameliorates the problem I posed in the original post. 
> 
> 
> But I still think LilyPond could benefit by adding some simple text
> macro capability :-)
> 
> Cheers,
> Mike

You can reduce typing and maintenance by putting your shell
script(s) in the working directory of your project, like

$ ./up

If you are as lazy as I am, you might even put something like
this in your path:

#!/bin/bash
# up: invoke local "up"
./up

Then you bring up the whole thing without arguments, or an individual
voice with its argument, which is a big help with a big file. IAC your
script can change and adapt along with your project.

Also, an editor that features the ability to run a bash, sed,
awk, or any executable on selected text is desirable. Emacs and nedit
can do it. I don't know how many others can. This is the
best way IMO to paste pitch lists into repeated patterns, do octave
transpositions, and other things which only involve sections of your
file, or which won't be done again.

It would be a great feature for any lilypond editor.

Regards, daveA





reply via email to

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