]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix and document usage of `convert-ly - < test.ly'.
authorJulien Rioux <jrioux@physics.utoronto.ca>
Tue, 20 Nov 2012 15:58:43 +0000 (10:58 -0500)
committerJulien Rioux <jrioux@physics.utoronto.ca>
Fri, 23 Nov 2012 20:36:56 +0000 (15:36 -0500)
scripts/convert-ly.py

index e14a137f97a71e2cad18e2aecf1e8aa8bff3ab8a..7acd2e29dac7ee1f908a9bc0f5ec50131d798041 100644 (file)
@@ -45,6 +45,9 @@ lilypond_version_strict_re = re.compile (lilypond_version_strict_re_str)
 help_summary = (
 _ ('''Update LilyPond input to newer version.  By default, update from the
 version taken from the \\version command, to the current LilyPond version.''')
++ "\n"
++ _ ("If FILE is `-', read from standard input.")
++ "\n\n"
 + _ ("Examples:")
 + '''
   $ convert-ly -e old.ly
@@ -334,10 +337,10 @@ def main ():
 
     errors = 0
     for f in files:
-        if f == '-':
-            continue
         f = f.decode (sys.stdin.encoding or "utf-8")
-        if not os.path.isfile (f):
+        if f == '-':
+            f = ''
+        elif not os.path.isfile (f):
             ly.error (_ (u"%s: Unable to open file") % f)
             errors += 1
             continue