From 643d01c388eece9f3a00d2db16cb421f5483b229 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 20:10:44 +0200 Subject: feat(bible): user corpus discovery + override registry --- internal/config/config.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/config/config.go') diff --git a/internal/config/config.go b/internal/config/config.go index 0f99a3a..55abd72 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -274,6 +274,17 @@ func CalendarsDir() (string, error) { return filepath.Join(filepath.Dir(p), "calendars"), nil } +// CorporaDir is the user directory for drop-in bible corpora (.tsv + +// .ini), alongside calendars/ under the lectio config dir. Mirrors +// CalendarsDir exactly (verified: it uses configPath() then filepath.Dir). +func CorporaDir() (string, error) { + p, _, err := configPath() + if err != nil { + return "", err + } + return filepath.Join(filepath.Dir(p), "corpora"), nil +} + // BooksPath returns the path to the optional user books.ini (in the same // directory as the config file). There is no embedded seed on disk -- absence // means "use the built-in defaults". -- cgit v1.3