aboutsummaryrefslogtreecommitdiff
path: root/internal/tui
Commit message (Collapse)AuthorAgeFilesLines
* 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-292-41/+153
| | | | | | | | | 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.
* test(bible): skip corpus-dependent tests when optional corpora aren't embeddedLukasz Kasprzak2026-07-291-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* refactor: remove the niedziela/missalemeum scrapers, bt, traditional_langLukasz Kasprzak2026-07-283-28/+16
| | | | | | | | | | | | | | | | | | | | | | 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-281-4/+4
| | | | | | | | | | | | | | | | | | 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.
* lectio-ui reader: go-to-chapter jump (c)Lukasz Kasprzak2026-07-242-10/+164
| | | | | | | | | | Inside a book, 'c' opens a centered prompt showing the book's chapter range (e.g. "1-21: ") and accepts a chapter number to jump straight there, instead of scrolling (handy for Psalm 119 etc). Digits only, backspace edits, Enter clamps to the valid range and opens that chapter at its top, Esc cancels. New modeChapterJump + updateChapterJump/jumpToChapter/ viewChapterJump; i18n ReaderJumpChapter/ReaderJumpChapterKeys (en/pl) and 'c' added to the reading keybar. Only offered when the book has >1 chapter.
* bookmarks: store as universal TSV (header row) with one-time JSON migration; ↵Lukasz Kasprzak2026-07-241-8/+75
| | | | tui note box wraps long notes with hanging indent + hard-break; v0.21.0
* tui reader: bookmark note+tags as a prominent centered modal (tab switches ↵Lukasz Kasprzak2026-07-242-20/+88
| | | | fields), delete confirmation as a modal; v0.20.0
* tui reader: m opens a verse cursor (↑/↓ pick the verse) then a note box ↵Lukasz Kasprzak2026-07-242-51/+190
| | | | (write or skip); d in bookmarks confirms before deleting; v0.19.0
* tui reader: bookmarks (m=mark w/ note, b=list/jump/delete, per-verse via ↵Lukasz Kasprzak2026-07-242-11/+385
| | | | top-visible verse) + remember last place; v0.18.0
* grb: strip SBLGNT apparatus markers (U+2E00–U+2E0D); render: show ↵Lukasz Kasprzak2026-07-241-1/+1
| | | | scripture ref in traditional headings; v0.12.0
* qol: tui jump-to-date (d) + lectio --citation/--week + hide bt for ↵Lukasz Kasprzak2026-07-242-1/+94
| | | | traditional web; v0.10.0
* reader: lectio-ui --reader fuzzy book picker + chapter reader over the ↵Lukasz Kasprzak2026-07-242-0/+545
| | | | corpora; v0.8.0
* dayinfo: show feast/day name + colour (modern niedziela + traditional ↵Lukasz Kasprzak2026-07-242-16/+87
| | | | missalemeum) in cli/tui/web; v0.5.0
* rename the pl scripture version to bt (Biblia Tysiąclecia); v0.4.0Lukasz Kasprzak2026-07-242-10/+10
| | | | | | | | | | The niedziela.pl scraped Polish paragraph text is the Biblia Tysiąclecia translation; rename its version code from "pl" to "bt" and its i18n label to "Biblia Tysiąclecia (niedziela.pl)" everywhere the scripture VERSION is meant, across config, i18n, render, web, tui, cli and both binaries' help text. Language-role "pl" (ui_language, traditional_lang, i18n.Get lang, --lang validation) is untouched. Behavior is identical -- bt is still dropped for offline/traditional and substituted with wuj.
* cli-ui,web: real flag parsing for lectio-ui/lectio-web (accept useful flags, ↵Lukasz Kasprzak2026-07-232-9/+18
| | | | reject unknown, -h/-v)
* tui: honor config all; r-key forces refresh (bypass cache); clamp scroll in ↵Lukasz Kasprzak2026-07-231-22/+37
| | | | Update (no over-scroll)
* tui: fix width-wrap garbling + straight-aligned verse column (export ↵Lukasz Kasprzak2026-07-231-11/+46
| | | | render.Wrap, hanging indent); strip niedziela summary subtitle (tui/cli/web); web verse grid alignment; refrain-italic pl-only
* cli,tui,web: share traditional+offline pl-drop via render.EffectiveVersions; ↵Lukasz Kasprzak2026-07-231-4/+1
| | | | -v/--version any position
* i18n: fix consistency-review gaps in ui_language (en/pl chrome)Lukasz Kasprzak2026-07-231-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | Closes six findings from review of the ui_language feature so English mode carries no leftover Polish UI text: - Web: interlinear "no verses" note and the empty-day error fragment now route through i18n instead of being unconditionally Polish. - render.GatherVersion/GatherVerses/resolveRef's four lookup/citation- failure blocks are now lang-aware (resolveRef gained a lang param). - i18n.ErrorPrefix/NoReadingsFor lost a stray extra trailing space, restoring the pre-i18n single-space TUI concatenation. - render.LocalizeHeading now matches a heading's actual leading label text against all known modern pl labels, rather than trusting the label keyed by sec.PartID -- fixes split-feast days where PartID is "drugie_czytanie" but the heading still reads "1. czytanie ...". - cli bannerFor is lang-specific again (pl "na", en "for"), restoring pl's exact pre-i18n wording instead of "--" for both languages. - index.html's <html lang> now follows cfg.UILanguage instead of being hardcoded "pl". gofmt/vet clean, go test ./... green, all three binaries build, no new go.mod deps. Consistency grep across cli/tui/web/render's live source turns up only two non-displayed identifiers (a PartID slug list and a pre-existing incipit-stripping constant on the pl scripture text itself).
* i18n: ui_language config (default en) for UI chrome across cli/tui/web; ↵Lukasz Kasprzak2026-07-232-10/+66
| | | | version labels localised
* tui: respect terminal colours (ANSI palette + attributes); reverse-video ↵Lukasz Kasprzak2026-07-231-28/+24
| | | | bars for legible header/footer
* tui: colored reader + version switchLukasz Kasprzak2026-07-233-0/+423