From 0f419a15b5edc296bec70c5caa0731c18ac40bcf Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Mon, 23 Mar 2026 20:01:51 +0100 Subject: [PATCH] Add dynamic date placeholder to score template --- lilypond/score_template.ly | 2 +- src/transcriber.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lilypond/score_template.ly b/lilypond/score_template.ly index 474b58e..bdaeca6 100644 --- a/lilypond/score_template.ly +++ b/lilypond/score_template.ly @@ -48,7 +48,7 @@ \header { title = \markup { \italic {"{NAME}"}} - composer = \markup \right-column {"michael winter" "(cdmx and schloss solitude; 2024)"} + composer = \markup \right-column {"michael winter" "({DATE})"} poet = "" tagline = "" } diff --git a/src/transcriber.py b/src/transcriber.py index b27f3ac..432943e 100644 --- a/src/transcriber.py +++ b/src/transcriber.py @@ -487,6 +487,11 @@ def generate_score(name, num_voices, output_dir="lilypond"): score_text = score_text.replace("{NAME}", name) + from datetime import date + + today = date.today().strftime("%d %b %Y") + score_text = score_text.replace("{DATE}", today) + voice_names = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII"] staves = "" for i in range(num_voices):