X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fabc2ly.py;h=553c400ea4d9e5bbf73947138ef10d1ffe49491c;hb=318e585dcc5c6a4493c220ab23fc04f0c051207e;hp=9c697367b4fc020b285ad137cae64deeff5ab213;hpb=8f5cd22af76fcb5c77853a5ede8b94ebef97caef;p=lilypond.git diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index 9c697367b4..553c400ea4 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -5,7 +5,7 @@ # ... # # (not finished.) -# ABC standard v1.6: http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt +# ABC standard v1.6: http://www.walshaw.plus.com/abc/ # # Enhancements (Roy R. Rankin) # @@ -78,16 +78,9 @@ import os 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._ @@ -1179,7 +1172,7 @@ def try_parse_bar (str,state): close_beam_state(state) voices_append (bs) if do_curly != '': - voices_append("} }") + voices_append("} ") do_curly = '' return str @@ -1347,17 +1340,25 @@ def print_version (): def get_option_parser (): p = ly.get_option_parser (usage=_ ("%s [OPTION]... FILE") % 'abc2ly', - version="abc2ly (LilyPond) @TOPLEVEL_VERSION@", 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("--version", + action="version", + help=_ ("show version number and exit")) + p.add_option("-h", "--help", + action="help", + help=_ ("show this help and exit")) p.add_option ('-o', '--output', metavar='FILE', help=_ ("write output to FILE"), action='store') - p.add_option ('-s', '--strict', help=_ ("be strict about succes"), + 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 ('bugs', + 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'''))