program_name = sys.argv[0]
-for d in ['@lilypond_datadir@',
- '@lilypond_libdir@']:
- sys.path.insert (0, os.path.join (d, 'python'))
-
-# dynamic relocation, for GUB binaries.
-bindir = os.path.abspath (os.path.split (sys.argv[0])[0])
-for p in ['share', 'lib']:
- datadir = os.path.abspath (bindir + '/../%s/lilypond/current/python/' % p)
- sys.path.insert (0, datadir)
-
+"""
+@relocate-preamble@
+"""
import lilylib as ly
global _;_=ly._
n = i.tell ()
i.seek (0,0)
except:
- sys.stderr.write ("can't open file: `%s'\n" % f)
+ sys.stderr.write ("cannot open file: `%s'\n" % f)
return ''
s = i.read (n)
if len (s) <= 0:
close_beam_state(state)
voices_append (bs)
if do_curly != '':
- voices_append("} }")
+ voices_append("} ")
do_curly = ''
return str
sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version))
authors = """
-Written by Han-Wen Nienhuys <hanwen@cs.uu.nl>, Laura Conrad
+Written by Han-Wen Nienhuys <hanwen@xs4all.nl>, Laura Conrad
<lconrad@laymusic.org>, Roy Rankin <Roy.Rankin@@alcatel.com.au>.
"""
print r"""abc2ly (GNU lilypond) %s""" % version
def get_option_parser ():
- p = ly.get_option_parser (usage='abc2ly [OPTIONS] FILE',
+ p = ly.get_option_parser (usage=_ ("%s [OPTION]... FILE") % 'abc2ly',
version="abc2ly (LilyPond) @TOPLEVEL_VERSION@",
- description=_('''This program converts ABC music files (see
-http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt) to LilyPond input.'''))
-
- p.add_option ('-o', '--output', metavar='FILE',help=_("set output filename to FILE"),
- action='store')
- p.add_option ('-s', '--strict', help=_("be strict about succes"),
- action='store_true')
- p.add_option ('-b', '--beams', help=_("preserve ABC's notion of beams"))
- p.add_option_group ('bugs',
- description='''Report bugs via http://post.gmane.org/post.php'''
- '''?group=gmane.comp.gnu.lilypond.bugs\n''')
-
+ description=_ ('''abc2ly converts ABC music files (see
+%s) to LilyPond input.''') % 'http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt')
+
+ p.add_option ('-o', '--output', metavar='FILE',
+ help=_ ("write output to FILE"),
+ action='store')
+ p.add_option ('-s', '--strict', help=_ ("be strict about succes"),
+ action='store_true')
+ p.add_option ('-b', '--beams', help=_ ("preserve ABC's notion of beams"))
+ p.add_option_group ('bugs',
+ description=(_ ('Report bugs via')
+ + ''' http://post.gmane.org/post.php'''
+ '''?group=gmane.comp.gnu.lilypond.bugs\n'''))
return p
-option_parser = get_option_parser()
-(global_options, files) = option_parser.parse_args()
+option_parser = get_option_parser ()
+(global_options, files) = option_parser.parse_args ()
-identify()
+identify ()
header['tagline'] = 'Lily was here %s -- automatically converted from ABC' % version
for f in files: