aboutsummaryrefslogtreecommitdiff
path: root/internal/cli/liturgy.go
Commit message (Collapse)AuthorAgeFilesLines
* naming: localise liturgical day names in any languageLukasz Kasprzak2026-07-281-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add internal/naming, which renders temporal day names and celebration display names from the calendar engine's slugs in any language. English is the built-in baseline; a language is data -- an embedded lang/<code>.ini (pl shipped) and/or a user file at <config dir>/names/<code>.ini that overrides it key by key. Names compose from a small vocabulary plus per-language format templates, so word order and grammatical case can differ (e.g. Polish genitive "3. Niedziela Okresu Zwykłego"); any string a language omits falls back to English. - Move day-name generation out of calendar (calendar.HumanizeSlug removed, calendar stays a pure engine) into naming.DayName; the English golden cases carry over verbatim. - naming.CelebrationName unifies the three duplicated resolvers (cli/readings/calfeed): name.<lang> -> English -> Latin -> humanized slug. Saint names stay in the calendar data (name.<lang>), overridable via calendar layers. - config: ui_language now accepts any code (lower-cased, not clamped to en/pl) so names/<code>.ini applies; UI chrome still resolves en/pl and falls back to English. Add NamesDir(); wire naming.SetUserDir (and the previously unwired bible.SetUserCorporaDir) in the TUI and web mains too, so external corpora and name files work across all three binaries.
* refactor: remove the niedziela/missalemeum scrapers, bt, traditional_langLukasz Kasprzak2026-07-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | The daily view now computes entirely offline (previous commit), so retire the network path and everything that served it: - Delete internal/tradlit (missalemeum) and the niedziela scraper from internal/liturgy (fetch/store/parse + fixtures); keep Section, DayInfo and ExtractCitation. - Remove the "bt" version everywhere (render gatherBT + branches, config, i18n, web form, TUI) and bible.ToEnglishRef (Polish citation converter). A legacy config carrying "bt" migrates to "wuj" on load (config.migrateBT). - Remove the traditional_lang config field and the -g/--lang flag from all three binaries. - Drop the now-dead flags -R/--refresh, -o/--offline, -u/--update, -C/--clean and the harvest/clean commands. - New defaults: versions = wuj,vul,grb,drb; default_version = vul. Update the README (offline-by-design, no harvest/update), help text, and stale niedziela/bt doc comments. Tests updated for the offline reality; go test ./... and go vet ./... are clean, all three binaries build and run offline (OF + EF, compare, web).
* feat: humanize temporal-day display names (OF + EF)Lukasz Kasprzak2026-07-281-1/+1
| | | | | | | | | | Temporal days with no proper name showed a slug-derived string ('triduum fri', 'ordinary 11 tue', 'advent-dec-17'). Add calendar.HumanizeSlug, used by both celebrationName fallbacks (cli + calfeed), turning slugs into proper liturgical names: Good Friday, Ash Wednesday, 'Tuesday of the 11th Week in Ordinary Time', '11th Sunday in Ordinary Time', 'December 17', 'The Most Holy Trinity', and the EF forms ('4th Week after Pentecost', 'Passion Week', 'Ember Wednesday of September'). Adds TestHumanizeSlug.
* feat(calfeed): shared day builder + reusable reading resolverLukasz Kasprzak2026-07-271-20/+4
|
* feat(cli): config-driven reading corpus + surface user corporaLukasz Kasprzak2026-07-271-12/+29
|
* fix(readings): stop auto-rendering from the defective wuj corpusLukasz Kasprzak2026-07-271-3/+8
| | | | | | | | | | | | | | | The Wujek (wuj) corpus is missing the deuterocanonical Daniel 3:24-90 (Song of the Three), Daniel 13-14, and Esther 10:4-16:24, plus ~400 verses its builder (parse_bwujek.py) dropped or mis-numbered (e.g. Matthew 5:13/39 are in the source HTML but absent from wuj.tsv). Rendering computed readings from it silently produced gaps. vernacularVersion() now renders Polish from the complete Latin Vulgate (vul) instead of wuj; English stays on Douay-Rheims (complete after the deuterocanon backfill). wuj remains embedded for explicit `--ref -b wuj` and version comparison -- it just isn't auto-selected for computed reading text. A properly formatted Polish Bible can later be dropped in as a user corpus (the national-bibles feature) to restore native Polish rendering.
* feat(ef): complete offline EF readings — proper ferias, deuterocanon, ↵Lukasz Kasprzak2026-07-271-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(cli): EF ferial readings — weekdays repeat the preceding Sunday's MassLukasz Kasprzak2026-07-271-11/+26
| | | | | | dayReadings() falls back, for an EF weekday with no proper Mass, to the preceding Sunday's temporal lectionary (the 1962 green-season rule). Lenten/ Advent proper ferias show the Sunday's readings pending their own data.
* feat: EF temporal Sunday lectionary (offline Sunday Mass readings)Lukasz Kasprzak2026-07-271-14/+17
| | | | | | | | | 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.
* feat: books.toml -> books.ini, multi-language (add Latin dialect), ↵Lukasz Kasprzak2026-07-271-8/+13
| | | | | | | | | | config-scoped citation display books.ini with [en]/[pl]/[la]; parseBooks reads INI (bible drops go-toml). Latin dialect resolves EF citations (Eccli->Sirach, Apoc->Revelation, Luc...); sigla_style gains 'latin'. Reading citations now DISPLAY in the configured sigla (FormatRef(SiglaLang)), not raw English. One-shot books.toml->books.ini user migration (go-toml now config-only). Web settings editor -> books.ini.
* feat(cli,caldata): EF feast proper readings — offline text in --liturgyLukasz Kasprzak2026-07-271-3/+38
| | | | | | | Added 1962 Epistle+Gospel citations (from missalemeum) to the 15 EF feasts; --liturgy now resolves + renders the reading text via the corpora (drb/wuj), incl. deuterocanon (Assumption's Judith epistle). Cross-chapter citations use their primary range pending multi-chapter parser support.
* feat(caldata,cli): embed 1962 EF calendar + form-aware Stack; --liturgy ↵Lukasz Kasprzak2026-07-271-12/+18
| | | | | | | | computes EF caldata.Tridentine()/Base(form); Stack(form,dir,use); runLiturgy drops the EF guard and uses the form's base; rankLabel shows I-IV class; display omits OF cycles + strips ef- slug prefix for EF.
* fix(cli): --liturgy signals EF-not-implemented instead of silently returning OFLukasz Kasprzak2026-07-271-0/+8
|
* feat(cli): --liturgy uses the config 'use' layer stack (custom calendars ↵Lukasz Kasprzak2026-07-271-1/+6
| | | | take effect)
* feat(cli): 'lectio --liturgy/-L' prints the computed liturgical day offlineLukasz Kasprzak2026-07-271-0/+84
Uses the pure engine + embedded universal calendar; UI-language names, rank, colour, cycles, and inline proper readings. Added the Assumption's propers.