From efaeb24849c0b67a18ef972da3685af2089a02db Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Sun, 19 Aug 2007 23:53:26 +0200 Subject: [PATCH] Also convert '0' in part ids to 'Zero', simplify that code a bit. --- scripts/musicxml2ly.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) -- 2.39.5