Re: Frescobaldi custom script

2014-10-27 Thread Urs Liska


Am 26.10.2014 18:28, schrieb Joram:
To explain my use case a bit more: My purpose is to provide a single 
file, a list of files or (main usage) a file containing a list of all 
files for a project. The script then produces pdf midi output, the 
latter for each voice separately. The midi output is converted to mp3 
or ogg. These scores and audio files are zipped and prepared for 
uploading on the choir web page and the html snippet is prepared.


In my opinion, this is a nice example how LilyPond is suitable for an 
integrated workflow and cooperation of different tools. Once this is 
more mature it might also be interesting for a post on the lilypondblog.
Definitely. You can just write something when you're ready, and then 
email us when you have saved the post as pending.


Urs

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-26 Thread Vaughan McAlley
On 25 October 2014 20:35, Davide Liessi davide.lie...@gmail.com wrote:
 However I think that having the possibility to define custom compilers
 would be very useful.


Sorry if I’m wrong, but can’t you type anything you like into
Frescobaldi’s Engrave (Custom) command line window? Something like:

python ~/scripts/myLilypondScript.py $filename

...should run the script and pass it the filename, however that works in Python.

There are two issues I have at the moment- one is that it doesn’t seem
to be possible to direct Lilypond output to stdout (Postscript in my
case for piping to Ghostscript with lots of special options), and the
second is that Frescobaldi forgets the custom command every time it
quits, so you have to store it elsewhere.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-26 Thread Peter Bjuhr


On 2014-10-26 13:31, Vaughan McAlley wrote:

Sorry if I’m wrong, but can’t you type anything you like into
Frescobaldi’s Engrave (Custom) command line window? Something like:

python ~/scripts/myLilypondScript.py $filename

...should run the script and pass it the filename, however that works in Python.


The command line window is of course expecting a command to run 
LilyPond. The flexibility of changing the command that is executed is 
thought for custom LilyPond calls. But as I understand it any command 
would be executed. The advantage is that you can make use of the 
shortcut $filename for the current document. Otherwise it's hard to see 
any benefits of that approach, I think.


There are two issues I have at the moment- one is that it doesn’t seem
to be possible to direct Lilypond output to stdout (Postscript in my
case for piping to Ghostscript with lots of special options), and the
second is that Frescobaldi forgets the custom command every time it
quits, so you have to store it elsewhere.


The ability to save a custom commands could perhaps be argued. At the 
moment the command is construed by the other settings.


To catch the stdout message I think the best approach is to run the 
python script as a Snippet and to add the functionality to handle this.


Best
Peter

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-26 Thread Joram



However I think that having the possibility to define custom compilers
would be very useful.



Sorry if I’m wrong, but can’t you type anything you like into
Frescobaldi’s Engrave (Custom) command line window? Something like:

python ~/scripts/myLilypondScript.py $filename

...should run the script and pass it the filename, however that works in Python.


Yes, that’s what I tried yesterday, too. And it works. This is actually 
pretty close to what I want. It also puts the output in the output 
window, very nicely.


The only thing is: I can’t have such an entry in the menu in addition to 
the custom engraving item and (more important) it is reverted once I 
restart Frescobaldi, so I have to enter the command again.


The suggestion with the snippets works. There is no standard output 
within Frescobaldi, though.


I can live with the second solution, but having a persistent additional 
custom compile would be even better – perhaps with a dropdown version of 
the compile button from which different compiles can be chosen.




To explain my use case a bit more: My purpose is to provide a single 
file, a list of files or (main usage) a file containing a list of all 
files for a project. The script then produces pdf midi output, the 
latter for each voice separately. The midi output is converted to mp3 or 
ogg. These scores and audio files are zipped and prepared for uploading 
on the choir web page and the html snippet is prepared.


In my opinion, this is a nice example how LilyPond is suitable for an 
integrated workflow and cooperation of different tools. Once this is 
more mature it might also be interesting for a post on the lilypondblog.


Cheers,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-26 Thread Urs Liska
See https://github.com/wbsoft/frescobaldi/issues/512

Am 26. Oktober 2014 18:28:01 MEZ, schrieb Joram noeck.marb...@gmx.de:

 However I think that having the possibility to define custom
compilers
 would be very useful.


 Sorry if I’m wrong, but can’t you type anything you like into
 Frescobaldi’s Engrave (Custom) command line window? Something like:

 python ~/scripts/myLilypondScript.py $filename

 ...should run the script and pass it the filename, however that works
in Python.

Yes, that’s what I tried yesterday, too. And it works. This is actually

pretty close to what I want. It also puts the output in the output 
window, very nicely.

The only thing is: I can’t have such an entry in the menu in addition
to 
the custom engraving item and (more important) it is reverted once I 
restart Frescobaldi, so I have to enter the command again.

The suggestion with the snippets works. There is no standard output 
within Frescobaldi, though.

I can live with the second solution, but having a persistent additional

custom compile would be even better – perhaps with a dropdown version
of 
the compile button from which different compiles can be chosen.



To explain my use case a bit more: My purpose is to provide a single 
file, a list of files or (main usage) a file containing a list of all 
files for a project. The script then produces pdf midi output, the 
latter for each voice separately. The midi output is converted to mp3
or 
ogg. These scores and audio files are zipped and prepared for uploading

on the choir web page and the html snippet is prepared.

In my opinion, this is a nice example how LilyPond is suitable for an 
integrated workflow and cooperation of different tools. Once this is 
more mature it might also be interesting for a post on the
lilypondblog.

Cheers,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-25 Thread Peter Bjuhr


On 2014-10-24 15:01, Noeck wrote:

Hi,

I have a question concerning Frescobaldi: Is it possible to run a custom
script (bash/python) from Frescobaldi.

This would be my use case:
I have a script that runs lilypond and then timidity and other tools to
get ogg rehearsal files which are then packed in zip files.
If I could run it from within Frescobaldi that would be cool.

If I had a button or menu entry in Frescobaldi that runs it, and
displays the output in the protocol area and the progress with the
progress bar, that would be even better.

Does anyone know if something like this is possible?

Cheers,
Joram


Hi Joram,

you can run a python script as a Snippet (Tools - Snippets). If it's 
possible to implement in detail is hard for me to say (without seeing 
your code), but I think that is what you could try if you want to do it 
within Frescobaldi.


Best
Peter

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-25 Thread Urs Liska


Am 25.10.2014 10:41, schrieb Peter Bjuhr:


On 2014-10-24 15:01, Noeck wrote:

Hi,

I have a question concerning Frescobaldi: Is it possible to run a custom
script (bash/python) from Frescobaldi.

This would be my use case:
I have a script that runs lilypond and then timidity and other tools to
get ogg rehearsal files which are then packed in zip files.
If I could run it from within Frescobaldi that would be cool.


Wouldn't it be possible to even run this from within LilyPond itself? It 
should be possible to run external code from a Scheme function, isn't 
it? Then it should also be possible to make that run upon compilation. 
No idea how to approach that, though.



If I had a button or menu entry in Frescobaldi that runs it, and
displays the output in the protocol area and the progress with the
progress bar, that would be even better.

Does anyone know if something like this is possible?

Cheers,
Joram


Hi Joram,

you can run a python script as a Snippet (Tools - Snippets). If it's 
possible to implement in detail is hard for me to say (without seeing 
your code), but I think that is what you could try if you want to do 
it within Frescobaldi.


Yes, I also think you should be able to access the outer world of shell 
processes through Python that way.
This wouldn't give you a menu entry (although you *could* even do that 
for your own copy if you run Frescobaldi from its Git repository) but 
you can assign a keyboard shortcut to a snippet.


Best
Urs


Best
Peter

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-25 Thread Davide Liessi
Hi.

2014-10-25 10:41 GMT+02:00 Peter Bjuhr peterbj...@gmail.com:
 you can run a python script as a Snippet (Tools - Snippets). If it's
 possible to implement in detail is hard for me to say (without seeing your
 code), but I think that is what you could try if you want to do it within
 Frescobaldi.

I think that what Joram is thinking about is being able to define
different compilers in Frescobaldi that point to arbitrary programs,
similar to different compilers in LaTeX editors...

2014-10-25 11:06 GMT+02:00 Urs Liska u...@openlilylib.org:
 Wouldn't it be possible to even run this from within LilyPond itself? It
 should be possible to run external code from a Scheme function, isn't it?
 Then it should also be possible to make that run upon compilation. No idea
 how to approach that, though.

... and I think that this belongs to the editor and not to LilyPond.

2014-10-24 15:01 GMT+02:00 Noeck noeck.marb...@gmx.de:
 I have a question concerning Frescobaldi: Is it possible to run a custom
 script (bash/python) from Frescobaldi.

At the moment the only easy solution is using Snippets, as Peter said.
However I think that having the possibility to define custom compilers
would be very useful.
I'll open an issue on Frescobaldi's GitHub tracker about this.

Best wishes.
Davide

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Frescobaldi custom script

2014-10-25 Thread Davide Liessi
2014-10-25 11:35 GMT+02:00 Davide Liessi davide.lie...@gmail.com:
 I'll open an issue on Frescobaldi's GitHub tracker about this.

https://github.com/wbsoft/frescobaldi/issues/512

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Frescobaldi custom script

2014-10-24 Thread Noeck
Hi,

I have a question concerning Frescobaldi: Is it possible to run a custom
script (bash/python) from Frescobaldi.

This would be my use case:
I have a script that runs lilypond and then timidity and other tools to
get ogg rehearsal files which are then packed in zip files.
If I could run it from within Frescobaldi that would be cool.

If I had a button or menu entry in Frescobaldi that runs it, and
displays the output in the protocol area and the progress with the
progress bar, that would be even better.

Does anyone know if something like this is possible?

Cheers,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user