def get_option_parser ():
p = ly.get_option_parser (usage=_ ("%s [OPTION]... FILE") % 'abc2ly',
description=_ ('''abc2ly converts ABC music files (see
-%s) to LilyPond input.''') % 'http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt',
+%s) to LilyPond input.
+''') % 'http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt',
add_help_option=False)
p.version = "abc2ly (LilyPond) @TOPLEVEL_VERSION@"
p.add_option ('-s', '--strict', help=_ ("be strict about success"),
action='store_true')
p.add_option ('-b', '--beams', help=_ ("preserve ABC's notion of beams"))
- p.add_option_group (ly.display_encode (_ ('Bugs')),
+ p.add_option_group ('',
description=(_ ('Report bugs via')
+ ''' http://post.gmane.org/post.php'''
'''?group=gmane.comp.gnu.lilypond.bugs\n'''))
version taken from the \\version command, to the current LilyPond version.''')
+ _ ("Examples:")
+ '''
- convert-ly -e old.ly
- convert-ly --from=2.3.28 --to 2.5.21 foobar.ly
+ $ convert-ly -e old.ly
+ $ convert-ly --from=2.3.28 --to=2.5.21 foobar.ly > foobar-new.ly
''')
copyright = ('Jan Nieuwenhuizen <janneke@gnu.org>',
default=False)
p.add_option ("-s", '--show-rules',
- help=_ ("show rules [default: --from=0, --to=%s]") % program_version,
+ help=_ ("show rules [default: -f 0, -t %s]") % program_version,
dest='show_rules',
action='store_true', default=False)
dest="to_version",
default='')
- p.add_option_group (ly.display_encode (_ ('Bugs')),
+ p.add_option_group ('',
description=(_ ("Report bugs via")
+ ''' http://post.gmane.org/post.php'''
'''?group=gmane.comp.gnu.lilypond.bugs\n'''))
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",
action='store_true',
),
- p.add_option_group (ly.display_encode (_ ('Bugs')),
+ p.add_option_group ('',
description=(_ ('Report bugs via')
+ ''' http://post.gmane.org/post.php'''
'''?group=gmane.comp.gnu.lilypond.bugs\n'''))
+ '\n\n'
+ _ ("Examples:")
+ '''
- lilypond-book --filter="tr '[a-z]' '[A-Z]'" %(BOOK)s
- lilypond-book --filter="convert-ly --no-version --from=2.0.0 -" %(BOOK)s
- lilypond-book --process='lilypond -I include' %(BOOK)s
+ $ lilypond-book --filter="tr '[a-z]' '[A-Z]'" %(BOOK)s
+ $ lilypond-book -F "convert-ly --no-version --from=2.0.0 -" %(BOOK)s
+ $ lilypond-book --process='lilypond -I include' %(BOOK)s
''' % {'BOOK': _ ("BOOK")})
authors = ('Jan Nieuwenhuizen <janneke@gnu.org>',
p.add_option ('-F', '--filter', metavar=_ ("FILTER"),
action="store",
dest="filter_cmd",
- help=_ ("pipe snippets through FILTER [convert-ly -n -]"),
+ help=_ ("pipe snippets through FILTER [default: `convert-ly -n -']"),
default=None)
p.add_option ('-f', '--format',
help=_ ("use output format FORMAT (texi [default], texi-html, latex, html, docbook)"),
+ metavar=_ ("FORMAT"),
action='store')
p.add_option("-h", "--help",
default='')
p.add_option ('--skip-lily-check',
- help=_ ("do not fail if no lilypond output is found."),
+ help=_ ("do not fail if no lilypond output is found"),
metavar=_ ("DIR"),
action='store_true', dest='skip_lilypond_run',
default=False)
default=False)
p.add_option ('--lily-output-dir',
- help=_ ("write lily-XXX files to DIR, link into --output dir."),
+ help=_ ("write lily-XXX files to DIR, link into --output dir"),
metavar=_ ("DIR"),
action='store', dest='lily_output_dir',
default=None)
p.add_option ('-w', '--warranty',
help=_ ("show warranty and copyright"),
action='store_true')
- p.add_option_group (ly.display_encode (_ ('Bugs')),
+ p.add_option_group ('',
description=(
_ ("Report bugs via")
+ ' http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs\n'))
FESTIVAL_COMMAND = 'festival --pipe'
VOICE_CODINGS = {'voice_czech_ph': 'iso-8859-2'}
-_USAGE = """lilysong [ -p PLAY-PROGRAM ] FILE.xml [ LANGUAGE-CODE-OR-VOICE [ SPEEDUP ] ]
-./lilysong FILE.ly [ LANGUAGE-CODE-OR-VOICE ]
-./lilysong --list-voices
-./lilysong --list-languages
+_USAGE = """lilysong [-p PLAY-PROGRAM] FILE.xml [LANGUAGE-CODE-OR-VOICE [SPEEDUP]]
+ lilysong FILE.ly [LANGUAGE-CODE-OR-VOICE]
+ lilysong --list-voices
+ lilysong --list-languages
"""
def usage ():
- print 'usage:', _USAGE
+ print 'Usage:', _USAGE
sys.exit (2)
def process_options (args):
def get_option_parser ():
p = ly.get_option_parser (usage=_ ("%s [OPTION]... FILE") % 'midi2ly',
- description=_ ("Convert %s to LilyPond input.") % 'MIDI',
+ description=_ ("Convert %s to LilyPond input.\n") % 'MIDI',
add_help_option=False)
p.add_option ('-a', '--absolute-pitches',
p.add_option_group (ly.display_encode (_ ("Examples")),
description = r'''
- midi2ly --key=-2:1 --duration-quant=32 \
- --allow-tuplet=4*2/3 --allow-tuplet=2*4/3 foo.midi
+ $ midi2ly --key=-2:1 --duration-quant=32 --allow-tuplet=4*2/3 --allow-tuplet=2*4/3 foo.midi
''')
- p.add_option_group (ly.display_encode (_ ('Bugs')),
+ p.add_option_group ('',
description=(_ ('Report bugs via')
+ ''' http://post.gmane.org/post.php'''
'''?group=gmane.comp.gnu.lilypond.bugs\n'''))
def option_parser ():
- p = ly.get_option_parser (usage = _ ("musicxml2ly [options] FILE.xml"),
- description = _ ("Convert MusicXML from FILE.xml to LilyPond input. If the given filename is -, musicxml2ly reads from the command line.") + "\n",
- add_help_option=False)
+ p = ly.get_option_parser (usage = _ ("musicxml2ly [OPTION]... FILE.xml"),
+ description =
+_ ("""Convert MusicXML from FILE.xml to LilyPond input.
+If the given filename is -, musicxml2ly reads from the command line.
+"""), add_help_option=False)
p.add_option("-h", "--help",
action="help",
help=_ ("show this help and exit"))
p.version = ('''%prog (LilyPond) @TOPLEVEL_VERSION@\n\n'''
- +
-_ ("""This program is free software. It is covered by the GNU General Public
-License and you are welcome to change it and/or distribute copies of it
-under certain conditions. Invoke as `%s --warranty' for more
-information.""") % 'lilypond'
-+ """
-Copyright (c) 2005--2008 by
++
+_ ("""Copyright (c) 2005--2008 by
Han-Wen Nienhuys <hanwen@xs4all.nl>,
Jan Nieuwenhuizen <janneke@gnu.org> and
Reinhold Kainhofer <reinhold@kainhofer.com>
-""")
+"""
++
+"""
+This program is free software. It is covered by the GNU General Public
+License and you are welcome to change it and/or distribute copies of it
+under certain conditions. Invoke as `%s --warranty' for more
+information.""") % 'lilypond')
+
p.add_option("--version",
action="version",
help=_ ("show version number and exit"))
type = 'string',
dest = 'output_name',
help = _ ("set output filename to FILE, stdout if -"))
- p.add_option_group (ly.display_encode (_ ('Bugs')),
+ p.add_option_group ('',
description = (_ ("Report bugs via")
+ ''' http://post.gmane.org/post.php'''
'''?group=gmane.comp.gnu.lilypond.bugs\n'''))