From 468619111ee6009098c318243e53d98cb884ef2c Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Tue, 20 Nov 2012 10:58:43 -0500 Subject: [PATCH] Fix and document usage of `convert-ly - < test.ly'. --- scripts/convert-ly.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index e14a137f97..7acd2e29da 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -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 -- 2.39.2