aboutsummaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* fix(of): canonical OT ferial week numbering + CR-sourced ferial lectionaryLukasz Kasprzak2026-07-281-0/+119
| | | | | | | | | | | | | | | | | | | | | | The Ordinary Form ferial lectionary had two linked defects, both from harvesting niedziela.pl by date: (1) post-Pentecost Ordinary-Time ferial WEEK NUMBERS were one too high (temporal.go counted back from Christ the King using the weekday itself, not its preceding Sunday, so a ferial took the next week's number), and (2) ~17 ferial keys held a SAINT's readings (stored when a saint displaced the ferial on the queried date, e.g. week 22 smeared with a Marian Prov 8/John 2), plus 16 weekday slots were missing entirely. - temporal.go: number a span-2 ferial from its preceding Sunday. Verified 388/388 ferial-week agreement with calapi across 2026-2028. - scripts/genlect-of-cr.py: regenerate the Ordinary-Time ferial lectionary (first/psalm/gospel, both years, all 34 weeks) from catholic-resources.org (Fr. Felix Just, S.J.), which is keyed by liturgical position (immune to by-date contamination) and complete. Citations only; text still rendered from the public-domain corpora. of-lectionary.ini OT ferials now 408 (was 392). Fixes ~17 contaminated entries + 16 gaps + the week-numbering audit item. Psalms already share modern numbering, so no conversion. Adds TestOFOrdinaryTimeFerialWeek. Credits catholic-resources.org in NOTICE. Bumps to 0.40.0.
* feat: complete OF+EF calendar coverage (movable feasts, vigils, ember days, ↵Lukasz Kasprzak2026-07-282-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | transfers) Ordinary Form: - Add the movable Marian memorials that have no fixed date: Mary, Mother of the Church (Monday after Pentecost) and the Immaculate Heart (Saturday after the Sacred Heart), computed in computeOF. - General Norms 60: two coinciding obligatory memorials both become optional and the ferial is observed -- except Mary, Mother of the Church, which keeps precedence per its 2018 decree. Extraordinary Form: - Capture fixed-date vigils in the sanctoral harvest (Christmas, the Nativity of St John the Baptist, Sts Peter & Paul, St Lawrence, the Assumption, All Saints, the Immaculate Conception) -- previously filtered out. - temporalEF: the movable vigils of the Ascension (I class eve) and Pentecost (Whitsun Eve), and the September/Advent Ember days (II class violet ferias). - transferIfImpededEF: the Annunciation transfers past Holy Week/the Easter octave to the Monday after Low Sunday; All Souls moves to Nov 3 when Nov 2 is a Sunday. - genlect harvests proper Masses for the new Ember/vigil days. Adds TestEFCoverage + TestOFMovableMemorials. Bumps to 0.39.0. Verified per-day: OF 0 real errors vs calapi (2026-2028, 100% correct-observed); EF 0 real errors vs missalemeum (2025-2027), residual = deep-tail vigil-occurrence and St Joseph Passiontide-transfer edges (~1-2 days/yr, documented).
* fix(of): recover season-commemorated saints + correct Irenaeus rankLukasz Kasprzak2026-07-281-5/+42
| | | | | | | | | | | | | | | | | | | Audit of the OF sanctoral vs calapi's full celebration list (2026-2028) found saints that calapi only ever shows as 'commemoration' in a privileged season (Lent, late Advent, the Christmas octave) were dropped by the generator, and 'first-year-wins' froze a stale rank. - gen-sanctoral.go: map calapi 'commemoration' -> optional memorial; keep the HIGHEST rank per saint across an expanded 2025-2029 reference span (so a saint is seen at its true rank on an ordinary weekday, e.g. Polycarp as a memorial when Feb 23 falls in Ordinary Time). - Recovers 15 saints: Polycarp, Perpetua & Felicity, John of God, Frances of Rome, Patrick, Cyril of Jerusalem, Turibius, Isidore, Vincent Ferrer, Peter Canisius, John of Kanty, Thomas Becket, Sylvester I, and others (197->212). - Corrects St Irenaeus (June 28) optional -> obligatory memorial (2022 change). Verified vs calapi per-day 2026-2028: remaining diffs are only the 3 skipped movable memorials and name-phrasing of temporal days.
* feat(ef): full 1962 universal sanctoral (16 -> 317 celebrations)Lukasz Kasprzak2026-07-282-2/+404
| | | | | | | | | | | | Generate internal/caldata/tridentine-calendar.ini from missalemeum's per-date proper API (Divinum Officium 1962 data) via scripts/gen-sanctoral-ef.go: each fixed date's observed saint with rank, colour, English name and proper Epistle/Gospel citations, plus sancti commemorations. Multiple reference years are tried per date so a saint occulted by a Sunday in one year is still captured observed in another; saints never observed are ranked commemoration. Feasts of the Lord are marked class=lord. Latin names hand-curated (missalemeum has none). Adds TestTridentineLoads, credits missalemeum in NOTICE, bumps to 0.38.0.
* fix(of): sanctoral generation — exclude temporal & movable, keep ↵Lukasz Kasprzak2026-07-281-5/+16
| | | | | | | | | | | | | | | | transferred-fixed - Skip ALL dates the temporal engine owns (Sundays + its solemnities/feasts), so Christ the King / Trinity no longer leak into the sanctoral as duplicate fixed-date entries; saints are captured on their weekday occurrences. - Explicit skip-list for genuinely movable memorials (Mary Mother of the Church, Immaculate Heart, BVM-on-Saturday) that a fixed-date calendar cannot represent -- a documented gap needing temporal-engine support. - 'first year wins' keeps a transferred-but-fixed feast (Annunciation Mar 25) on its proper date. Lord-feast class inference fixed earlier. Calendar rank vs calapi: 2026 1/86, 2027 2/86, 2028 2/92 mismatches (~98-99%); residual = the skipped movable memorials.
* chore(of): extend lectionary harvest to 2018-2025 (98.4% coverage)Lukasz Kasprzak2026-07-281-3/+3
| | | | | | | More true-ferial years per position; 359/365 days of 2026 now resolve. The 6 residual gaps are rare pre-Lent Ordinary-Time positions (weeks 3/4/9) that never occurred as a true ferial in the harvestable past (niedziela publishes no future years) -- an irreducible limit of date-based harvesting, documented.
* fix(of): correct memorial readings (ferial fallback) + Lord-feast classLukasz Kasprzak2026-07-282-10/+22
| | | | | | | | | | | | | | | | | | | Validation vs USCCB (Catholic Readings API) caught two bugs: - Obligatory memorials were keyed by their own slug, freezing ONE year's ferial (a memorial's fixed date lands in a different Ordinary-Time week each year), so most weekday memorials showed the wrong week's reading. Now memorials are skipped in the harvest and fall back to the day's ferial slug at runtime -> the correct week's reading. (Proper-reading memorials show the permitted ferial; their propers are a later refinement.) - gen-sanctoral classOf missed feasts of the Lord whose title says 'Holy Cross' (not 'of the Cross') etc., so the Exaltation of the Cross (and Transfiguration, Presentation) did not displace an Ordinary Sunday. Fixed the Lord/BVM class inference; the Cross now correctly displaces the Sunday and shows its proper. USCCB agreement on the sampled 2025 window rose to ~92%; residual diffs are proper-reading memorials (Guardian Angels/Sorrows gospels), citation-granularity (same reading, different verse range), and week numbering around feast-displaced Sundays -- documented as known refinements.
* feat(of): full sanctoral calendar + weekday/memorial readingsLukasz Kasprzak2026-07-282-29/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Populate the OF General Roman Calendar sanctoral and extend the OF readings to weekdays and sanctoral days. Sanctoral calendar (roman-calendar.ini: 29 -> 202 celebrations): - scripts/gen-sanctoral.go generates it from calapi.inadiutorium.cz (authoritative General Roman Calendar) -- English name/rank/colour from general-en, Latin from general-la, Polish from niedziela DayInfo (obligatory celebrations). Fixed dates the temporal engine already computes are excluded. VALIDATED: my engine's observed rank agrees with calapi on all 86 obligatory sanctoral days of 2026 (0 mismatches). Precedence fix (precedence.go): an optional memorial no longer displaces the weekday as the DEFAULT observed celebration (it sorts below the ferial, shown as an option) -- matching the General Roman Calendar / calapi. Readings (of-lectionary.ini: 254 -> 1018 entries) via genlect-of.go: - Weekday (ferial) 2-year cycle I/II, keyed <ferial-slug>-<WeekdayCycle>, harvested from niedziela over 2020-2025 (multiple years per cycle; retry-on-failure so a glitch year never poisons a key; only TRUE ferials + optional-memorial days, where niedziela shows the ferial). - Obligatory memorials keyed by their OWN slug (niedziela shows their proper, e.g. Barnabas -> Acts 11, or the ferial for memorials without a proper) -- never miskeyed to a ferial position. - caldata.Readings: OF resolves slug+SundayCycle | slug+WeekdayCycle, else a memorial falls back to the day's ferial readings. - Source-glitch normalisation (1J->1 J, PnP->Pnp). books.ini: canonical names "Song of Solomon" and "The Acts" added as their own [en] forms (ToEnglishRef emits the canonical; it must resolve). Fixes ~32 cross-chapter Song-of-Songs/Acts citations. Coverage: 359/365 days of 2026 render (98.4%); 6 residual ferial positions never a true-ferial in 2020-2025. EF sanctoral and OF psalm renumbering still pending.
* feat(caldata): generate OF Sunday/solemnity lectionary from niedzielaLukasz Kasprzak2026-07-271-0/+162
| | | | | | | | | | | | | | | | | 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 <slug>-<cycle>, 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.
* build: corpus-validate script + add-corpus/check-corpora make targetsLukasz Kasprzak2026-07-271-0/+6
|
* feat(ef): complete offline EF readings — proper ferias, deuterocanon, ↵Lukasz Kasprzak2026-07-272-10/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Latin fallback Finish the Extraordinary Form (1962) offline Mass readings so every day of the year resolves in both English and Polish. Temporal engine (temporal_ef.go): - Unique ferial slugs "ef-<season>-<week>-<weekday>" so penitential-season weekdays (Lent, Advent, Passiontide, Easter octave) can key their own proper Masses; green-season ferias have no entry and fall back to the preceding Sunday (the 1962 rule). - Special "ef-lent-after-ashes-<weekday>" case for the days between Ash Wednesday and Lent I, which have their own propers. Lectionary (tridentine-lectionary.ini, 55 -> 143 entries) via genlect.go: - Generator now fetches proper-season weekdays and stores a feria only when its Mass differs from the preceding Sunday's. - cleanCite() normalises two missalemeum data glitches: a stray comma between book and chapter ("4 Kings, 5:1" -> "4 Kings 5:1") and a period-as-separator ("John 20. 19-31" -> "John 20:19-31"), both guarded so legitimate multi-chapter citations are untouched. Citations & corpora: - books.ini: Douay abbreviations in the [en] dialect (Ex, Ezech, Jonas, and 3/4 Kings -> canonical 1/2 Kings), so the EF Lenten epistles resolve while the display keeps modern sigla. - drb.tsv: +205 rows backfilling the deuterocanonical Daniel 13-14 (Susanna, Bel) and Esther 11-16 (Greek additions) from get.bible douayrheims, which the base corpus omitted; scripts/gen-deutero.py documents the fetch. Rendering (liturgy.go): - readingLine() falls back to the Latin Vulgate (complete) when the vernacular corpus lacks a passage, with a clear note. Covers the Polish Wujek deuterocanon gap (no clean public-domain source exists) and any future vernacular gap; faithful to the EF as a Latin rite. Result: 730/730 days resolve for both EN (native) and PL (native + Latin fallback for 3 deuterocanon days). Version 0.32.0 -> 0.33.0.
* feat: EF temporal Sunday lectionary (offline Sunday Mass readings)Lukasz Kasprzak2026-07-271-0/+110
| | | | | | | | | 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.
* test(calendar): EF oracle vs missalemeum 2025-2026 (0 season mismatches)Lukasz Kasprzak2026-07-271-0/+38
| | | | | | temporalEF validated against Divinum Officium data. Season-mapping handles the Whit octave (Paschaltide), the Christmas vigil (Advent), and the resumed Epiphany Sundays (within Time after Pentecost).
* test(calendar): regression oracle vs calapi 2020-2040 (0 season mismatches)Lukasz Kasprzak2026-07-271-0/+35
Caught + fixed an Advent-start bug: anchor on Christmas Eve, not Dec 25, so years where Dec 25 is a Sunday don't lose the first week of Advent. Rank-class diffs (324) are informational — the initial sanctoral dataset is partial.