From ed34fd574b4fc2e0a52c655ececddd1be29b271e Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Fri, 24 Jul 2026 12:26:23 +0200 Subject: reader: lectio-ui --reader fuzzy book picker + chapter reader over the corpora; v0.8.0 --- internal/config/config.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'internal/config') diff --git a/internal/config/config.go b/internal/config/config.go index 8ee15e1..9a41adc 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -24,7 +24,7 @@ var seedTOML []byte // Version is lectio's release version, shared by every binary's // -v/--version output (lectio, lectio-ui, lectio-web). -const Version = "0.7.0" +const Version = "0.8.0" // validVersions are the five scripture versions lectio understands. var validVersions = map[string]bool{ @@ -203,6 +203,21 @@ func BooksPath() (string, error) { return filepath.Join(filepath.Dir(p), "books.toml"), nil } +// UserBooksTOML returns the bytes of the optional user books.toml (see +// BooksPath), or nil when it is absent or unreadable -- callers then fall back +// to bible's embedded default table. +func UserBooksTOML() []byte { + p, err := BooksPath() + if err != nil { + return nil + } + b, err := os.ReadFile(p) + if err != nil { + return nil + } + return b +} + // seedIfMissing writes the embedded default config to path if nothing is // there yet. func seedIfMissing(path string) error { -- cgit v1.3