From 4bb88c667edc90a5563791dff62ae52ea070b2ee Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Tue, 28 Jul 2026 22:49:54 +0200 Subject: 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. --- cmd/clectio-gen/main.go | 8 ++++++++ internal/bible/books.ini | 4 ++-- 2 files changed, 10 insertions(+), 2 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 ") 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{ diff --git a/internal/bible/books.ini b/internal/bible/books.ini index a5bd711..6784722 100644 --- a/internal/bible/books.ini +++ b/internal/bible/books.ini @@ -32,7 +32,7 @@ Ruth = Ru, Ruth 1 Chronicles = 1 Chr, 1 Chronicles 2 Chronicles = 2 Chr, 2 Chronicles Ezra = Ezra, Ezra -Nehemiah = Neh, Nehemiah +Nehemiah = Neh, 2 Esdras, 2 Esd, Nehemiah Tobit = Tob, Tobit Judith = Jdt, Judith Esther = Esth, Esther @@ -51,7 +51,7 @@ Lamentations = Lam, Lamentations Baruch = Bar, Baruch Ezekiel = Ezek, Ezech, Ezekiel Daniel = Dan, Daniel -Hosea = Hos, Hosea +Hosea = Hos, Osee, Hosea Joel = Jl, Joel Amos = Am, Amos Obadiah = Obad, Obadiah -- cgit v1.3