Add dynamic date placeholder to score template

This commit is contained in:
Michael Winter 2026-03-23 20:01:51 +01:00
parent c0ffaac95f
commit 0f419a15b5
2 changed files with 6 additions and 1 deletions

View file

@ -48,7 +48,7 @@
\header { \header {
title = \markup { \italic {"{NAME}"}} title = \markup { \italic {"{NAME}"}}
composer = \markup \right-column {"michael winter" "(cdmx and schloss solitude; 2024)"} composer = \markup \right-column {"michael winter" "({DATE})"}
poet = "" poet = ""
tagline = "" tagline = ""
} }

View file

@ -487,6 +487,11 @@ def generate_score(name, num_voices, output_dir="lilypond"):
score_text = score_text.replace("{NAME}", name) 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"] voice_names = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII"]
staves = "" staves = ""
for i in range(num_voices): for i in range(num_voices):