From e6eba32facf520d202f7941f43206e0f95141452 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 23:44:36 +0200 Subject: feat(caldata): generate OF Sunday/solemnity lectionary from niedziela Task 2. scripts/genlect-of.go harvests niedziela over the PAST cycle-equivalent years 2023(A)/2024(B)/2025(C) -- niedziela only publishes ~6 weeks ahead, so the future 2025-2027 span was unfetchable; the 3-year cycle repeats, so a liturgical position's cycle-A readings are identical whether they fall in 2023 or 2026. Produces internal/caldata/of-lectionary.ini: 254 entries (A=86, B=87, C=81), keyed -, citations English-canonical via ToEnglishRef. Also: books.ini [en] Matthew gains "Mat" (ToEnglishRef maps Polish Mt->Mat; now resolves and displays as Matt). of_test.go assertion relaxed to accept either spelling. KNOWN GAP: 8 cross-chapter range citations (e.g. Sirach 27:30-28:7, John 18:1-19:42) don't yet resolve -- the bible ref parser handles semicolon groups but not a dash-range spanning a chapter boundary. Fix next. --- internal/caldata/of_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'internal/caldata/of_test.go') diff --git a/internal/caldata/of_test.go b/internal/caldata/of_test.go index 7bc2ce1..b515a28 100644 --- a/internal/caldata/of_test.go +++ b/internal/caldata/of_test.go @@ -1,6 +1,7 @@ package caldata import ( + "strings" "testing" "time" @@ -22,8 +23,11 @@ func TestOFReadingsByCycle(t *testing.T) { gospel = r.Citation } } - if gospel == "" || gospel[:4] != "Matt" { - t.Fatalf("christ-the-king-A gospel = %q, want Matt…", gospel) + // The gospel of Christ the King (cycle A) is Matthew 25:31-46. The citation + // may spell Matthew as "Mat" (niedziela/ToEnglishRef) or "Matt" (seed); both + // resolve to Matthew via books.ini. + if !strings.HasPrefix(gospel, "Mat 25") && !strings.HasPrefix(gospel, "Matt 25") { + t.Fatalf("christ-the-king-A gospel = %q, want Matthew 25…", gospel) } } -- cgit v1.3