correction yaml creation - extraction yaml + html preparation

This commit is contained in:
github_username_here
2026-03-23 19:05:01 +01:00
parent 874ba49512
commit f7e63ce1e1
156 changed files with 8565 additions and 8512 deletions

View File

@@ -14,21 +14,21 @@ func SaveChapter(cfg config.Cfg, chapter *config.Chapter) (error){
var chapterYaml models.Yaml
for i, verse:= range chapter.Verses{
strophe := models.Strophe{}
parts := SplitInPart(verse, cfg.ProperName)
for _, part := range parts{
line := models.Line{
Verse: i+1,
Text: part,
poeticLine := models.PoeticLine{
Who: "",
To: "",
Of: "",
}
}
cola := SplitInPart(verse, cfg.ProperName)
for _, colon := range cola{
strophe.Lines = append(strophe.Lines, line)
poeticLine.Cola = append(poeticLine.Cola, models.Colon{
Verse: i+1,
Text: colon,
})
}
chapterYaml.Strophes = append(chapterYaml.Strophes, strophe)
log.Printf("%v", parts)
chapterYaml.PoeticLines = append(chapterYaml.PoeticLines, poeticLine)
}
yamlData, err := yaml.Marshal(chapterYaml)