]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/convertrules.py
(srcdir): urg. Touch install-sh.
[lilypond.git] / python / convertrules.py
index 4d5fdf06e5655f44547fef26c10106404c0af2a8..3710cf04220573e40ff6a06b24d181f3f74e8534 100644 (file)
@@ -1818,7 +1818,11 @@ conversions.append (((2,1,18), conv, """\\newpartcombine -> \\partcombine,
 
 
 def conv (str):
+       if re.search ('include "drumpitch', str):
+               error_file.write ("Drums found. Enclose drum notes in \\drummode")
+               
        str = re.sub (r'\\include "drumpitch-init.ly"','', str)
+       
        str = re.sub (r'\\pitchnames ','pitchnames = ', str)
        str = re.sub (r'\\chordmodifiers ','chordmodifiers = ', str)
        str = re.sub (r'\bdrums\b\s*=','drumContents = ', str)
@@ -2625,7 +2629,7 @@ def conv (str):
                      r"\\revert \1 #'\2", str)
        str = re.sub (r"([XY]-extent)-callback", r'\1', str)
        str = re.sub (r"RemoveEmptyVerticalGroup", "VerticalAxisGroup", str)
-       str = re.sub (r"\\set ([a-zA-Z]+\.)?minimumVerticalExtent",
+       str = re.sub (r"\\set ([a-zA-Z]*\.?)minimumVerticalExtent",
                      r"\\override \1VerticalAxisGroup #'minimum-Y-extent",
                      str)
        str = re.sub (r"minimumVerticalExtent",
@@ -2636,3 +2640,36 @@ def conv (str):
 
 conversions.append (((2, 7, 14), conv,
                     '''Remove callbacks property, deprecate XY-extent-callback. '''))
+
+
+def conv (str):
+       if re.search ('[XY]-offset-callbacks', str):
+               error_file.write (NOT_SMART % "[XY]-offset-callbacks")
+       if re.search ('position-callbacks', str):
+               error_file.write (NOT_SMART % "position-callbacks")
+       return str
+
+conversions.append (((2, 7, 15), conv,
+                    '''Use grob closures iso. XY-offset-callbacks.'''))
+
+
+def conv (str):
+       def sub_syms (m):
+               syms =  m.group (1).split ()
+               tags = ["\\tag #'%s" % s for s in syms]
+               return ' '.join (tags)
+               
+       str = re.sub (r"\\tag #'\(([^)]+)\)",  sub_syms, str)
+       return str
+
+conversions.append (((2, 7, 22), conv,
+                    """\tag #'(a b) -> \tag #'a \tag #'b""" ))
+
+def conv (str):
+       str = re.sub (r"#'number-visibility",
+                     "#'number-visibility % number-visibility is deprecated. Tune the TupletNumber instead\n",
+                     str)
+       return str
+
+conversions.append (((2, 7, 24), conv,
+                    """deprecate number-visibility"""))