lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond source code indenter and formatter


From: Colin Hall
Subject: Re: Lilypond source code indenter and formatter
Date: Thu, 7 Jun 2012 01:49:49 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Jun 07, 2012 at 01:20:08AM +0100, Graham Percival wrote:
> On Thu, Jun 07, 2012 at 12:44:00AM +0100, Colin Hall wrote:
> > 
> > Is anyone on the list aware of a tool that takes a valid Lilypond
> > score as input and produces as output the same .ly file but with the
> > formatting and layout standardized?
> 
> Yes and no.  Various editors can do this.
> http://code.google.com/p/lilypond/issues/detail?id=777
> 
> Frescobaldi has a script to do it (see the issue), but it's not
> clear if it can be run independently or not.

It seems to be equipped to run as a program:

lgc$ wget 
http://lilykde.googlecode.com/svn/trunk/frescobaldi/python/ly/indent.py
lgc$
lgc$ python -V
Python 2.6.5
lgc$
lgc$ python indent.py -t 2 Heidenroeslein.ly
Traceback (most recent call last):
  File "indent.py", line 252, in <module>
    startscheme=options.scheme
  File "indent.py", line 107, in indent
    usetabs = '\t' in space or '\n\t' in text
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: 
ordinal not in range(128)
lgc$

I don't have experience with python Unicode support. Is 2.6.5 new enough for 
this to work?

> As implied by that issue and
> http://code.google.com/p/lilypond/issues/detail?id=1432 , it would
> be great if we had such a script, and I'd hope to ship it as part of
> lilypond.  And, of course, run it on all our files in git and all
> the docs.

Exactly. My intended application is to use it as part of a git
collaboration workflow that Urs, Janek, Susan(?) and I are working on.

Cheers,
Colin.

-- 

Colin Hall



reply via email to

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