X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fetf2ly.py;h=0e7fb9c83e6fd9c7af8c33a83077680901646c05;hb=d8da8de0e71f64dfc2711654bba3709fc4fbfc4b;hp=5377727d80f6da893ccd0225bc902dee9e513a01;hpb=9d9e2e5637e06d98245c3395b58207ec173e7e7d;p=lilypond.git diff --git a/scripts/etf2ly.py b/scripts/etf2ly.py index 5377727d80..0e7fb9c83e 100644 --- a/scripts/etf2ly.py +++ b/scripts/etf2ly.py @@ -1,5 +1,20 @@ #!@TARGET_PYTHON@ +# This file is part of LilyPond, the GNU music typesetter. +# +# LilyPond is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# LilyPond is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LilyPond. If not, see . + # info mostly taken from looking at files. See also # http://lilypond.org/wiki/?EnigmaTransportFormat @@ -34,6 +49,9 @@ import os program_name = sys.argv[0] +authors = ('Jan Nieuwenhuizen ', + 'Han-Wen Nienhuys ') + version = '@TOPLEVEL_VERSION@' if version == '@' + 'TOPLEVEL_VERSION' + '@': version = '(unknown version)' # uGUHGUHGHGUGH @@ -508,7 +526,7 @@ class Frame: if left[0]: str = str + rational_to_lily_skip (left) - str = str + ' | \n' + str = str + ' |\n' return str def encodeint (i): @@ -615,7 +633,7 @@ class Staff: fr = m.frames[x] except IndexError: sys.stderr.write ("Skipping nonexistent frame %d\n" % x) - laystr = laystr + "%% non existent frame %d (skipped) \n" % x + laystr = laystr + "%% non existent frame %d (skipped)\n" % x if fr: first_frame = fr if gap <> (0,1): @@ -1113,11 +1131,13 @@ class Etf_file: while c and c.number <> endno: - thread.append (c) + d = c # hack to avoid problem with build/scripts/grand-replace.py + thread.append (d) c = c.next if c: - thread.append (c) + d = c # hack to avoid problem with build/scripts/grand-replace.py + thread.append (d) return thread @@ -1162,23 +1182,22 @@ def identify(): def warranty (): identify () sys.stdout.write (''' -Copyright (c) %s by +%s - Han-Wen Nienhuys - Jan Nieuwenhuizen + %s %s %s -''' % ( '2001--2006', - _('Distributed under terms of the GNU General Public License.'), - _('It comes with NO WARRANTY.'))) - - +''' % ( _ ('Copyright (c) %s by') % '2001--2012', + '\n '.join (authors), + _ ('Distributed under terms of the GNU General Public License.'), + _ ('It comes with NO WARRANTY.'))) def get_option_parser (): p = ly.get_option_parser (usage=_ ("%s [OPTION]... ETF-FILE") % 'etf2ly', description=_ ("""Enigma Transport Format is a format used by Coda Music Technology's -Finale product. etf2ly converts a subset of ETF to a ready-to-use LilyPond file."""), +Finale product. etf2ly converts a subset of ETF to a ready-to-use LilyPond file. +"""), add_help_option=False) p.add_option("-h", "--help", action="help", @@ -1194,10 +1213,11 @@ Finale product. etf2ly converts a subset of ETF to a ready-to-use LilyPond file action='store_true', ), - p.add_option_group (ly.display_encode (_ ('Bugs')), - description=(_ ('Report bugs via') - + ''' http://post.gmane.org/post.php''' - '''?group=gmane.comp.gnu.lilypond.bugs\n''')) + p.add_option_group ('', + description=( + _ ('Report bugs via %s') + % 'http://post.gmane.org/post.php' + '?group=gmane.comp.gnu.lilypond.bugs') + '\n') return p def do_options ():