Le 23/12/2010 18:05, Michael Ellis a écrit : > Hi Phil! Thanks for the encouragement. I'll try to respond to all your > questions later, but for now here's the python script I used to invoke > MuseScore (command line name is "mscore") on the files I downloaded from > Margaret Greentree's site. I'm running on a Mac with OS 10.6 so this should > work on Linux, too and possibly on Windows with appropriate changes to > accommodate the differences in path specs. > >> cat xml2ly.py > #!/usr/bin/env python > """ > Script that invokes mscore to convert MusicXml files in current directory > to Lilypond files. > """ > import os, sys > from subprocess import Popen > import glob > xmlfiles = glob.glob("*.xml") > > ## Replace with path to mscore on your system > mscore = "/Applications/MuseScore.app/Contents/MacOS/mscore" > > for x in xmlfiles: > print "Converting %s ..."%x > ly = os.path.splitext(x)[0] + ".ly" > cmd = "%(mscore)s %(x)s -o %(ly)s"%locals() > print cmd > p = Popen(cmd,shell=True) > p.wait() > print "Done" > > > > Cheers, > Mike
Thanks Michael for sharing it. I will try it later on my Gentoo-Linux. Cheers. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user