aboutsummaryrefslogtreecommitdiff
path: root/internal/cli/liturgy.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 15:22:14 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 15:22:14 +0200
commit88ade3a7b7e15e6742d367bdc4b95b1293b92429 (patch)
tree91f721176e3f28dc9c06566101cb441538e145fc /internal/cli/liturgy.go
parent28699aa44df1d791fb48618a8f06627f230432d4 (diff)
downloadlectio-88ade3a7b7e15e6742d367bdc4b95b1293b92429.tar.gz
lectio-88ade3a7b7e15e6742d367bdc4b95b1293b92429.zip
feat: EF temporal Sunday lectionary (offline Sunday Mass readings)
Unique temporal-day slugs (season-sunday-week); scripts/genlect.go generates tridentine-lectionary.ini from missalemeum keyed by slug (55 entries: the Sundays of the whole EF year). caldata.TemporalReadings(form,slug) lookup; --liturgy resolves proper-of-feast else the temporal cycle and renders the text. bible.ParseRef strips abbreviation dots (1 Cor. -> 1 Cor). 52/53 Sundays fully resolve offline.
Diffstat (limited to 'internal/cli/liturgy.go')
-rw-r--r--internal/cli/liturgy.go31
1 files changed, 17 insertions, 14 deletions
diff --git a/internal/cli/liturgy.go b/internal/cli/liturgy.go
index 840e9a6..975917a 100644
--- a/internal/cli/liturgy.go
+++ b/internal/cli/liturgy.go
@@ -78,22 +78,25 @@ func printLiturgicalDay(out io.Writer, cfg config.Config, tbl *bible.BookTable,
fmt.Fprintf(out, " also: %s [%s]\n", n, rankLabel(o.Rank))
}
}
- vern := vernacularVersion(cfg)
+ // Readings: the observed celebration's inline propers, else the temporal
+ // lectionary for the day (proper-of-feast overrides the temporal cycle).
+ var readings []calendar.Reading
for _, m := range day.Observed.Masses {
- for _, r := range m.Readings {
- label := r.Part
- if m.Variant != "" {
- label = m.Variant + " " + label
- }
- disp, txt := readingLine(tbl, cfg, vern, r.Citation)
- fmt.Fprintf(out, "\n %s (%s):\n", label, disp)
- if txt != "" {
- for _, line := range strings.Split(render.Wrap(txt, 72), "\n") {
- fmt.Fprintf(out, " %s\n", line)
- }
- } else {
- fmt.Fprintf(out, " (text not in %s)\n", vern)
+ readings = append(readings, m.Readings...)
+ }
+ if len(readings) == 0 {
+ readings = caldata.TemporalReadings(cfg.Selection().Form, day.Observed.Slug)
+ }
+ vern := vernacularVersion(cfg)
+ for _, r := range readings {
+ disp, txt := readingLine(tbl, cfg, vern, r.Citation)
+ fmt.Fprintf(out, "\n %s (%s):\n", r.Part, disp)
+ if txt != "" {
+ for _, line := range strings.Split(render.Wrap(txt, 72), "\n") {
+ fmt.Fprintf(out, " %s\n", line)
}
+ } else {
+ fmt.Fprintf(out, " (text not in %s)\n", vern)
}
}
}