]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/convert-ly.py
($(outdir)/%.pdf): add DVIPS_FLAGS. This will
[lilypond.git] / scripts / convert-ly.py
index 318198c5fedcfc599249174fccc9e7224cf703b6..07f0a387b3189d8c56345cb50eab038d427f98db 100644 (file)
@@ -4,7 +4,7 @@
 #
 # source file of the GNU LilyPond music typesetter
 #
-# (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+# (c) 1998--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 #                 Jan Nieuwenhuizen <janneke@gnu.org>
 
 
@@ -1776,9 +1776,12 @@ conversions.append (((2,1,18), conv, """\\newpartcombine -> \\partcombine,
 
 
 def conv (str):
-       str = re.sub (r'\\include "drumpitch-init.ly','', str)
+       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)
+       str = re.sub (r'\\drums\b','\\drumContents ', str)
+       
 
        if re.search ('drums->paper', str):
                sys.stderr.write ("\nDrum notation found. Check file manually!")
@@ -1812,6 +1815,65 @@ def conv (str):
 conversions.append (((2,1,19), conv, """Drum notation changes, Removing \chordmodifiers, \notenames.
 Harmonic notes. Thread context removed. Lyrics context removed."""))
 
+def conv (str):
+       str = re.sub (r'nonevent-skip', 'skip-music', str)
+       return str
+
+conversions.append (((2,1,20), conv, """nonevent-skip -> skip-music""" ))
+
+def conv (str):
+       str = re.sub (r'molecule-callback', 'print-function', str)
+       str = re.sub (r'brew_molecule', 'print', str)
+       str = re.sub (r'brew-new-markup-molecule', 'Text_item::print', str)
+       str = re.sub (r'LyricsVoice', 'Lyrics', str)
+       str = re.sub (r'tupletInvisible',
+                     r"TupletBracket \\set #'transparent", str)
+#      str = re.sub (r'molecule', 'collage', str)
+#molecule -> collage
+       str = re.sub (r"\\property\s+[a-zA-Z]+\s*\.\s*[a-zA-Z]+\s*"
+                     + r"\\set\s*#'X-extent-callback\s*=\s*#Grob::preset_extent",
+                     "", str)
+
+       return str
+
+conversions.append (((2,1,21), conv, """molecule-callback -> print-function,
+brew_molecule -> print
+brew-new-markup-molecule -> Text_item::print
+LyricsVoice -> Lyrics
+tupletInvisible -> TupletBracket \set #'transparent
+Grob::preset_extent removed.
+""" ))
+
+
+def conv (str):
+       str = re.sub (r'\\property\s+([^.]+)\s*\.\s*([^\\=]+)\s*\\(set|override)',
+                     r"\\overrid@ \1.\2 ", str)
+       str = re.sub (r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*=',
+                     r'\\s@t \1.\2 = ', str)
+       str = re.sub (r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*\\unset',
+                     r'\\uns@t \1.\2 ', str)
+       str = re.sub (r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*\\revert'
+                     + r"\s*#'([-a-z0-9_]+)",
+                     r"\\rev@rt \1.\2 #'\3", str)
+       str = re.sub (r'Voice\.', '', str)
+       str = re.sub (r'Lyrics\.', '', str)
+       str = re.sub (r'ChordNames\.', '', str)
+       
+       str = re.sub ('rev@rt', 'revert',str)
+       str = re.sub ('s@t', 'set',str)
+       str = re.sub ('overrid@', 'override',str)
+
+       str = re.sub ('molecule', 'stencil', str)
+       str = re.sub ('Molecule', 'Stencil', str)
+       return str
+
+conversions.append (((2,1,22), conv, """new syntax for property settings:
+       \set A.B = #C , \unset A.B
+       \override A.B #C = #D, \revert A.B #C
+
+"""))
+
+
 ################################
 #      END OF CONVERSIONS      
 ################################