From: Reinhold Kainhofer Date: Sun, 19 Aug 2007 21:53:26 +0000 (+0200) Subject: Also convert '0' in part ids to 'Zero', simplify that code a bit. X-Git-Tag: release/2.11.30-1~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=efaeb24849c0b67a18ef972da3685af2089a02db;p=lilypond.git Also convert '0' in part ids to 'Zero', simplify that code a bit. --- diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 7307dd2d6a..a82f3dd097 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -558,12 +558,11 @@ def musicxml_voice_to_lily_voice (voice): def musicxml_id_to_lily (id): - digits = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', - 'nine', 'ten'] + digits = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', + 'Nine', 'Ten'] for dig in digits: - d = digits.index (dig) + 1 - dig = dig[0].upper() + dig[1:] + d = digits.index (dig) id = re.sub ('%d' % d, dig, id) id = re.sub ('[^a-zA-Z]', 'X', id)