diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 20:10:44 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-27 20:10:44 +0200 |
| commit | 643d01c388eece9f3a00d2db16cb421f5483b229 (patch) | |
| tree | aba6cbd5abf75d4aa6f8fce465ad31c4259cda0a /internal/config | |
| parent | 91b54ab94a0e227eeaf093d34ec2bf2a07978b55 (diff) | |
| download | lectio-643d01c388eece9f3a00d2db16cb421f5483b229.tar.gz lectio-643d01c388eece9f3a00d2db16cb421f5483b229.zip | |
feat(bible): user corpus discovery + override registry
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 11 |
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". |
