From: Mike Solomon Date: Thu, 29 Sep 2011 09:50:32 +0000 (+0200) Subject: Adds convert-ly rules for the Flag grob. X-Git-Tag: release/2.15.14-1~18^2~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9e781a447d4ea0dc072403b4c7f0b176f2edb2e2;p=lilypond.git Adds convert-ly rules for the Flag grob. All Stem properties that are moved to Flag are now changed to Flag properties. Additionally, Stem grobs' being overriden and reverted to and from transparent triggers the same overrides and reverts with Flags. --- diff --git a/python/convertrules.py b/python/convertrules.py index b1e3fefd45..ee15d267c7 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3232,6 +3232,16 @@ def conv (str): stderr_write (UPDATE_MANUALLY) return str +@rule ((2, 15, 10), + _ ("Creation of a Flag grob and moving of certain Stem properties to this grob")) +def conv (str): + str = re.sub (r"Stem\s+#'flag-style", r"Flag #'style", str) + str = re.sub (r"Stem\s+#'stroke-style", r"Flag #'stroke-style", str) + str = re.sub (r"Stem\s+#'flag", r"Flag #'print", str) + str = re.sub (r"((?:\\once)?\s*)\\override\s+Stem\s+#'transparent\s*=\s*##t", r"\g<1>\\override Stem #'transparent = ##t \g<1>\\override Flag #'transparent = ##t", str) + str = re.sub (r"((?:\\once)?\s*)\\revert\s*Stem\s+#'transparent", r"\g<1>\\revert Stem #'transparent \g<1>\\revert Flag #'transparent", str) + return str + # Guidelines to write rules (please keep this at the end of this file) #