aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 20:10:44 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 20:10:44 +0200
commit643d01c388eece9f3a00d2db16cb421f5483b229 (patch)
treeaba6cbd5abf75d4aa6f8fce465ad31c4259cda0a /internal/config
parent91b54ab94a0e227eeaf093d34ec2bf2a07978b55 (diff)
downloadlectio-643d01c388eece9f3a00d2db16cb421f5483b229.tar.gz
lectio-643d01c388eece9f3a00d2db16cb421f5483b229.zip
feat(bible): user corpus discovery + override registry
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go11
1 files changed, 11 insertions, 0 deletions
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 (<code>.tsv +
+// <code>.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".