aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
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".