X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=buildscripts%2Fmakelsr.py;h=f8ba3b0fb5810ef0a53ef7be8f8fa791ea40b96c;hb=e123c55b63ffdf006eeb8d24a2e0809ec49f1bfc;hp=e959eef31c2ccacbf77aea0b0ef2a9e603597fff;hpb=bfd558c5a733c556a77ae74d5ba439840b86cbd6;p=lilypond.git diff --git a/buildscripts/makelsr.py b/buildscripts/makelsr.py index e959eef31c..f8ba3b0fb5 100755 --- a/buildscripts/makelsr.py +++ b/buildscripts/makelsr.py @@ -4,7 +4,8 @@ import os import os.path import shutil -dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitches','repeats','scheme','spacing','staff','text','vocal','other'] +dirs = ['pitches'] +#dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitch','repeats','scheme','spacing','staff','text','vocal','other','nonmusic','engravers','instrument'] notsafe=[] try: @@ -19,16 +20,23 @@ def copy_with_warning(src, dest): def copy_dir_with_test(srcdir, destdir): + global notsafe + global notconvert if not(os.path.exists(srcdir)): return file_names = os.listdir (srcdir) for file in file_names: if (file.endswith ('.ly')): src = os.path.join (srcdir, file) - dest = os.path.join (destdir, file) + destname = file.replace (';', '-') + dest = os.path.join (destdir, destname) copy_with_warning(src, dest) os.system('convert-ly -e ' + dest) - s = os.system('lilypond -dsafe -dbackend=svg -o /tmp/lsrtest ' + dest) + if os.path.exists( dest + '~' ): + os.remove( dest + '~' ) + # the -V seems to make unsafe snippets fail nicer/sooner. + s = os.system('nice lilypond -V -dno-print-pages -dsafe -o /tmp/lsrtest ' + dest) + #s = os.system('nice lilypond -dno-print-pages -dsafe -o /tmp/lsrtest ' + dest) if s: notsafe.append(dest) @@ -45,8 +53,7 @@ for dir in dirs: file_names = os.listdir (destdir) for file in file_names: if (file.endswith ('.ly')): - if (file[:3] != 'AAA'): - os.remove( os.path.join(destdir,file) ) + os.remove( os.path.join(destdir,file) ) ## copy in new files from LSR download copy_dir_with_test( srcdir, destdir ) ## copy in new files in source tree @@ -57,6 +64,7 @@ file=open("lsr-unsafe.txt", 'w') for s in notsafe: file.write(s+'\n') file.close() + print print print "Unsafe files printed in lsr-unsafe.txt: CHECK MANUALLY!"