From 9e781a447d4ea0dc072403b4c7f0b176f2edb2e2 Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Thu, 29 Sep 2011 11:50:32 +0200 Subject: [PATCH] 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. --- python/convertrules.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) # -- 2.39.5