summaryrefslogtreecommitdiff
path: root/internal/liturgy
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 11:57:45 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 11:57:45 +0200
commitfeede51697be870ae183a95b513ef64f031dbd0f (patch)
tree6700a80f996d2bba204c0452db2d2bbc16bff619 /internal/liturgy
parent626f2275438a37e5cd2efb5964281b9bef5ce8cc (diff)
downloadlectio-feede51697be870ae183a95b513ef64f031dbd0f.tar.gz
lectio-feede51697be870ae183a95b513ef64f031dbd0f.zip
feat(readings): compute the daily view offline (OF + EF)
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.
Diffstat (limited to 'internal/liturgy')
-rw-r--r--internal/liturgy/section.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/internal/liturgy/section.go b/internal/liturgy/section.go
index cacefb0..1e446a1 100644
--- a/internal/liturgy/section.go
+++ b/internal/liturgy/section.go
@@ -2,13 +2,19 @@
// structured sections (1st reading, psalm, acclamation, gospel).
package liturgy
-// Section is one reading section of the liturgy page (e.g. "1. czytanie",
-// "Psalm", "Aklamacja", "Ewangelia"): its heading, optional subtitle, the
-// citation extracted from the heading, a stable identifier for which liturgical
-// part it is, and its body split into paragraphs of text lines.
+// Section is one reading section of the liturgy (e.g. "1. czytanie", "Psalm",
+// "Aklamacja", "Ewangelia"): its heading, optional subtitle, the citation shown
+// to the reader, an English-canonical lookup reference, a stable identifier for
+// which liturgical part it is, and its body split into paragraphs of text lines.
+//
+// Citation is the display form (the reader's configured sigla dialect); Ref is
+// the English-canonical reference the render resolves against a corpus. Keeping
+// them apart lets the header read "Ps 27" in Polish sigla while the lookup uses
+// "Psalms 27" (renumbered per Psalter). Ref is empty for sources that only
+// carry a display citation; the render then falls back to Citation.
type Section struct {
- Heading, Subtitle, Citation, PartID string
- Paragraphs [][]string
+ Heading, Subtitle, Citation, Ref, PartID string
+ Paragraphs [][]string
}
// DayInfo is the day's liturgical identity, source-language (Polish for the