summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 22:49:54 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-28 22:49:54 +0200
commit4bb88c667edc90a5563791dff62ae52ea070b2ee (patch)
tree91fd6fb6b6a02ee40d42c6208bce99d74d64e9a6 /cmd
parent723f223690ce6a01124ea5fbd12e1a90ee0ab3f4 (diff)
downloadlectio-4bb88c667edc90a5563791dff62ae52ea070b2ee.tar.gz
lectio-4bb88c667edc90a5563791dff62ae52ea070b2ee.zip
bible: add Douay book aliases Osee->Hosea, 2 Esdras->Nehemiah; clectio-gen 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.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/clectio-gen/main.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/clectio-gen/main.go b/cmd/clectio-gen/main.go
index 167ed53..9a2930d 100644
--- a/cmd/clectio-gen/main.go
+++ b/cmd/clectio-gen/main.go
@@ -96,6 +96,11 @@ func main() {
fmt.Fprintln(os.Stderr, "usage: clectio-gen <new|old> <startYear> <endYear> <outdir>")
os.Exit(2)
}
+ // Hermetic: point config at a nonexistent path so the generator always uses
+ // lectio's EMBEDDED calendar, lectionary and book table -- never the running
+ // user's ~/.config/lectio (whose books.ini/calendars/etc. could be stale and
+ // would silently change or drop readings).
+ os.Setenv("LECTIO_CONFIG", filepath.Join(os.TempDir(), "clectio-gen-no-such-dir", "config.ini"))
form := os.Args[1] // "new" (OF) or "old" (EF)
lect := "new"
tag := "of"
@@ -170,6 +175,9 @@ func main() {
}
if id := internReading(secEN, secLA); id >= 0 {
rids = append(rids, id)
+ } else {
+ fmt.Fprintf(os.Stderr, "clectio-gen: %s DROP part=%s ref=%q cite=%q\n",
+ ds, secEN.PartID, resolveRef(secEN, form), secEN.Citation)
}
}
dy := day{