aboutsummaryrefslogtreecommitdiff
path: root/internal
Commit message (Collapse)AuthorAgeFilesLines
* calendar/readings: report Sunday as its own display rank, not solemnityLukasz Kasprzak2026-08-057-6/+103
| | | | | | | | | | | | | | | | The Ordinary Form's Table of Liturgical Days treats Sunday as its own category, never a solemnity. temporal.go's sundayDay() already marks these days distinctly from named solemnities (Class stays unset, unlike solemn()'s ClassLord); internal/readings/offline.go now reads that existing signal to relabel the REPORTED rank to "sunday" for ordinary and privileged-season Sundays alike, leaving Celebration.Rank, ofRankOrder and all precedence untouched. Named solemnities landing on a Sunday (Easter, Pentecost, ...) and feasts of the Lord (Holy Family) keep reporting their own rank. The 1962 form is untouched. Added calendar.RankSunday (display-only, deliberately excluded from ofRankOrder), the i18n Sunday/niedziela words, and a test pinning the exact dates from the original bug report.
* readings: PartIDs(new) stops declaring aklamacja, which the engine never emitsLukasz Kasprzak2026-08-052-2/+14
| | | | | | | | | | | | | | | | | | | | | caldata.go:42 parses only first/psalm/second/gospel out of the lectionary data, so no OF reading ever carries Part == "acclamation". PartIDs("new") listed aklamacja anyway, so the app built a checkbox from it that filters an ID that never appears -- a dead control, same defect class the app previously shipped for the whole 1962 form. ofPartOrder stays the full five-ID set: it also drives render.LocalizeHeading's label matching, where a scraped heading can still read "Aklamacja" even though this engine's own readings never produce that section. PartIDs now draws from a new, narrower ofEmittedPartOrder instead. Rewrote TestPartLabelsMatchesWhatTheEngineEmits's OF half: it compared PartLabels("of") to a hand-copied duplicate of ofPartOrder, asserting a declaration against itself, which cannot fail for this class of bug. It now sweeps Days over calendar year 2026 and asserts PartLabels("of") matches the observed part-ID set exactly (0.5s). Confirmed red against the pre-fix code, green after.
* i18n: pin the Polish part labels; cross-reference the part-ID ordersLukasz Kasprzak2026-08-043-0/+48
|
* readings: 1962 part labels become i18n data; export PartIDsLukasz Kasprzak2026-08-035-13/+90
|
* i18n: correct rank doc comments and pin the Polish wordingLukasz Kasprzak2026-08-034-6/+36
|
* liturgy: carry the observed rank on DayInfoLukasz Kasprzak2026-08-033-0/+36
|
* i18n: drop the colour word table, it has no consumerLukasz Kasprzak2026-08-035-36/+1
|
* i18n: rank and colour vocabulary tablesLukasz Kasprzak2026-08-035-2/+124
|
* caldata(ef): trim redundant trailing ', Apostołów' from Peter&Paul basilicasLukasz Kasprzak2026-07-301-1/+1
|
* caldata(ef): fix Apostołow -> Apostołów typo (Simon & Jude)Lukasz Kasprzak2026-07-301-1/+1
|
* caldata(of): capitalise the Apostoł/Ewangelist title in Polish namesLukasz Kasprzak2026-07-301-6/+6
| | | | | | | | | | Per the review, the apostle title was split ("św. X, apostoła" vs ", Apostoła") and the evangelist title too (Mark/Matthew already "Ewangelisty", John/Luke lowercase). Standardise both high author-ranks to uppercase -- all apostles "Apostoła"/"Apostołów", all four evangelists "Ewangelisty" -- matching the entries that were already capitalised. The functional titles (biskupa, prezbitera, męczennika, doktora, dziewicy...) stay lowercase, as they consistently were.
* caldata(of): fix Philip & James Polish name (was Queen of Poland)Lukasz Kasprzak2026-07-291-1/+1
| | | | | | | | | | | The universal [saints-philip-and-james-apostles] entry carried name.pl = "Najświętszej Maryi Panny, Królowej Polski" -- Our Lady Queen of Poland, the Polish NATIONAL feast that supersedes Philip & James on that date, pasted in during the pl backfill instead of translating the universal celebration. name.la and the readings correctly say Philip & James. Set name.pl = "świętych Apostołów Filipa i Jakuba" (matching the "świętych Apostołów Piotra i Pawła" style). Scanned the rest of both universal calendars for other national-feast contamination -- none.
* calendar: name the liturgical form fully in the printed title; v0.45.1v0.45.1Lukasz Kasprzak2026-07-296-3/+16
| | | | | | | | | | | The exported month calendar's title showed the terse dropdown word ("August 2026 — traditional"). Spell the form out: "traditional roman calendar" / "novus ordo calendar". Add dedicated i18n labels CalModern/CalTraditional (translatable like the rest of the chrome; pl = "kalendarz Novus Ordo" / "tradycyjny kalendarz rzymski") rather than overloading the short OptModern/OptTraditional the settings dropdown uses. Bump version to 0.45.1.
* release: bump version to 0.45.0v0.45.0Lukasz Kasprzak2026-07-291-1/+1
| | | | | | | | The version constant sat at 0.44.0 while 44 commits landed on top of it: the engine-flawlessness pass, the localization + bible-corpora-split epic (any-language day/saint names, embedded-chrome-as-data, EF Polish sanctoral 322/322), the web UI rework, the EF Christmas-ferial name fix, and the cli test-config isolation. Mark the release as 0.45.0.
* test(cli): isolate the suite from the real ~/.config/lectioLukasz Kasprzak2026-07-291-0/+26
| | | | | | | | | | | | | | The ref/rand cli tests assume English book abbreviations ("Jn 3:16"), but with no LECTIO_CONFIG set they read the developer's real user config. On a machine whose config has ui_language = pl (sigla_style = auto -> Polish dialect), "Jn" is not a valid abbreviation and TestRefSingle, TestRefEnglishDialect, TestRefRejectsPolishAbbrevInEnglish, TestRefCompare and TestRandVerse fail -- while passing on a clean CI. Add a package TestMain that points LECTIO_CONFIG at a throwaway temp path, forcing built-in defaults for every cli test and guaranteeing the suite never reads or writes the real user config. Suite now green on a Polish config too.
* caldata(ef): finalise the 4 review-flagged Polish namesLukasz Kasprzak2026-07-291-5/+1
| | | | | | | | | | Reviewed the four EF names missalemeum never returns. George (Martyr), Stanislaus (Bishop and Martyr), and Zephyrinus (Pope and Martyr) were correct as best-guessed -- flags cleared as-is. Alexander & Companions had enumerated only three of the martyrs (omitting Juvenal); since the English name is the shortened "& Companions", match it with the faithful Polish "śś. Aleksandra i Towarzyszy, Męczenników". No more # review-pl flags; all 322 EF names stand.
* naming(pl): localise the Christmas-season name in composed ferial namesLukasz Kasprzak2026-07-291-0/+2
| | | | | | | | | | | | EF ferials in the Christmas season rendered with an English season word in a Polish UI -- "Poniedziałek Christmas" (2026-01-05) -- because the Polish [seasons] table had no "christmas" key, so season() fell back to the English title-cased slug. Add christmas = "Narodzenia Pańskiego" (and the empty season_prep entry), matching the existing genitive style (Adwentu, Wielkiego Postu). Now "Poniedziałek Narodzenia Pańskiego". Verified across the whole Christmas-Epiphany window for both forms; English output unchanged.
* web(settings): drop the terminal "versions" field; it is CLI-onlyLukasz Kasprzak2026-07-292-8/+7
| | | | | | | | | | | | | The settings page showed two near-identical version checkbox rows -- "versions" (the terminal compare set) and "web_versions" (the web page's own default ticks). The first only affects the CLI, so editing it from the web is pointless and was actively confusing (both rows list the same wuj/vul/grb/drb boxes). Remove the "versions" row from the form and stop reading it in settingsPost, so cfg.Versions is preserved from the live config (same pattern as offline/width/pager). The web settings now expose only what the web uses: default_version and web_versions.
* web: pin settings/download to the top-right corner, never wrap it downLukasz Kasprzak2026-07-291-2/+15
| | | | | | | | | | | | | | Per the target layout: the utility cluster (settings + the pobierz disclosure) must hold the top-right corner on the same row as the reader link, not drop onto a second full-width line below the controls. Make #controls itself non-wrapping so the side cluster keeps the corner; the left controls (.controls-main) absorb any tightness by wrapping their OWN items onto a further line (min-width:0 lets them shrink). At the 64rem page width the whole bar cannot fit every left control AND the corner cluster on one line, so a trailing control (layout) wraps beneath -- the intended block-on-the-left, cluster-in-the-corner shape. A tighter column gap buys a little room; on phones (<=40rem) the bar wraps normally.
* web: reader link to the left, downloads into a "pobierz" disclosureLukasz Kasprzak2026-07-293-13/+88
| | | | | | | | | | | | | | | | | Finish the top-bar rework. The reader entry point now leads the controls bar on the far left (it was in the right-hand cluster); settings stays in the top-right cluster. The flat "download: txt md pdf · kalendarz" strip becomes a single "pobierz" summary that opens a small floating panel with two rows: - a month calendar with its own month + year <select> pickers (localised month names, both pre-selected from the shown date) and a PDF button that hits /calendar?month=YYYY-MM; - the shown day's readings as txt/md/pdf, labelled with the date. The panel is absolutely positioned under the link so opening it doesn't reflow the bar. indexData gains MonthOpts/YearOpts (a calOpt list); the year picker is a small window around the shown year.
* caldata(ef): add Polish names to the traditional sanctoralLukasz Kasprzak2026-07-291-0/+326
| | | | | | | | | | | | | | | | | | The EF (traditional) calendar showed English memorial names even with the UI switched to Polish, because tridentine-calendar.ini carried only name.en. Add name.pl to all 322 sanctoral entries. Source: missalemeum.com's Polish propers (/pl/api/v5/proper/DATE), the authoritative Polish traditional-calendar naming -- paired to each entry by the celebration id shared across its /en/ and /pl/ responses, fetched across two years so saints superseded by a Sunday in one year are still resolved. 318 entries matched that way; a missalemeum source typo ("Dokotra" -> "Doktora") is corrected in the two it affected. The remaining 4 -- George, Alexander & Companions, Stanislaus, Zephyrinus -- are never returned by missalemeum in the fetched years (superseded every time); they carry a best-guess Polish name tagged with a "# review-pl" comment for a human to verify.
* web: move lectionary + mono to settings only; make reader link prominentLukasz Kasprzak2026-07-292-12/+11
| | | | Lectionary becomes settings-only (kept as a hidden field so readings/export/calendar still use the configured value); mono toggle removed (settings has it). The reader link is uppercased + bold as the primary action.
* web: pin the utility cluster to the top-right of the controls barLukasz Kasprzak2026-07-292-3/+17
| | | | | | | Wrap the essential controls in a single .controls-main block that wraps internally, so reader/settings + downloads stay at the TOP-right instead of dropping to a second row. #controls (index only) becomes top-aligned; the reader's .controls form is untouched.
* web: declutter the UI, fix date arrows, red * for bookmarked verses in readerLukasz Kasprzak2026-07-2910-82/+93
| | | | | | | | | | | | | | | | | | | | | | | | | Daily page (index.html): - Date arrows now step the date input client-side and dispatch its change, so they move relative to the CURRENT day and update the shown date (they were stuck one step from the initial date, computed server-side). - Theme picker removed (theme lives only in /settings now); bookmarks link removed (bookmarks belong to the reader, not the daily readings). - reader/settings nav + the download links move to a right-aligned .controls-side cluster; essential controls (date, lectionary, versions, parts, layout, mono) stay on the left. mono stops its change bubbling so it no longer refetches. Reader (reader.html + RenderPassage): a bookmarked verse now shows a red "*" (end of line in columns, after the verse number interlinear). Threaded a marked set (keyed "chap:verse") through the reader render path only; the daily RenderReadings path is untouched. Settings (settings.html): Save button moved to the top; removed offline (dead), width and pager (CLI/TUI-only, no web effect) -- their config values are preserved since the handler no longer reads/zeroes them. Footer: source/licence centred. Web tests + full suite green both build modes.
* tui(reader): flag bookmarked verses with a red * in the reading paneLukasz Kasprzak2026-07-292-7/+71
| | | | | | | A verse that has a bookmark now shows a red "*" at the end of its last line, so saved verses are visible while reading. The set of bookmarked verses for the current book+chapter is refreshed on chapter load, on save, and on returning from the bookmarks list (one store read each). Test covers the flag + render.
* tui(reader): filter bookmarks by tag, and show tags in the listLukasz Kasprzak2026-07-295-45/+157
| | | | | | | | | Bookmarks stored tags but the list neither showed them nor let you use them. Now each row shows "Ref — note #tag1 #tag2", and `/` opens a live tag filter (case-insensitive substring over a bookmark's tags): type to narrow, Enter keeps the filter while j/k navigate the filtered list, Esc clears it. Navigation, open and delete all act on the visible (filtered) list. Reuses the store's existing tag data; help keybar (en/pl) updated; test covers filter/keys.
* bible(wuj): strip leaked verse numbers from the deuterocanon textLukasz Kasprzak2026-07-291-3797/+3797
| | | | | | | | | | | | | | ~3,800 verses carried their own verse number at the start of the text (a biblia.info.pl harvest artifact concentrated in the deuterocanonical books -- Sirach, 1-2 Maccabees, Wisdom, Judith, Baruch, at 90-98% of each, plus 3 strays in Ezra/Proverbs). E.g. Sirach 4:4 read "4 Nie odrzucaj..." instead of "Nie odrzucaj...". It passed every check: verse counts are unaffected, and the verses aren't short. Strip a leading token only where it exactly equals the verse number (so a genuine "40 dni" in a non-matching verse is untouched), and only when text follows. 3797 verses fixed; 35,810-row parity preserved, no verse emptied, no new warnings; --corpus-check wuj still clean; make test green.
* bible(corpus-check): warn on a verse present but stubbed vs the VulgateLukasz Kasprzak2026-07-294-4/+59
| | | | | | | | | | | | | | | | | | The count-based checks (gap, duplicate, missing chapter) only see a verse's presence, so a verse that IS there but truncated -- a lost opening line, a merge artifact, the exact class that lost 44 psalm openings and Acts 6:5 from the old Wujek scrape -- passes silently. Add a warning for it, compared CROSS-CORPUS to the aligned Vulgate verse (never within the chapter). That is deliberate: a genuinely terse verse ("Non occides", "Jesus wept") is short in the Vulgate too, so it is not flagged; only a corpus stub against a substantial Vulgate verse fires (corpus <12 chars, <1/4 of a Vulgate verse >=40). Rune-counted (script-agnostic) and skipped on the Psalms when the corpus renumbers them (psalm_system != vulgate), where per-verse alignment with the Vulgate would not hold. Warning only, never an error. Zero false positives across vul/wuj/drb/grb; a `stub` testdata fixture (Genesis 1:1 = "x") exercises a real hit.
* test(bible): skip corpus-dependent tests when optional corpora aren't embeddedLukasz Kasprzak2026-07-2910-101/+287
| | | | | | | | | | | | | | | | | | | | | | | | Since 51c0f4e split the corpora (only vul embedded by default; wuj/drb/grb behind -tags fullbible), `go test ./...` on the default build was red across six packages -- every failure was a test assuming an optional corpus is present. Guard those assertions with a skip keyed on bible.Meta(code), so they run under -tags fullbible and skip -- not fail -- on the default vul-only build. Mixed tests are split into subtests so the always-embedded vul assertions and pure logic (pl->vul fallback, explicit passthrough, bt-rejection, i18n labels) keep running on both builds. Test-only change; no product code or corpora touched. - internal/bible: TestVerses, TestLookup, TestCorpusBooks, TestChapters, TestGrbNoApparatusMarkers, TestCrossChapterRange* (requireCorpus helper). - internal/cli, config, render, tui, web: the same pattern for their corpus-dependent tests. - Fixes an index-out-of-range panic in internal/tui's reader tests that was aborting the package binary and masking 3 further corpus-absence failures (TestReaderBookmarkFlow, TestReaderChapterJump, TestReaderRemembersPlace). Verified: `go test ./...` and `go test -tags fullbible ./...` both green (0 FAIL); guards active only on the default build (29 skips vs 1 unrelated pre-existing); gofmt and go vet clean.
* bible(grb): restrict to the Vulgate canon; restore Hosea and ZechariahLukasz Kasprzak2026-07-291-26696/+22951
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | grb failed corpus-check outright: 15 errors, and two whole books absent from lectio at runtime with no error and no warning. Upstream grb is a standalone Septuagint reader carrying 87 books. lectio needs one uniform canon, so scripts/gen-grb-lectio.py derives the 73 books vul has rather than forking -- upstream stays intact and keeps everything. Eleven books have no Vulgate counterpart and are dropped, including 2 Esdras, which upstream's README explains IS Ezra + Nehemiah under the Septuagint's name; verified byte-identical, so nothing is lost. Five books ARE canonical under other names and are remapped, and the verse counts show which witness the Vulgate follows -- Jerome translated Theodotion, not the Old Greek: Bel and the Dragon (Theodotion) 42 = vul Daniel 14 (42) exact Bel and the Dragon (LXX) 37 no Sussana (Theodotion) 64 = vul Daniel 13 (65) Sussana (LXX) 37 no Letter of Jeremiah 73 = vul Baruch 6 (72) Wisdom of Solomon 435 = vul Wisdom (439) Upstream's plain "Daniel" is the Old Greek and is missing chapter 4 outright, so Theodotion supplies Daniel throughout: complete, and the tradition the lectionary actually cites. lectio thereby GAINS Wisdom, Daniel 4, Daniel 13-14 and Baruch 6 in Greek rather than losing them. Three upstream defects are repaired in transit: * 408 rows carried 5 fields, not 6 -- a lost tab fused the book number and chapter ("281" = book 28, chapter 1). Every one was in Hosea or Zechariah, and neither book had a single well-formed row, so bible.go skipped both entirely. Hosea (197 verses) and Zechariah (211) are back. * 5 merged verse labels ("27-28") that strconv.Atoi turns into verse 0. * A UTF-8 BOM welded to the first book name, making "Genesis" a phantom 74th book matching nothing. The SBLGNT apparatus sigla are stripped, as TestGrbNoApparatusMarkers requires; regenerating from raw upstream reintroduces ~8700 of them. grb now passes. The remaining warnings are the Septuagint being itself -- Jeremiah is LXX-numbered (grb 33:2 is the Vulgate's 26:2), Esther integrates its additions into chapters 1-10, LXX Malachi has three chapters, and 3 Kingdoms carries supplements like 10:22a that upstream stores as a duplicate verse 22. Silencing those would mean deleting real Greek text.
* bible(drb): renumber three chapters, fill eight absent versesLukasz Kasprzak2026-07-291-4618/+4626
| | | | | | | | | | | | | | | | | | | | | | Eight corpus-check warnings, of two kinds. Three chapters (Exodus 40, Genesis 49, Song of Solomon 1) held exactly as many verses as the Vulgate but numbered with a gap. The count pins the mapping, so renumbering 1..N is safe and changes no text. Five chapters were genuinely short. The missing verses came from get.bible's douayrheims -- the same public-domain source and API scripts/gen-deutero.py already uses for this corpus, so no new provenance is introduced. Scope was deliberately narrowed to the flagged chapters. A first pass over every chapter shorter than the Vulgate pulled in 938 verses, 820 of them in Psalms -- but drb.ini declares psalm_system = drb, a different numbering, so matching by Vulgate verse number there would have inserted the wrong text under the wrong numbers across the Psalter. One warning remains and is not a defect: Baruch 6 runs 1-72 with verse 37 absent in drb and in get.bible alike, a genuine Douay/Vulgate versification difference faithfully represented.
* bible(wuj): rebuild from source, repair to exact Vulgate parityLukasz Kasprzak2026-07-291-362/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Wujek corpus was missing text and mis-numbering what it had: 453 corpus-check warnings, 8 absent chapters, 84 duplicate rows, and 357 chapters holding fewer verses than the Vulgate. Most of it was never a sourcing problem. The original harvest of biblia.info.pl assumed one verse is one <p>, but many psalms print the superscription in the anchored paragraph and the psalm's opening line in an unanchored one behind a drop cap -- so 44 psalms lost their first line, and Acts 6:5 and others went the same way. Re-harvested with the anchor treated as a verse START rather than a whole verse (scripts/scrape-wujek.py), which also had to cope with four anchor shapes across books, hidden page markers opening paragraphs mid-verse, chapter ids that are simply wrong (Mark labels 87 anchors "15:*" across chapters 14-16), and Psalms heading its divisions "Psalm CXVII" where every other book says "Rozdzial N". Structure was then repaired against the Clementine Vulgate, by hand where a rule would have guessed: * The Acts 5 interleaved three streams -- Acts 4:27-37 duplicated, the real 5:1-37, and 5:38-39 mislabelled 28-29. Verified against the Latin, the duplicates dropped, the two renumbered. Acts 4:27 kept the site's own wording in place of a 1962 reading, removing a seam. * The site heads psalms by Hebrew division; its "Psalm 114" is two psalms. Split into Vulgate 113:9-26 and 114:1-9, confirmed at all four boundaries. * A corrupt anchor for 1 Chronicles 9:11 pushed 34 paragraphs of genealogy into chapter 10. Counts corroborate: 10 + 34 = 44 verses, remainder 14, both exactly the Vulgate's. * 16 chapters looked short at the end; only two verses were truly absent. The rest were merges, split at anchors read off the Latin -- including one across a chapter boundary (Colossians 4:1 sat inside 3:25) and four numbering offsets where a mid-chapter merge shifted everything after it. wuj now carries exactly the Vulgate's verse set: 35810 rows, every one of the 1334 chapters matching, no duplicates, no gaps. corpus-check: 0 warnings. The ~300 verses that could not come from biblia.info.pl are recorded in NOTICE; they are not public domain.
* feat(clectio-gen): apply a calendar layer/sanctorale when generatingLukasz Kasprzak2026-07-291-1/+14
| | | | | | | | | | | | | | | | | | | Add opt-in flags so clectio's tables can be regenerated from a customized calendar instead of only the embedded universal one: clectio-gen -caldir DIR -use a,b [-sanctorale DIR] <new|old> y0 y1 out/ - -caldir + -use stack calendar layers (rank, colour, name, reading.*) over the calendar; -sanctorale DIR applies a full of.ini/ef.ini replacement. - The BOOK table stays hermetic (LECTIO_CONFIG still points nowhere), so the generator can't read a stale user books.ini -- calendar customization and the book aliases are kept separate concerns. - config.SetCalendarsDir lets CalendarsDir be pointed at an explicit layer dir without a full config tree (and without an unrelated books.ini there). Verified end to end: a layer adding a feast with a proper gospel regenerates into liturgy_of.h + verses_of.keys, and the rebuilt clectio shows it. Default (no flags) output is byte-identical to before. make test green.
* feat(cli): --cal-dump NAME to generate a commented calendar templateLukasz Kasprzak2026-07-292-1/+110
| | | | | | | | | | | | | | | Replace the static examples/sanctorale-of.ini with a `--cal-dump NAME` flag that writes the running universal calendar to ~/.config/lectio/calendars/NAME.ini as a fully-commented layer template (every celebration present, all commented). Uncomment one day and edit a field to override it; enable with `use = NAME`. - Form-aware: respects -l/--lectionary, so `-l trad --cal-dump x` dumps the 1962 calendar (322 entries) and the default dumps the OF calendar (212 entries). - Entries sorted by date then slug; refuses to overwrite an existing file. - Always in sync with the embedded (or sanctorale-overridden) calendar, so no stale checked-in template to maintain. - Update help text, man page (OPTIONS/FILES/EXAMPLES) and README to match; drop examples/sanctorale-of.ini.
* cli: --year N prints the year's key liturgical datesLukasz Kasprzak2026-07-292-1/+131
| | | | | | | | | On its own, `--year N` now prints a human-readable overview of the year's key dates -- season boundaries, solemnities and feasts of the Lord -- computed from the engine for the configured form (and custom-calendar layers), paged when a pager is configured. With --format json|ical it still emits the machine calendar (runFeed) as before. Numbered seasonal Sundays and Octave weekdays are omitted from the solemnity list (the season boundary already marks them).
* help: refresh -h/--help for lectio, lectio-ui, lectio-webLukasz Kasprzak2026-07-281-4/+11
| | | | | | | | | | | | | | | | The help text predated this session's changes. Update all three binaries: - Taglines: drop "(Polish + 4 versions)" -> "offline ... daily readings (OF + EF)". - Versions: state that only the Latin Vulgate is built in; wuj/grb/drb are optional (make build-full, or drop <code>.tsv/.ini into the corpora dir); a missing version renders "(not in <code>)". - --ui-lang: now any code (en, pl, ...), not just pl|en; note names/<code>.ini, ui/<code>.ini, custom calendars and the sanctorale override. - lectio-ui: drop the removed "bt" version and the no-op -o/--offline flag from the help (the tool is fully offline; --offline only ever dropped bt). - lectio-web: drop -o/--offline; add a one-line description of what it serves. No behaviour change; full suite green.
* bible: add Douay book aliases Osee->Hosea, 2 Esdras->Nehemiah; clectio-gen ↵Lukasz Kasprzak2026-07-281-2/+2
| | | | | | | | | | | | | | | | hermetic Two EF Ember-day lessons ("Osee 14:2-10", "2 Esd. 8:1-10") rendered as "(not in vul)" because the lookup path (ResolveBook, English dialect) lacked these Douay-Rheims book forms -- they existed only in the Latin dialect, which ResolveBook does not consult. Add them to the [en] dialect so both lectio and clectio resolve them (the text is present in vul: Hosea 14, Nehemiah 8). Also make clectio-gen hermetic: it now points LECTIO_CONFIG at a nonexistent path so it always uses the EMBEDDED calendar/lectionary/book table, never the running user's ~/.config/lectio (whose stale books.ini was silently dropping ~30 EF readings from the generated data). It warns on any reading it cannot resolve. Full range 2025-2054 now generates with 0 dropped readings.
* cmd/clectio-gen: generator for the tiny C build; bible.LookupKeyedLukasz Kasprzak2026-07-281-0/+54
| | | | | | | | | | | | | | | clectio (~/git/projects/clectio) is a tiny suckless-C daily-readings build that compiles the calendar, citations and scripture text in. clectio-gen is its data compiler: it reuses this engine to compute, for a year range, each day's name/colour/readings and emits corpus-independent C tables plus the verse KEYS, so the C side is a dumb lookup and the hard liturgical logic stays here (oracle-validated). - bible.LookupKeyed(version, ref) returns each resolved verse's (book, chapter, verse) key, mirroring Lookup's splitting/versification. clectio-gen uses it to record the exact pericopes a lectionary cites. - Verified: clectio's output is byte-identical to lectio's readings, day names 157/157 over a 3-year sample.
* config: drop go-toml and the legacy TOML migrationsLukasz Kasprzak2026-07-282-138/+40
| | | | | | | | | | The one-shot config.toml -> config.ini and books.toml -> books.ini migrations (a transition aid from the pre-INI format) are removed, along with the github.com/pelletier/go-toml/v2 dependency and the now-dead `toml:` struct tags. The live config format has been INI for many releases; anyone still on a .toml recreates it (the format is self-documenting on first run). Leaves 3 direct deps, all in active use (bubbletea, lipgloss, go-pdf/fpdf). Tests updated to write INI.
* caldata: allow an external universal sanctorale to override the embedded oneLukasz Kasprzak2026-07-284-1/+94
| | | | | | | | | | | | | | | | The universal calendar of saints can now be refreshed or replaced without a rebuild: if ~/.config/lectio/sanctorale/of.ini (OF) or ef.ini (EF) is present and parses, caldata.Base uses it instead of the embedded calendar; a missing or malformed file falls back to the embedded default, so the binary stays self-contained and correct out of the box. Local diocesan/national additions keep layering on top via calendars/ + `use` (unchanged). The temporal cycle and precedence rules stay in code -- only the sanctorale is data. - caldata.SetSanctoraleDir hook (mirrors bible/naming/i18n); Base() prefers the external file per form. config.SanctoraleDir(); wired in the CLI, TUI and web entry points. Tests cover override, no-file, and malformed-file fallback. - README: new "Calendar of saints" section (two tiers: overlay via `use`, replace via sanctorale/<form>.ini); config comment notes the override.
* caldata: backfill Polish names for the whole OF universal sanctoralLukasz Kasprzak2026-07-281-0/+132
| | | | | | | | | | | Add name.pl to the 132 universal-calendar celebrations that lacked it, so all 212 now carry Polish names (was 80). They follow the existing liturgical style -- genitive case, "św. <name>, <title>" / "świętych ...", feast events in the genitive -- hand-curated from standard Polish nomenclature and keyed to each entry's name.en/name.la. Polish patrons use their Polish forms (Adalbert -> św. Wojciech, John of Kanty -> św. Jana Kantego, Hedwig -> św. Jadwigi Śląskiej). Verified: feast/solemnity saints render their Polish name as the day header, optional memorials appear as Polish options in the day's others.
* i18n: make all UI chrome user-translatable via ui/<code>.iniLukasz Kasprzak2026-07-289-187/+627
| | | | | | | | | | | | | | | | | | | | The interface chrome (version labels, TUI keybar/messages, CLI banner words, web control labels, section-heading words) was English/Polish hardcoded in Go. It is now data: the English and Polish tables ship as embedded lang/en.ini and lang/pl.ini, and any language is user-overridable at <config>/ui/<code>.ini, resolved per key with an English fallback. With ui_language = <code> plus a names/<code>.ini, the WHOLE interface -- chrome, day names, saint names -- is translatable without a rebuild. - i18n.Get loads the embedded English baseline, overlays the embedded/user language file, caches per lang; field <-> INI-key mapping is by reflection (lang.go) so the tables and files stay in sync automatically. Edge-space values (e.g. "error: ") are double-quoted so the INI trim keeps them. The Go tables move to golden_test.go; TestGoldenMatchesEmbedded asserts the embedded files still parse back to them, and TestGenerateLangFiles regenerates them (LECTIO_GEN=1). - config.UIDir(); wire i18n.SetUserDir in the CLI, TUI and web entry points. - README/config: document ui/<code>.ini alongside names/<code>.ini.
* naming: localise liturgical day names in any languageLukasz Kasprzak2026-07-2811-240/+657
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* bible: embed only the Vulgate by default; other corpora opt-inLukasz Kasprzak2026-07-2813-4525/+5320
| | | | | | | | | | | | | | | | | Split the bundled corpora so the default binary carries only the public-domain Latin Vulgate. wuj/drb/grb move to corpora_optional/ and are compiled in only with `-tags fullbible`, or dropped into the user corpora dir at runtime. This keeps the distributed AGPL binary free of third-party scripture text -- bible corpora are not covered by lectio's licence. - bible: read corpus files/metadata from core + optional embed FS (embReadCorpus/embCorpusFiles); optionalFS is set only under the tag. - config: default `versions` now reflects corpora actually available in the build (Vulgate first), so a vul-only binary offers no absent versions. - Makefile: `make build` = vul only; `make build-full` embeds the rest; `make test` runs with -tags fullbible; check-corpora validates both dirs. - tests: corpusmeta asserts on vul (the always-embedded corpus); the versions-default expectation follows availableVersions().
* fix(EF): resumed Sundays after Pentecost use the Epiphany MassesLukasz Kasprzak2026-07-282-14/+20
| | | | | | | | | | | In early-Easter years there are more than 24 Sundays after Pentecost. Per the 1960 Rubrics the surplus Sundays resume the Sundays after Epiphany that Septuagesima cut short (highest-numbered first) and the last Sunday keeps the 24th (Last) Mass. temporalEF now routes those Sundays to the resumed Epiphany slug for readings while keeping the calendrical time-after-pentecost season; the mis-harvested tail entries (post-Pentecost sundays 24-28) are corrected to the true 24th Mass and the surplus removed. Validated: 88/88 tail/resumed Sunday gospels match missalemeum 2025-2050; EF oracle green.
* fix(EF): fill reading gaps (major feasts, feria-repeat-through-feast, sundays)Lukasz Kasprzak2026-07-283-3/+37
| | | | | | | | | | | | | | | | EF readings had ~1.8% of days with no readings (major feasts falling back to the wrong Sunday, feria-repeats broken when the preceding Sunday was a feast). Now 0 gaps over 9496 days (2025-2050); reading correctness spot-checks match missalemeum except the resumed-Epiphany-Sunday edge (next commit). - calendar.TemporalSlug: the green-season weekday-repeats-the-Sunday rule uses the Sunday's TEMPORAL slug, so a Monday still finds its Sunday Mass when that Sunday was displaced by a feast (e.g. the Purification on Feb 2). - Add the missing EF temporal Masses (from missalemeum): the Nativity Day Mass (Heb 1:1-12 / John 1:1-14), Epiphany (Isa 60:1-6 / Matt 2:1-12), the Octave Day of Christmas (Titus 2:11-15 / Luke 2:21), the 6th Sunday after Epiphany (1 Thess 1:2-10 / Matt 13:31-35), and the last Sunday after Pentecost (Col 1:9-14 / Matt 24:15-35).
* fix(calendar): OF precedence/transfer + readings resolution; EF Pentecost octaveLukasz Kasprzak2026-07-2810-32987/+33162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes found by validating the offline engine per-day vs the LiturgicalCalendar API (OF) and missalemeum (EF) across 2005-2050. OF calendar is now 0 real errors in the forward window (season/cycle already perfect). OF precedence/transfer (calendar): - Ash Wednesday and Holy Week Mon-Wed are band-2 privileged, so a coinciding feast (Chair of St Peter on Ash Wednesday) is suppressed, not observed. - Solemnities transfer out of Holy Week / the Easter octave: the Annunciation defers to the Monday after the 2nd Sunday of Easter; St Joseph is anticipated to the Saturday before Palm Sunday; the Nativity of St John the Baptist moves to Jun 23 when a Lord's solemnity (Sacred Heart / Corpus Christi) falls Jun 24. - Within a precedence band, a solemnity of the Lord/BVM outranks a saint's (dignity tiebreak) rather than losing an alphabetical slug tie. - Perpetua & Felicity corrected optional -> obligatory memorial. OF readings resolution (bible.OFRef + lectionary data): - Verse-accurate Hebrew->Vulgate psalm mapping incl. the split psalms (9/10, 114/115, 116, 147); "+" verse joins and abbreviated ranges ("127-28") normalized; single-chapter books (2/3 John, Jude) get chapter 1. - Cleaned harvest artifacts from of-lectionary.ini (descriptive-suffix gospels, "or Year A" alternates, "*"/"[Vulg.]"/bracket markers, slash abbreviations); Joel/Malachi/Zechariah/Esther book-versification citations fixed to Vulgate. - Split a merged Ps 15:10/11 row in vul.tsv. Result: 0 unresolvable OF readings over 2557 rendered days (cycles A/B/C, varied Easters). EF: the Octave of Pentecost (Whit Monday-Saturday) is red, not white.
* licence: relicense MIT -> AGPL-3.0-or-laterLukasz Kasprzak2026-07-2812-5/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lectio was MIT, which let anyone take it closed. The concern is not people selling it -- no licence stops that, and the AGPL does not try to -- but someone building a proprietary product on it and giving nothing back. Plain GPL would leave the obvious hole open: lectio-web is a network service, and hosting is not distribution, so a modified lectio-web could be run as a paid subscription API without ever publishing a line. AGPL section 13 closes exactly that. LICENSE is the verbatim FSF text. README carries the standard notice. Section 13 requires a modified network-reachable version to PROMINENTLY offer its source to the users interacting with it, so the offer ships with the code rather than living only in a file nobody fetches: - GET /source plain text, no template or config dependency, so it answers even when something else is broken - page footers every full page (fragments render inside one) - JSON envelope "source" / "license" - iCal header X-LECTIO-SOURCE / X-LECTIO-LICENSE The feed fields are not redundant: an /api/calendar.json consumer or an .ics subscriber never loads a page, so the footer alone would miss them. config.SourceURL is the single source of truth, and says in its comment that a fork running as a service must repoint it -- an offer that leads to someone else's code is not an offer. Tests pin all of it. This is a licence obligation, not a feature, so it should fail loudly if a later change drops it.
* refactor: remove the niedziela/missalemeum scrapers, bt, traditional_langLukasz Kasprzak2026-07-2840-7887/+390
| | | | | | | | | | | | | | | | | | | | | | 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(readings): compute the daily view offline (OF + EF)Lukasz Kasprzak2026-07-2812-168/+347
| | | | | | | | | | | | | | | | | | Route readings.Load through the embedded calendar engine and lectionary data instead of the niedziela/missalemeum scrapers. The daily view now computes each day (calendar.Compute + caldata.Readings) and renders text from the public-domain corpora, with citations resolved per corpus. - bible.OFRef: normalise an English-canonical OF citation (drop sub-verse letters, ";" -> ",") and renumber Psalms for the target Psalter (Hebrew->Vulgate chapter for vul/grb/wuj; DRB title-fold verses for drb). - liturgy.Section gains Ref (English-canonical lookup ref) alongside Citation (sigla-dialect display); the loader fills both, resolveRef uses Ref, headings/citation command show Citation. - EffectiveVersions always drops "bt" (no offline corpus); the single daily version defaults to vernacularVersion (reading corpus else Latin). Scraper packages remain in the tree, unreferenced, pending removal.