summaryrefslogtreecommitdiff
path: root/internal/cli/cli.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 12:58:31 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-27 12:58:31 +0200
commit6d78c65c58820f79ec5a978a9476d29969da218f (patch)
tree2045bf9f453c407bf8d60053876531420a1c251a /internal/cli/cli.go
parent27911b8f2574563ddd5d0de75f708503067069c9 (diff)
downloadlectio-6d78c65c58820f79ec5a978a9476d29969da218f.tar.gz
lectio-6d78c65c58820f79ec5a978a9476d29969da218f.zip
feat(cli): 'lectio --liturgy/-L' prints the computed liturgical day offline
Uses the pure engine + embedded universal calendar; UI-language names, rank, colour, cycles, and inline proper readings. Added the Assumption's propers.
Diffstat (limited to 'internal/cli/cli.go')
-rw-r--r--internal/cli/cli.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index d69bce0..6d09591 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -119,6 +119,7 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int {
var width int
var list bool
var ref string
+ var liturgy bool
fs := flag.NewFlagSet("lectio", flag.ContinueOnError)
fs.SetOutput(stderr)
@@ -163,6 +164,8 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int {
fs.StringVar(&output, "out", "", "write --md/--pdf output to FILE (default: stdout)")
fs.StringVar(&output, "output", "", "write --md/--pdf output to FILE (default: stdout)")
fs.StringVar(&calendar, "calendar", "", "export a month (YYYY-MM) as a printable A4 PDF calendar")
+ fs.BoolVar(&liturgy, "L", false, "print the computed liturgical day (offline calendar engine) and exit")
+ fs.BoolVar(&liturgy, "liturgy", false, "print the computed liturgical day (offline calendar engine) and exit")
if err := fs.Parse(rest); err != nil {
return 2
@@ -207,6 +210,10 @@ func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) int {
cfg.UILanguage = config.NormalizeUILanguage(uiLang)
}
+ if liturgy {
+ return runLiturgy(cfg, date, stdout, stderr)
+ }
+
if citation || week || randV || randCh {
tbl, _ := bible.LoadBookTable(userBooksTOML())
switch {