aboutsummaryrefslogtreecommitdiff
path: root/internal/cli/cli.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/cli.go')
-rw-r--r--internal/cli/cli.go16
1 files changed, 3 insertions, 13 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index 575fba9..65be274 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -227,7 +227,7 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int {
}
if citation || week || randV || randCh {
- tbl, _ := bible.LoadBookTable(userBooksTOML())
+ tbl, _ := bible.LoadBookTable(userBooksINI())
switch {
case randV || randCh:
ver, verr := randVersion(cfg, bibleVer)
@@ -300,7 +300,7 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int {
var bookTbl *bible.BookTable
if list || ref != "" {
- tbl, terr := bible.LoadBookTable(userBooksTOML())
+ tbl, terr := bible.LoadBookTable(userBooksINI())
if terr != nil {
fmt.Fprintln(stderr, "lectio:", terr) // warn; tbl is still a usable defaults table
}
@@ -516,17 +516,7 @@ func runWeek(cfg config.Config, tbl *bible.BookTable, date string, refresh bool,
// userBooksTOML returns the bytes of the optional user books.toml, or nil if
// it is absent/unreadable (built-in defaults are used).
-func userBooksTOML() []byte {
- p, err := config.BooksPath()
- if err != nil {
- return nil
- }
- b, err := os.ReadFile(p)
- if err != nil {
- return nil
- }
- return b
-}
+func userBooksINI() []byte { return config.UserBooksINI() }
// wantsHelp reports whether -h/--help appears anywhere in args.
func wantsHelp(args []string) bool {