Rendering code refactor

This commit is contained in:
marc
2025-04-26 19:09:59 +02:00
parent 7a823a98ab
commit d132e6fd60
33 changed files with 638 additions and 188 deletions

View File

@@ -0,0 +1,18 @@
from folkugat_web.model.lilypond.score import LilypondSet, LilypondTune
from folkugat_web.templates import templates
SCORE_BEGINNING = "% --- SCORE BEGINNING --- %"
def tune_source(tune: LilypondTune) -> str:
return templates.get_template("lilypond/single_tune.ly").render(
score_beginning=SCORE_BEGINNING,
tune=tune,
)
def set_source(tune_set: LilypondSet) -> str:
return templates.get_template("lilypond/tune_set.ly").render(
score_beginning=SCORE_BEGINNING,
tune_set=tune_set,
)