diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 15:22:14 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 15:22:14 +0200 |
| commit | 88ade3a7b7e15e6742d367bdc4b95b1293b92429 (patch) | |
| tree | 91f721176e3f28dc9c06566101cb441538e145fc /internal/caldata | |
| parent | 28699aa44df1d791fb48618a8f06627f230432d4 (diff) | |
| download | lectio-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/caldata')
| -rw-r--r-- | internal/caldata/caldata.go | 33 | ||||
| -rw-r--r-- | internal/caldata/tridentine-lectionary.ini | 222 |
2 files changed, 255 insertions, 0 deletions
diff --git a/internal/caldata/caldata.go b/internal/caldata/caldata.go index 14b3985..92f9327 100644 --- a/internal/caldata/caldata.go +++ b/internal/caldata/caldata.go @@ -19,6 +19,39 @@ var romanCalendar []byte //go:embed tridentine-calendar.ini var tridentineCalendar []byte +//go:embed tridentine-lectionary.ini +var tridentineLectionary []byte + +// efTempReadings maps an EF temporal-day slug to its readings (parsed once). +var efTempReadings = parseLectionary(tridentineLectionary) + +func parseLectionary(data []byte) map[string][]calendar.Reading { + l, err := ParseLayer(data) + if err != nil { + panic(fmt.Sprintf("caldata: tridentine-lectionary.ini invalid: %v", err)) + } + out := map[string][]calendar.Reading{} + for slug, rc := range l.Cels { + var rs []calendar.Reading + for _, part := range []string{"first", "psalm", "second", "gospel"} { + if c := rc.Fields[part]; c != "" { + rs = append(rs, calendar.Reading{Part: part, Citation: c}) + } + } + out[slug] = rs + } + return out +} + +// TemporalReadings returns the temporal-cycle readings for a computed day slug, +// or nil. Only the EF ("old") temporal lectionary exists so far. +func TemporalReadings(form, slug string) []calendar.Reading { + if form == "old" { + return efTempReadings[slug] + } + return nil +} + // Universal parses the embedded Ordinary Form universal calendar. It panics on a // malformed embedded file (a build-time bug caught by tests). func Universal() calendar.Layer { diff --git a/internal/caldata/tridentine-lectionary.ini b/internal/caldata/tridentine-lectionary.ini new file mode 100644 index 0000000..d0002ad --- /dev/null +++ b/internal/caldata/tridentine-lectionary.ini @@ -0,0 +1,222 @@ +; EF (1962) temporal lectionary, keyed by lectio's computed temporal-day slug. +; Generated from missalemeum (Divinum Officium). Epistle (first) + Gospel citations. + +[ef-advent-sunday-1] +first = Rom 13:11-14 +gospel = Luke 21:25-33 + +[ef-advent-sunday-2] +first = Rom 15:4-13 +gospel = Matt 11:2-10 + +[ef-advent-sunday-3] +first = Phil 4:4-7 +gospel = John 1:19-28 + +[ef-advent-sunday-4] +first = 1 Cor. 4:1-5 +gospel = Luke 3:1-6 + +[ef-christ-the-king] +first = Col 1:12-20. +gospel = John 18:33-37 + +[ef-christmas-sunday-0] +first = Gal 4:1-7 +gospel = Luke 2:33-40 + +[ef-easter-sunday] +first = 1 Cor 5:7-8 +gospel = Mark 16:1-7 + +[ef-easter-sunday-3] +first = 1 Pet 2:21-25 +gospel = John 10:11-16 + +[ef-easter-sunday-4] +first = 1 Pet 2:11-19 +gospel = John 16:16-22 + +[ef-easter-sunday-5] +first = Jas 1:17-21 +gospel = John 16:5-14 + +[ef-easter-sunday-6] +first = Jas 1:22-27 +gospel = John 16:23-30 + +[ef-easter-sunday-7] +first = 1 Pet 4:7-11. +gospel = John 15:26-27; 16:1-4. + +[ef-lent-sunday-1] +first = 2 Cor. 6:1-10 +gospel = Matt 4:1-11 + +[ef-lent-sunday-2] +first = 1 Thess. 4:1-7 +gospel = Matt 17:1-9 + +[ef-lent-sunday-3] +first = Eph 5:1-9 +gospel = Luke 11:14-28 + +[ef-lent-sunday-4] +first = Gal 4:22-31 +gospel = John 6:1-15 + +[ef-low-sunday] +first = 1 John 5:4-10 +gospel = John 20. 19-31 + +[ef-palm-sunday] +first = Phil 2:5-11 +gospel = Matt. 26:36-75; 27:1-60. + +[ef-passion-sunday] +first = Heb 9:11-15. +gospel = John 8:46-59. + +[ef-pentecost] +first = Acts 2:1-11. +gospel = John 14:23-31. + +[ef-septuagesima-sunday-1] +first = 1 Cor. 9:24-27; 10:1-5 +gospel = Matt 20:1-16 + +[ef-septuagesima-sunday-2] +first = 2 Cor. 11:19-33; 12:1-9 +gospel = Luke 8:4-15 + +[ef-septuagesima-sunday-3] +first = 1 Cor. 13:1-13 +gospel = Luke 18:31-43 + +[ef-time-after-epiphany-sunday-1] +first = Col 3:12-17 +gospel = Luke 2:42-52 + +[ef-time-after-epiphany-sunday-2] +first = Rom 12:6-16 +gospel = John 2:1-11 + +[ef-time-after-epiphany-sunday-3] +first = Rom 12:16-21 +gospel = Matt 8:1-13 + +[ef-time-after-epiphany-sunday-4] +first = Mal 3:1-4 +gospel = Luke 2:22-32 + +[ef-time-after-epiphany-sunday-5] +first = Col 3:12-17 +gospel = Matt 13:24-30 + +[ef-time-after-pentecost-sunday-10] +first = 1 Cor. 12:2-11 +gospel = Luke 18:9-14 + +[ef-time-after-pentecost-sunday-11] +first = 1 Cor. 15:1-10 +gospel = Mark 7:31-37 + +[ef-time-after-pentecost-sunday-12] +first = 2 Cor. 3:4-9 +gospel = Luke 10:23-37 + +[ef-time-after-pentecost-sunday-13] +first = Gal 3:16-22 +gospel = Luke 17:11-19 + +[ef-time-after-pentecost-sunday-14] +first = Gal 5:16-24 +gospel = Matt 6:24-33 + +[ef-time-after-pentecost-sunday-15] +first = Gal 5:25-26; 6:1-10 +gospel = Luke 7:11-16 + +[ef-time-after-pentecost-sunday-16] +first = Eph 3:13-21 +gospel = Luke 14:1-11 + +[ef-time-after-pentecost-sunday-17] +first = Eph 4:1-6 +gospel = Matt 22:34-46 + +[ef-time-after-pentecost-sunday-18] +first = 1 Cor. 1:4-8 +gospel = Matt 9:1-8 + +[ef-time-after-pentecost-sunday-19] +first = Eph 4:23-28 +gospel = Matt 22:1-14 + +[ef-time-after-pentecost-sunday-2] +first = 1 John 3:13-18. +gospel = Luke 14:16-24. + +[ef-time-after-pentecost-sunday-20] +first = Eph 5:15-21 +gospel = John 4:46-53 + +[ef-time-after-pentecost-sunday-21] +first = Eph 6:10-17 +gospel = Matt 18:23-35 + +[ef-time-after-pentecost-sunday-22] +first = Phil 1:6-11 +gospel = Matt 22:15-21 + +[ef-time-after-pentecost-sunday-23] +first = Phil 3:17-21; 4:1-3 +gospel = Matt 9:18-26 + +[ef-time-after-pentecost-sunday-24] +first = Rom 13:8-10 +gospel = Matt 8:23-27 + +[ef-time-after-pentecost-sunday-25] +first = Col 3:12-17 +gospel = Matt 13:24-30 + +[ef-time-after-pentecost-sunday-26] +first = 1 Thess. 1:2-10 +gospel = Matt 13:31-35 + +[ef-time-after-pentecost-sunday-27] +first = Col 1:9-14 +gospel = Matt 24:15-35 + +[ef-time-after-pentecost-sunday-3] +first = 1 Pet. 5:6-11 +gospel = Luke 15:1-10 + +[ef-time-after-pentecost-sunday-4] +first = Rom 8:18-23 +gospel = Luke 5:1-11 + +[ef-time-after-pentecost-sunday-5] +first = 1 Pet 3:8-15. +gospel = Matt 5:20-24. + +[ef-time-after-pentecost-sunday-6] +first = Rom 6:3-11. +gospel = Mark 8:1-9 + +[ef-time-after-pentecost-sunday-7] +first = Rom 6:19-23 +gospel = Matt 7:15-21 + +[ef-time-after-pentecost-sunday-8] +first = Rom 8:12-17 +gospel = Luke 16:1-9 + +[ef-time-after-pentecost-sunday-9] +first = 1 Cor. 10:6-13 +gospel = Luke 19:41-47 + +[ef-trinity] +first = Rom 11:33-36. +gospel = Matt 28:18-20 |
