| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
| |
monospace)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An unvalidated ?date= query param flowed straight into
liturgy.Load's filepath.Join(dir, date+".json"/".html") before any
network call, letting a crafted date (e.g. "../../../../etc/hostname")
read an arbitrary file whose JSON, if present, unmarshals into
[]liturgy.Section and renders back to the client. Fix both layers:
resolveQuery now falls back to today() on empty or non-YYYY-MM-DD
date (mirroring requestDisplay's normalize-don't-trust pattern), and
liturgy.Load itself rejects a non-matching date before building any
cache path, protecting every caller even if a future one forgets to
validate.
Also bind lectio-web's listener to 127.0.0.1 instead of all
interfaces: it is a personal tool whose Run already prints
http://localhost:<port>, so it should not be reachable from the LAN.
|
| |
|
|
| |
pentecost -> red/white/gold; darker franciscans
|
| |
|
|
|
|
|
|
|
|
| |
Add README.md documenting all three binaries (lectio, lectio-ui,
lectio-web), config keys, the 12 themes, display modes, offline/update
workflow, and both lectionaries, surveyed against the real source.
Wire the third binary into Makefile's build/install/uninstall/clean/cross
targets (LECTIO_WEB var, ./cmd/lectio-web) and add /lectio-web to
.gitignore, matching the existing lectio/lectio-ui style.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
chooseListener(port) factors the listen logic out of Run: port==0 now
tries defaultWebPort (1099) first and only falls back to an OS-picked
free port if 1099 is taken; a non-zero port is still bound exactly,
surfacing its bind error as before. config.Default() keeps WebPort: 0
unchanged (0 still means "auto"). Adds TestChooseListener, robust to
sandboxes that can't bind 1099 or :0 (t.Skip instead of failing).
Also folds the ?ref= whitespace trim into renderLookup itself so GET /
and GET /lookup treat a whitespace-only ref identically (previously
only lookupHandler trimmed it).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a display-layout option to lectio-web alongside the existing colour
themes:
- config: WebDisplay field (toml web_display), default "horizontal",
normalized on load via the new exported config.NormalizeDisplay
(unknown -> "horizontal", same lenient style as the other web_* fields).
- render: extracts the citation/ToEnglishRef resolution shared by
GatherVersion into an unexported resolveRef helper (GatherVersion's
signature/behavior unchanged) and adds GatherVerses(version, sec,
lectionary) returning raw bible.Verse structs plus a versified flag, for
column/interlinear alignment.
- web/render: RenderReadings gains a display parameter. "horizontal" is
the original stacked layout, byte-for-byte the same code path as
before. "vertical" reuses the same per-version column data in a
.display-vertical/.vcol grid (the CLI compare view, browser-side).
"interlinear" maps versions through render.OfflineVersions' pl->wuj
substitution (pl has no verse numbers), gathers GatherVerses per
version, and interleaves them by chapter:verse into .ilverse/.illine
blocks (ordered union of keys, first versified version's order first).
- server: adds a display <select> to the top bar wired into the existing
#controls HTMX form; a resolveQuery(cfg, r) helper replaces the
duplicated date/lectionary/all/versions(+now display) resolution in
indexHandler and readingsHandler.
- fold-in from the B2 review: indexHandler now populates indexData.Lookup
via a shared renderLookup(ref, versions) helper (also used by
lookupHandler), so a bookmarked "/?ref=...&v=..." link shows its
lookup result instead of an empty pane.
- base.css: layout-only rules for the two new modes (no colours; themes
stay colour-only).
go test ./..., go vet ./..., gofmt clean; go build ./cmd/lectio-web ok.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NewServer wires B1's RenderReadings/Themes/themeCSS/embedded static+
templates FS into an http.ServeMux: GET / (full page), GET /readings
(HTMX reading-pane fragment), GET /lookup (bible.Lookup passage search
fragment), GET /theme.css (theme stylesheet, falling back through
cfg.WebTheme to the built-in default on an unknown name), GET /static/.
Run listens on cfg.WebPort (0 = OS-picked free port), prints the URL,
best-effort opens a browser, then serves. cmd/lectio-web is the binary
entry point (config.Load -> web.Run).
Fold-in from the B1 review: hardened themeCSS's name guard to an
explicit ^[A-Za-z0-9_-]+$ allowlist (the old filepath.Base/ContainsAny
check let ".." through), plus guard-rejection and HTML-escaping
regression tests -- B2 is what makes /theme.css?name=<raw> reachable
from the network, so it owns closing this out.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add WebTheme (default: "transfiguration") and WebPort (default: 0) to Config
for the upcoming lectio-web binary. WebTheme resolves theme names (built-in
or user files) later in internal/web; WebPort 0 means auto-pick a free port.
- Updated Config struct with new fields
- Set defaults in Default()
- Updated embedded seed config.toml with documentation
- Added TDD tests: TestWebDefaults and TestWebLoadsFromSeed
- Existing tests (TestLoadSeeds, TestLoadOverride) still pass
|
| |
|
|
|
|
|
|
|
|
|
|
| |
user-extensible
Replace dev-palette themes with original ascetic sets: religious orders
(desert_fathers, benedictines, franciscans, memento_mori, camedules) and
liturgical seasons (advent, nativity, lent, easter, pentecost, ordinary),
plus transfiguration (default). Colour-only, no gimmicks (base.css owns
all layout/type). Users can drop *.css in ~/.config/lectio/themes/;
web_theme accepts any, serve-time fallback. docs/THEMES.md documents the
role classes.
|
| | |
|
| |
|
|
| |
dracula/solarized/everforest/rosepine/onedark)
|
| | |
|
| |
|
|
| |
catppuccin/tokyonight/gruvbox/nord), ascetic
|
| |
|
|
|
|
|
|
|
| |
Third binary lectio-web: hledger-web-style local server, HTMX partial
swaps, embedded templates/CSS/htmx (self-contained). Date/lectionary/
version/all controls + passage lookup, driving the shared readings+render
core. Five embedded themes (light/dark/sepia/parchment/nord) switchable
live, defaulted via config web_theme; web_port config. Builds after the
CLI/TUI/README tasks.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ports parse_sections, html_to_lines, extract_reference from ewangelia.py.
Parse(html) prefers the tabnowy0all lectionary tab (falls back to
tabstary0all) and errors loudly if the tab is present-but-empty or
absent. ExtractCitation(heading) pulls the parenthetical citation.
Section gains a PartID field (Addendum A): set from the heading prefix
(1. czytanie -> pierwsze_czytanie, a second same-day 1. czytanie ->
drugie_czytanie, Psalm -> psalm, Aklamacja -> aklamacja, Ewangelia ->
ewangelia; anything else -> "").
Adds testdata/2026-07-22.html (split-feast day, two 1. czytanie
sections) and testdata/2026-06-22.html (normal day), copied from
~/.cache/daily-reading/.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
- config: lectionary=new|traditional, traditional_lang=pl|en, and
commented-out [parts.new]/[parts.traditional] per-part toggles (parsed
as a map: a part shows unless explicitly false).
- traditional source: missalemeum API (en/pl only; no Latin) mapped to
the shared []Section; scripture parts get the version-compare via their
citation + embedded vul, prayers are vernacular-only.
- new internal/tradlit package + Load router by lectionary; plan addendum
A with the tradlit task and amendments to Section/config/Load/render/cli.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
- Two-layer cache (HTML + parsed JSON) for fast repeat same-day loads.
- 'lectio update' harvests the site's published future sigla into a
persistent TSV (~/.local/share/lectio/sigla.tsv).
- Offline mode (config offline=true, --offline flag, or auto-fallback on
network failure): reads from the harvest + embedded corpora, renders
wuj/vul/grb/drb; pl is online-only so wuj takes the Polish role.
- Config gains offline=false (seeded default).
|
|
|
Forked from the Python daily-reading tool. Two binaries (lectio,
lectio-ui) over shared internal packages, modelled on bread-calc:
Bubble Tea + Lipgloss TUI, go:embed for the four Bible corpora
(self-contained, no external tools), subcommand CLI, TOML config,
colored reader TUI, psalm versification ported as-is.
|