]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/convertrules.py
new interface trill-spanner-interface. Use for pitched trill engraver.
[lilypond.git] / python / convertrules.py
index cd08dab83e026e0d9c864ebaa6f3e3c6dc65a7de..71dbd10d427b2e80405508e273cb0a4a5ed83abf 100644 (file)
@@ -604,24 +604,25 @@ def conv (str):
     return str
 
 conversions.append (((1,3,113), conv, 'LyricVoice -> LyricsVoice'))
+def regularize_id (str):
+    s = ''
+    lastx = ''
+    for x in str:
+        if x == '_':
+            lastx = x
+            continue
+        elif x in string.digits:
+            x = chr(ord (x) - ord ('0')  +ord ('A'))
+        elif x not in string.letters:
+            x = 'x'
+        elif x in string.lowercase and lastx == '_':
+            x = string.upper (x)
+        s = s + x
+        lastx = x
+    return s
 
 def conv (str):
-    def regularize_id (str):
-       s = ''
-       lastx = ''
-       for x in str:
-           if x == '_':
-               lastx = x
-               continue
-           elif x in string.digits:
-               x = chr(ord (x) - ord ('0')  +ord ('A'))
-           elif x not in string.letters:
-               x = 'x'
-           elif x in string.lowercase and lastx == '_':
-               x = string.upper (x)
-           s = s + x
-           lastx = x
-       return s
+
 
     def regularize_dollar_reference (match):
        return regularize_id (match.group (1))
@@ -2935,9 +2936,36 @@ def conv (str):
     str = re.sub (r'(\\set\s+)?allowBeamBreak',
                   r"\override Beam #'breakable", str)
     str = re.sub (r'addquote' , 'addQuote', str)
+    if re.search ("Span_dynamic_performer", str):
+        error_file.write ("Span_dynamic_performer has been merged into Dynamic_performer")
+
     return str
 
 conversions.append (((2, 11, 10), conv, """allowBeamBreak -> Beam #'breakable = ##t
 addquote -> addQuote
 
 """))
+
+def conv (str):
+    str = re.sub (r'\(layout-set-staff-size \(\*\s*([0-9.]+)\s*(pt|mm|cm)\)\)',
+                  r'(layout-set-absolute-staff-size (* \1 \2))', str)
+    return str
+
+conversions.append (((2, 11, 11), conv, """layout-set-staff-size -> layout-set-absolute-staff-size"""))
+
+
+def conv (str):
+    str = re.sub (r"\\override\s*([a-zA-Z.]+)\s*#'arrow\s*=\s*##t",
+                  r"\\override \1 #'bound-details #'right #'arrow = ##t",
+                  str)
+
+    if re.search ('edge-text', str):
+       error_file.write (NOT_SMART % "edge-text settings for TextSpanner.")
+       error_file.write ("Use\n\n"
+                          "\t\\override TextSpanner #'bound-details #'right #'text = <right-text>\n"
+                          "\t\\override TextSpanner #'bound-details #'left #'text = <left-text>\n")
+
+        
+    return str
+
+conversions.append (((2, 11, 13), conv, """#'arrow = ##t -> #'bound-details #'right #'arrow = ##t"""))