sys.path.append (os.path.join (datadir, 'python'))
sys.path.append (os.path.join (datadir, 'python/out'))
-program_name = 'mup2ly'
+program_name = sys.argv[0]
program_version = '@TOPLEVEL_VERSION@'
original_dir = os.getcwd ()
temp_dir = os.path.join (original_dir, '%s.dir' % program_name)
def warranty ():
identify ()
sys.stdout.write ('\n')
- sys.stdout.write (_ ('Copyright (c) %s by' % ' 2001--2003'))
+ sys.stdout.write (_ ('Copyright (c) %s by') % '2001--2004')
sys.stdout.write ('\n')
sys.stdout.write (' Han-Wen Nienhuys')
sys.stdout.write (' Jan Nieuwenhuizen')
- sys.stdout.write ('\n')
- sys.stdout.write (_ (r'''
-Distributed under terms of the GNU General Public License. It comes with
-NO WARRANTY.'''))
+ sys.stdout.write ('\n\n')
+ sys.stdout.write (_ ("Distributed under terms of the GNU General Public License."))
+ sys.stdout.write (_ ("It comes with NO WARRANTY."))
sys.stdout.write ('\n')
def progress (s):
if o[1]:
sh = '-%s' % o[1]
- sep = ' '
+ sep = ' '
if o[1] and o[2]:
- sep = ','
+ sep = ', '
long = ''
if o[2]:
str = str + ln
id = self.idstring ()
- str = '''%s = \\context Voice = %s \\notes {
+ str = '''%s = \\context Voice = %s {
%s
}
if self.sharps and self.flats:
k = '\\keysignature %s ' % 'TODO'
elif self.sharps:
- k = '\\notes\\key %s \major' % key_sharps[self.sharps]
+ k = '\\key %s \major' % key_sharps[self.sharps]
elif self.flats:
- k = '\\notes\\key %s \major' % key_flats[self.flats]
+ k = '\\key %s \major' % key_flats[self.flats]
return k
class Time:
str = str + v.dump()
refs = refs + '\n \\' + v.idstring ()
str = str + '''
-%s = \context Staff = %s <%s
->
+%s = \context Staff = %s <<%s
+>>
''' % (self.idstring (), self.idstring (), refs)
return str
str = self.note_prefix +str + self.note_suffix
if len (self.pitches) > 1:
- str = '<<%s>>' % str
+ str = '<%s>' % str
elif self.multimeasure:
str = 'R'
elif len (self.pitches) == 0:
str = str + '''
\score {
- <%s
- >
- \paper {}
+ <<%s
+ >>
+ \layout {}
\midi {}
}
''' % refs
files = ['-']
for f in files:
-
+ h = None
if f == '-':
h = sys.stdin
elif f and not os.path.isfile (f):