X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fabc2ly.py;h=8029dbea8f222ce93ab42137e46cc72a8939cef1;hb=1f3403568fc37bdf4e1a7eff0e81d9c63905232c;hp=68200e785e3769859068434d01f4c1af0cc25c4c;hpb=d4e1cf3b24ad546d05a490ad1b07be45ea230e44;p=lilypond.git diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index 68200e785e..8029dbea8f 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -1,5 +1,5 @@ #!@PYTHON@ - +# -*- coding: utf-8 -*- # once upon a rainy monday afternoon. # # ... @@ -142,7 +142,7 @@ def check_clef(s): s = s[4:] state.base_octave = -2 voices_append ("\\clef bass\n" ) - return s + return s def select_voice (name, rol): if not voice_idx_dict.has_key (name): @@ -204,7 +204,7 @@ def dump_slyrics (outf): ks.sort () for k in ks: if re.match('[1-9]', k): - m = chr(string.atoi(k) + 'A') + m = alphabet(string.atoi(k)) else: m = k for i in range (len(slyrics[voice_idx_dict[k]])): @@ -219,7 +219,7 @@ def dump_voices (outf): ks.sort () for k in ks: if re.match ('[1-9]', k): - m = chr(string.atoi(k) + 'A') + m = alphabet(string.atoi(k)) else: m = k outf.write ("\nvoice%s = {" % m) @@ -286,11 +286,6 @@ def dump_score (outf): outf.write ("\n >>") outf.write ("\n\t\\layout {\n") - if part_names: - outf.write ("\t \\translator \n\t {\n") - outf.write ("\t\t\\StaffContext\n") -# outf.write ("\t\t\\consists Staff_margin_engraver\n") - outf.write ("\t }\n") outf.write ("\t}\n\t\\midi {%s}\n}\n" % midi_specs) @@ -636,7 +631,10 @@ def try_parse_header_line (ln, state): if header.has_key('title'): if a: if len(header['title']): - header['title'] = header['title'] + '\\\\\\\\' + a + # the non-ascii character + # in the string below is a + # punctuation dash. (TeX ---) + header['title'] = header['title'] + ' — ' + a else: header['subtitle'] = a else: @@ -1208,7 +1206,7 @@ def try_parse_chord_delims (str, state): ch = '' if str[:1] ==']': str = str[1:] - ch = '>' + ch = '>>' end = 0 while str[:1] ==')': @@ -1388,7 +1386,9 @@ for f in files: sys.stderr.write ('lilypond output to: `%s\'...' % out_filename) outf = open (out_filename, 'w') - outf.write ('\\version "2.3.25"\n') +# don't substitute @VERSION@. We want this to reflect +# the last version that was verified to work. + outf.write ('\\version "2.5.20"\n') # dump_global (outf) dump_header (outf, header)