]> git.donarmstrong.com Git - lilypond.git/commitdiff
Update some python scripts to (c) --2008 and render grand-replace affectible.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 6 Jan 2009 10:27:14 +0000 (11:27 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 6 Jan 2009 10:27:14 +0000 (11:27 +0100)
scripts/convert-ly.py
scripts/etf2ly.py
scripts/lilymidi.py
scripts/lilypond-book.py
scripts/lilysong.py
scripts/midi2ly.py

index 93e345f2ae6edf305b7a40481c6de828c978b1ff..3df263f5bb0c6083181741dc9c8a8227289f4be5 100644 (file)
@@ -44,6 +44,9 @@ copyright = ('Jan Nieuwenhuizen <janneke@gnu.org>',
 program_name = os.path.basename (sys.argv[0])
 program_version = '@TOPLEVEL_VERSION@'
 
+authors = ('Jan Nieuwenhuizen <janneke@gnu.org>',
+           'Han-Wen Nienhuys <hanwen@xs4all.nl>')
+
 error_file_write = ly.stderr_write
 
 def warning (s):
@@ -58,17 +61,16 @@ def identify (port=sys.stderr):
 def warranty ():
     identify ()
     ly.encoded_write (sys.stdout, '''
-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--2008',
+        ' '.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]... FILE") % 'convert-ly',
@@ -117,7 +119,9 @@ def get_option_parser ():
               action='store',
               dest="to_version",
               default='')
-
+    p.add_option ('-w', '--warranty', help=_ ("show warranty and copyright"),
+           action='store_true',
+           ),
     p.add_option_group ('',
                         description=(
             _ ("Report bugs via %s")
@@ -256,6 +260,9 @@ def do_options ():
     opt_parser = get_option_parser()
     (options, args) = opt_parser.parse_args ()
 
+    if options.warranty:
+        warranty ()
+        sys.exit (0)
 
     if options.from_version:
         options.from_version = str_to_tuple (options.from_version)
index c9f23aa6770740ff9496a0edcff5b8cfa83bf18f..39401b0692ac9bc6f3cd436ba5cb257f3b3cdd0a 100644 (file)
@@ -34,6 +34,9 @@ import os
 
 program_name = sys.argv[0]
 
+authors = ('Jan Nieuwenhuizen <janneke@gnu.org>',
+           'Han-Wen Nienhuys <hanwen@xs4all.nl>')
+
 version = '@TOPLEVEL_VERSION@'
 if version == '@' + 'TOPLEVEL_VERSION' + '@':
     version = '(unknown version)'           # uGUHGUHGHGUGH
@@ -1162,18 +1165,16 @@ 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--2008',
+        '\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',
index 22eb8e61f47b7ef8b05f6a7704bc1d748bbe5ccd..e94548c18ec2e9e06ce1f4d091455bdb56e6b7e3 100644 (file)
@@ -1,6 +1,6 @@
 #!@TARGET_PYTHON@
 
-# Copyright (C) 2006, 2007 Brailcom, o.p.s.
+# Copyright (c) 2006--2008 Brailcom, o.p.s.
 #
 # Author: Milan Zamazal <pdm@brailcom.org>
 #
index a0ee6fb0ada7e4370d4911728859dcb32e114a9e..65c3b62da45af575507b7816bf81e06dced199b9 100644 (file)
@@ -108,12 +108,12 @@ def warranty ():
     ly.encoded_write (sys.stdout, '''
 %s
 
-%s
+  %s
 
 %s
 %s
 ''' % ( _ ('Copyright (c) %s by') % '2001--2008',
-        ' '.join (authors),
+        '\n  '.join (authors),
         _ ("Distributed under terms of the GNU General Public License."),
         _ ("It comes with NO WARRANTY.")))
 
index adc6f57526cf8e608ca464b5df4f00628d2098ce..5f38f8640b345182f05b71c0343c3ec06f31ca7a 100644 (file)
@@ -1,6 +1,6 @@
 #!@TARGET_PYTHON@
 
-# Copyright (C) 2006, 2007 Brailcom, o.p.s.
+# Copyright (c) 2006--2008 Brailcom, o.p.s.
 #
 # Author: Milan Zamazal <pdm@brailcom.org>
 #
index ace53d3446e90979fad38b2cd31d40f7a6b5649c..3b2350b15b5e0e16e9c527078d8b7f45f5a30d3c 100644 (file)
@@ -57,6 +57,9 @@ allowed_tuplet_clocks = []
 program_name = sys.argv[0]
 program_version = '@TOPLEVEL_VERSION@'
 
+authors = ('Jan Nieuwenhuizen <janneke@gnu.org>',
+           'Han-Wen Nienhuys <hanwen@xs4all.nl>')
+
 errorport = sys.stderr
 
 def identify ():
@@ -65,17 +68,16 @@ def identify ():
 def warranty ():
     identify ()
     ly.encoded_write (sys.stdout, '''
-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--2008',
+        '\n  '.join (authors),
+        _ ('Distributed under terms of the GNU General Public License.'),
+        _ ('It comes with NO WARRANTY.')))
 
 def progress (s):
     ly.encoded_write (errorport, s + '\n')