+ path, lilypond = checkProg('a LilyPond -> EPS/PDF/PNG converter', ['lilypond'])
+ if (lilypond != ''):
+ version_string = cmdOutput("lilypond --version")
+ match = re.match('GNU LilyPond (\S+)', version_string)
+ if match:
+ version_number = match.groups()[0]
+ version = version_number.split('.')
+ if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 6):
+ addToRC(r'''\converter lilypond eps "lilypond -b eps --ps $$i" ""
+\converter lilypond png "lilypond -b eps --png $$i" ""''')
+ if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 9):
+ addToRC(r'\converter lilypond pdf "lilypond -b eps --pdf $$i" ""')
+ print '+ found LilyPond version %s.' % version_number
+ else:
+ print '+ found LilyPond, but version %s is too old.' % version_number
+ else:
+ print '+ found LilyPond, but could not extract version number.'
+ #
+ checkProg('a Noteedit -> LilyPond converter', ['noteedit --export-lilypond $$i'],
+ rc_entry = [ r'\converter noteedit lilypond "%%" ""', ''])
+ #