From e0f83675c2e037ff9e23969e5f1774de568d2233 Mon Sep 17 00:00:00 2001 From: hanwen Date: Fri, 3 Mar 2006 11:01:08 +0000 Subject: [PATCH] *** empty log message *** --- scripts/lilypond-book.py | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index ef76bda7bc..5426c63374 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -126,8 +126,8 @@ def warranty (): %s %s -''' ( _('Copyright (c) %s by') % '2001--2006', - authors, +''' % ( _('Copyright (c) %s by') % '2001--2006', + ' '.join (authors), _('Distributed under terms of the GNU General Public License.'), _('It comes with NO WARRANTY.'))) @@ -161,7 +161,9 @@ def get_option_parser (): help=_ ('''extract all PostScript fonts into INPUT.psfonts for LaTeX''' '''must use this with dvips -h INPUT.psfonts'''), default=None) - p.add_option ('-V', '--verbose', help=_("be verbose"), action="store_true", + p.add_option ('-V', '--verbose', help=_("be verbose"), + action="store_true", + default=False, dest="verbose") p.add_option ('-w', '--warranty', @@ -1653,24 +1655,29 @@ def do_file (input_filename): raise Compile_error def do_options (): - opt_parser = get_option_parser() - (options, args) = opt_parser.parse_args () - if options.format in ('texi-html', 'texi'): - options.format = TEXINFO - options.use_hash = True + global global_options - options.include_path = map (os.path.abspath, options.include_path) + opt_parser = get_option_parser() + (global_options, args) = opt_parser.parse_args () - global global_options - global_options = options + if global_options.format in ('texi-html', 'texi'): + global_options.format = TEXINFO + global_options.use_hash = True + + global_options.include_path = map (os.path.abspath, global_options.include_path) + + if global_options.warranty: + warranty () + exit (0) + if not args or len (args) > 1: + opt_parser.print_help () + exit (2) + return args def main (): files = do_options () - if not files or len (files) > 1: - ly.help () - exit (2) file = files[0] -- 2.39.5