From 4a35093c4358be17da6f0f374197caed743bda26 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 23:27:07 +0200 Subject: feat(caldata): OF Sunday/solemnity readings by slug+cycle (seed table) --- internal/caldata/caldata.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'internal/caldata/caldata.go') diff --git a/internal/caldata/caldata.go b/internal/caldata/caldata.go index 92f9327..9c17035 100644 --- a/internal/caldata/caldata.go +++ b/internal/caldata/caldata.go @@ -25,6 +25,12 @@ var tridentineLectionary []byte // efTempReadings maps an EF temporal-day slug to its readings (parsed once). var efTempReadings = parseLectionary(tridentineLectionary) +//go:embed of-lectionary.ini +var ofLectionary []byte + +// ofTempReadings maps an OF - key to its readings (parsed once). +var ofTempReadings = parseLectionary(ofLectionary) + func parseLectionary(data []byte) map[string][]calendar.Reading { l, err := ParseLayer(data) if err != nil { @@ -44,12 +50,12 @@ func parseLectionary(data []byte) map[string][]calendar.Reading { } // TemporalReadings returns the temporal-cycle readings for a computed day slug, -// or nil. Only the EF ("old") temporal lectionary exists so far. +// or nil. EF ("old") looks up efTempReadings; OF looks up ofTempReadings. func TemporalReadings(form, slug string) []calendar.Reading { if form == "old" { return efTempReadings[slug] } - return nil + return ofTempReadings[slug] } // Universal parses the embedded Ordinary Form universal calendar. It panics on a -- cgit v1.3