lilypond-user
[Top][All Lists]
Advanced

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

indent-ly


From: Martin Tarenskeen
Subject: indent-ly
Date: Tue, 20 Oct 2009 10:31:15 +0200 (CEST)
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)


Hi,

I have tried to write a tool in Python to (re-)indent lilypond source files. Something like indent ( for C/C++ ) or tidy ( for HTML ) but now with Lilypond in mind.

The tool can handle multiple inputfiles, and there is a commandline option that lets you specify how much spacecharacters to use for indentation, or to use TAB characters for that (= default behaviour).

First I tried to make it do a complete re-formatting of the input files (like indent and tidy can), changing newlines and empty lines and all that. But I abandoned that idea, to give the user more freedom to use and keep his/her own personal lilypond coding style, and to make things easier for me :-)

I think it does a nice job, but comments are welcome.
You get it here:

        http://www.home.zonnet.nl/m.tarenskeen/tmp/indent-ly


Known bugs:

I don't know if lilypond allows this, but indent-ly does not like something like:

\relative c' { c d e f | %{ a strange comment block {{{ in << << the middle of 
a line %} g a b c |
}

So please don't use such constructs ;-)

--


Martin Tarenskeen





reply via email to

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