From cb3379f41c06a94085c77fe359709b46712850dc Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 27 Jul 2026 14:59:14 +0200 Subject: feat: books.toml -> books.ini, multi-language (add Latin dialect), config-scoped citation display books.ini with [en]/[pl]/[la]; parseBooks reads INI (bible drops go-toml). Latin dialect resolves EF citations (Eccli->Sirach, Apoc->Revelation, Luc...); sigla_style gains 'latin'. Reading citations now DISPLAY in the configured sigla (FormatRef(SiglaLang)), not raw English. One-shot books.toml->books.ini user migration (go-toml now config-only). Web settings editor -> books.ini. --- internal/cli/cli.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'internal/cli/cli.go') 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 { -- cgit v1.3