Re: frescobaldi extensions [was: python-ly, ly.indent]

2019-08-19 Thread mason
On 08/18, Urs Liska wrote: > Hi Mason, > > 18. August 2019 01:05, ma...@masonhock.com schrieb: > > > On 08/17, Urs Liska wrote: > > > >> ... > > > > Thanks. While I personally prefer command line tools, I would consider > > turning this into a Frescobaldi extension if that would mean the > >

Re: frescobaldi extensions [was: python-ly, ly.indent]

2019-08-18 Thread Wols Lists
On 18/08/19 09:00, Urs Liska wrote: > Hi Mason, > > 18. August 2019 01:05, ma...@masonhock.com schrieb: > >> > On 08/17, Urs Liska wrote: >> > >>> >> ... >> > >> > Thanks. While I personally prefer command line tools, I would consider >> > turning this into a Frescobaldi extension if that

Re: frescobaldi extensions [was: python-ly, ly.indent]

2019-08-18 Thread Urs Liska
Hi Mason, 18. August 2019 01:05, ma...@masonhock.com schrieb: > On 08/17, Urs Liska wrote: > >> ... > > Thanks. While I personally prefer command line tools, I would consider > turning this into a Frescobaldi extension if that would mean the > difference between something only being useful to

frescobaldi extensions [was: python-ly, ly.indent]

2019-08-17 Thread mason
On 08/17, Urs Liska wrote: > I can't promise it will eventually pay off in terms of effort, but I' > definitely encourage you to have a look at Frescobaldi's extension API, which > has been merged to master and will be available in the next release (whenever > that will be). It allows you to

Re: python-ly, ly.indent

2019-08-17 Thread Urs Liska
[Including the list again] 17. August 2019 21:16, ma...@masonhock.com schrieb: > I currently manage my Lilypond projects with bash scripts that piece > together all of the files to build the score and parts in different > editions, page sizes, etc. Here's an example.[1] The automation has > many

Re: python-ly, ly.indent

2019-08-17 Thread mason
I currently manage my Lilypond projects with bash scripts that piece together all of the files to build the score and parts in different editions, page sizes, etc. Here's an example.[1] The automation has many advantages, but it's very messy. I'm using files and directory structures as a

Re: python-ly, ly.indent

2019-08-17 Thread Urs Liska
Hi Mason, great that it really worked how I thought it should :-) May I ask what you are doing this for? Best Urs 17. August 2019 19:25, ma...@masonhock.com schrieb: > Thanks Urs, > > Seeing how the Document and Cursor classes are used there was enough to > put me on the right track. I've

Re: python-ly, ly.indent

2019-08-17 Thread mason
Thanks Urs, Seeing how the Document and Cursor classes are used there was enough to put me on the right track. I've achieved what I was going for with this: %%% begin test.py %%% import ly.document import ly.indent music = '''\\new Staff << \\relative c' { c4 c c c } | >>>''' d =

Re: python-ly, ly.indent

2019-08-17 Thread Urs Liska
Just shortly: does https://github.com/frescobaldi/python-ly/blob/master/ly/cli/main.py and https://github.com/frescobaldi/python-ly/blob/master/ly/cli/command.py#L116 help you further? I thought it would be best to look how the ly command line program does it. Urs Am 17. August 2019

python-ly, ly.indent

2019-08-16 Thread mason
Hi all, The command line tools provided by python-ly are very convenient and easy to use, but I'm finding it a little harder to wrap my head around the Python module. For example, it is easy to automatically indent a file with $ ly "indent" file.ly or to indent the output of another command