A General-Purpose Makefile for Batch Processing MuseScore Files
Hi,
Attached is an early version of a general purpose Makefile for automatically generating various forms of document from .mscz sources.
Just copy the Makefile into a directory containing MuseScore files and type 'make help' to see what types of file can be automatically generated. Currently the script should generate FLAC, MIDI, mxl, xml, PDF and OGG files. eg. 'make pdf' will invoke MuseScore to convert all .mscz files in the current directory into .pdf files.
N.B. I had to rename the Makefile to Makefile.txt to upload it here - you should rename it to just Makefile in order to use it.
There are loads of ways of doing this kind of thing, the nice thing about using Make is that it will regenerate whatever is appropriate after any source (.mscz in this case) file change.
I expect I'll refine this more over the next few weeks.
Hope someone else finds it useful - I use it on Ubuntu 12, it should work on any platform that supports GNU Make.
Steve
Attachment | Size |
---|---|
Makefile.txt | 2.11 KB |
Comments
Definitely nice, especially for Linux users who are more accustomed to running command line utilities like "make". Meanwhile, as for the "loads of ways of doing this kind of thing", note there is also the Batch Export plugin available via the repository that is quite similar.
In reply to Definitely nice, especially by Marc Sabatella
As Marc mentioned, the Batch Export plugin should do this too. See also the discussion that lead to that plugin, I started doing this with make as well.
That plugin meanwhile evolvend into a batch converter...
There are some serious restriction and disadvantages to the make method though:
One advantage, the make method works in the current nightly builds, the plugin does not. But there's hope this can get fixed before the final 2.0 hits the street ;-)
Pleaser give the plugin a try on Linux, if it doesn't work there, tell Marc and me and we'll try to fix that.
Also feedback about possible improvements are welcome
In reply to As Marc mentioned, the Batch by Jojo-Schmitz
Hi,
Your plugin sounds really useful, but I seem to have talked myself into using the 2.0 series now - so the plugin is a bit of a moot point at the moment :-/
Some thoughts though:
Nevertheless, I look forward to using the plugin when it gets into the 2.0 series, it will definitely be a boon.
In reply to Hi, Your plugin sounds really by SteveMerrony
I've tried to fix the 'blanks in filernames' problem and after much googling I gave up, seems the general consensus was that make can't do this in any usefull form. So I'm still using _ instead, even thoughthe plugin doesn't need it.
Another advantage of the plugin: in can travers a whole directory tree.
Actuylla the lack of being able to use this plugin currently keeps me from using 2.0...
But yes, for the currently nightly builds a makefile is the way tro go. You may want to have a look at my makefile in that other thread I mentioned, and combine some of its ideas into your's?
In reply to I've tried to fix the 'blanks by Jojo-Schmitz
Hi,
I've continued to refine the Makefile as I use it quite a lot.
Here is a new version with the following changes...
Performance: add quiet flags (c.20% faster on test machine)
New Feature: 'backup' target
New Feature: 'book' target
New Feature: LilyPond, PostScript & SVG generation
New Feature: look for style (.mss) file and apply it to LilyPondPDF/PS/XML generation
Improvement: better help (make help)
As before, I had to rename it to Makefile.txt to upload it to this site - rename it to Makefile before you try to use it.
Caveats: it's aimed at GNU users, it doesn't handle filenames containing spaces.