Batch conversion from the command line
Currently to convert a given file to PNG and PDF we need to call MuseScore twice on the command line. It costs time to init MuseScore. What about having the possibility to do
mscore -a filename.json
With filename.json
[
{ in:"toto.mscz", out:"toto.png"}
{ in:"fsf.mscz", out:"toto.pdf"}
{ in:"sdf.mscz", out:"toto.mxl"}
{ in:"fdfdf.mscz", out:"toto.png"}
{ in:"fff.mscz", out:"toto.png"}
]
Comments
Or use the Batch convert plugin?
This could be useful, but perhaps there is a way to keep MuseScore running and listening for commands in the background so that it doesn't have to be started fresh each time?
On Linux, if I do this:
And then this from a new Terminal window without quitting MuseScore.
The result is file1.mscz and file2.mscz are displayed in separate tabs of the same MuseScore window. The the second file appears to open faster than the first one (at least the splash image doesn't appear the second time).
Perhaps there is a way to do something similar with batch conversion? Something like:
The --noquit command could timeout if no commands were received for 5 seconds and then MuseScore would quit anyway.
This would be easier to automate via a bash script than the JSON method, but I suppose the JSON method might still be useful for situations where MuseScore is running on a webserver.
Just so you know, this FR comes from the vtests. Currently to render all the vtests we need to run MuseScore several dozen of times on travis. It would be cool to do it one go.
Other json proposal
[
{ in:"toto.mscz", out: ["toto.png", "toto.pdf"]}
{ in:"sdf.mscz", out:["toto.mxl"]}
{ in:"fdfdf.mscz", out:["to.png"]}
{ in:"fff.mscz", out:["tot.png"]}
]
Done https://github.com/musescore/MuseScore/commit/d38d2345bbac64baaa38b26a1…
Automatically closed -- issue fixed for 2 weeks with no activity.