summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--man/lectio-ui.155
-rw-r--r--man/lectio-web.140
-rw-r--r--man/lectio.1194
4 files changed, 296 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 192c591..29b3871 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ LECTIO_UI := lectio-ui
LECTIO_WEB := lectio-web
PREFIX ?= $(HOME)/.local
BINDIR := $(PREFIX)/bin
+MANDIR := $(PREFIX)/share/man/man1
.PHONY: help build build-full install uninstall test vet fmt clean cross check-corpora add-corpus
help: ## show this help
@@ -15,14 +16,16 @@ build-full: ## build all three with the optional corpora (wuj, drb, grb) embedde
go build -tags fullbible -o $(LECTIO) ./cmd/lectio
go build -tags fullbible -o $(LECTIO_UI) ./cmd/lectio-ui
go build -tags fullbible -o $(LECTIO_WEB) ./cmd/lectio-web
-install: ## build and install all three to $(BINDIR)
- @mkdir -p $(BINDIR)
+install: ## build and install the three binaries and man pages
+ @mkdir -p $(BINDIR) $(MANDIR)
go build -o $(BINDIR)/$(LECTIO) ./cmd/lectio
go build -o $(BINDIR)/$(LECTIO_UI) ./cmd/lectio-ui
go build -o $(BINDIR)/$(LECTIO_WEB) ./cmd/lectio-web
- @echo "installed $(BINDIR)/$(LECTIO), $(BINDIR)/$(LECTIO_UI) and $(BINDIR)/$(LECTIO_WEB)"
-uninstall: ## remove installed binaries
+ install -m 644 man/lectio.1 man/lectio-ui.1 man/lectio-web.1 $(MANDIR)
+ @echo "installed binaries to $(BINDIR) and man pages to $(MANDIR)"
+uninstall: ## remove installed binaries and man pages
rm -f $(BINDIR)/$(LECTIO) $(BINDIR)/$(LECTIO_UI) $(BINDIR)/$(LECTIO_WEB)
+ rm -f $(MANDIR)/lectio.1 $(MANDIR)/lectio-ui.1 $(MANDIR)/lectio-web.1
test: check-corpora ## run tests (with all corpora embedded, so corpus tests can resolve text)
go test -tags fullbible ./...
vet: ## go vet
diff --git a/man/lectio-ui.1 b/man/lectio-ui.1
new file mode 100644
index 0000000..65b62e6
--- /dev/null
+++ b/man/lectio-ui.1
@@ -0,0 +1,55 @@
+.TH LECTIO-UI 1 "2026" "lectio" "User Commands"
+.SH NAME
+lectio-ui \- interactive terminal reader for the daily readings
+.SH SYNOPSIS
+.B lectio-ui
+.RI [ DATE ]
+.RI [ flags ]
+.SH DESCRIPTION
+.B lectio-ui
+is a colored, scrollable terminal reader for
+.BR lectio (1)'s
+offline daily readings, plus a fuzzy\-book Bible reader with bookmarks. It shares
+.BR lectio (1)'s
+configuration and reading pipeline; everything renders offline.
+.SH OPTIONS
+.TP
+.BR \-b ", " \-\-bible " " \fIVER\fR
+Start on a version (\fBvul\fR built in; see \fBlectio\fR(1) for the optional rest).
+.TP
+.BR \-R ", " \-\-reader
+Open the Bible reader (book picker) instead of the daily view.
+.TP
+.BR \-a ", " \-\-all
+Show all parts, overriding config.
+.TP
+.BR \-l ", " \-\-lectionary " " \fIWHICH\fR
+.BR new " | " trad .
+.TP
+.BR \-v ", " \-\-version
+Print the version and exit.
+.TP
+.BR \-h ", " \-\-help
+Print help and exit.
+.SH KEYS
+.B tab
+/
+.B shift+tab
+cycle versions,
+.B \(<-
+/
+.B \(->
+change day,
+.B d
+jump to a date,
+.B j
+/
+.B k
+scroll,
+.B q
+quit.
+.SH SEE ALSO
+.BR lectio (1),
+.BR lectio-web (1)
+.SH LICENSE
+AGPL\-3.0\-or\-later. Bible corpora are separate public\-domain texts (see NOTICE).
diff --git a/man/lectio-web.1 b/man/lectio-web.1
new file mode 100644
index 0000000..9cf07b3
--- /dev/null
+++ b/man/lectio-web.1
@@ -0,0 +1,40 @@
+.TH LECTIO-WEB 1 "2026" "lectio" "User Commands"
+.SH NAME
+lectio-web \- local browser reader for the daily readings
+.SH SYNOPSIS
+.B lectio-web
+.RI [ flags ]
+.SH DESCRIPTION
+.B lectio-web
+serves a local web page (default
+.IR http://localhost:1099 )
+with the day's readings, side\-by\-side version compare, a Bible reader and
+bookmarks. The UI is bundled (no CDN) and everything renders offline. It shares
+.BR lectio (1)'s
+configuration; versions and layout are set on the page's settings screen.
+.SH OPTIONS
+.TP
+.BR \-p ", " \-\-port " " \fIN\fR
+Port to listen on (overrides \fBweb_port\fR; 0 picks 1099 then any free port).
+.TP
+.BR \-l ", " \-\-lectionary " " \fIWHICH\fR
+.BR new " | " trad .
+.TP
+.BR \-v ", " \-\-version
+Print the version and exit.
+.TP
+.BR \-h ", " \-\-help
+Print help and exit.
+.SH NOTES
+Because lectio is AGPL\-3.0\-or\-later, running a modified
+.B lectio-web
+over a network obliges you to offer its users the source of your version
+(section 13); each page and machine feed carries a source link. If you fork it,
+point
+.B SourceURL
+at your own source.
+.SH SEE ALSO
+.BR lectio (1),
+.BR lectio-ui (1)
+.SH LICENSE
+AGPL\-3.0\-or\-later. Bible corpora are separate public\-domain texts (see NOTICE).
diff --git a/man/lectio.1 b/man/lectio.1
new file mode 100644
index 0000000..faa394f
--- /dev/null
+++ b/man/lectio.1
@@ -0,0 +1,194 @@
+.TH LECTIO 1 "2026" "lectio" "User Commands"
+.SH NAME
+lectio \- offline Catholic daily readings and liturgical calendar
+.SH SYNOPSIS
+.B lectio
+.RI [ DATE ]
+.RI [ flags ]
+.br
+.B lectio
+.BR compare | show | ref | rand
+.RI [ ... ]
+.SH DESCRIPTION
+.B lectio
+computes the Catholic liturgical day and its Mass readings entirely offline,
+for either the Ordinary Form (post\-1969) or the Extraordinary Form (1962), and
+renders the reading text from an embedded public\-domain scripture corpus. There
+is no network access: the calendar, the lectionary citations and the Latin
+Vulgate text are all built into the binary.
+.PP
+With no arguments it prints today's gospel. A
+.I DATE
+in
+.B YYYY-MM-DD
+form (any position on the command line) selects another day.
+.PP
+Only the Latin Vulgate is embedded by default. The other translations \(em
+.BR wuj " (Wujek), " grb " (Greek), " drb " (Douay\-Rheims) \(em"
+are optional: build with
+.B make build-full
+or drop a
+.IR <code> .tsv " and " <code> .ini
+into
+.IR ~/.config/lectio/corpora/ .
+A version that is not present renders as
+.RB \(dq (not\ in\ <code>) \(dq.
+.SH OPTIONS
+.TP
+.BR \-a ", " \-\-all
+Show all readings, not just the gospel.
+.TP
+.BR \-b ", " \-\-bible " " \fIVER\fR
+Render one version's text (\fBvul\fR built in; see above for the rest).
+.TP
+.BR \-c ", " \-\-compare " " \fILIST\fR
+Show several versions side by side (comma\-separated codes).
+.TP
+.BR \-p ", " \-\-ref " " \fIREF\fR
+Look up a passage (e.g. \(dqJ 3:16\(dq) with \fB\-b\fR/\fB\-c\fR.
+.TP
+.BR \-r ", " \-\-raw
+Text only, no banner or headings (for piping).
+.TP
+.BR \-w ", " \-\-width " " \fIN\fR
+Wrap width; 0 detects the terminal.
+.TP
+.BR \-l ", " \-\-lectionary " " \fIWHICH\fR
+.BR new " | " trad
+(traditional selects the 1962 Extraordinary Form).
+.TP
+.B \-\-ui\-lang \fILANG\fR
+Language of the day and saint names (and interface labels): any code
+(\fBen\fR, \fBpl\fR, \(en). Day names come from
+.IR ~/.config/lectio/names/<code>.ini ,
+interface labels from
+.IR ui/<code>.ini ;
+English and Polish are built in.
+.TP
+.BR \-P ", " \-\-pager
+Page the reading output; the default comes from config.
+.TP
+.B \-\-no\-pager
+Never page, even if config enables one.
+.TP
+.B \-\-year \fIYYYY\fR
+Print the year's key liturgical dates \(em season boundaries, solemnities and
+feasts of the Lord \(em paged when a pager is configured. Combined with
+.B \-\-format
+it emits the whole year's machine calendar instead.
+.TP
+.BR \-L ", " \-\-liturgy
+Print the computed liturgical day (identity, rank, colour) and exit.
+.TP
+.B \-\-list
+List every book and its abbreviations in the current sigla dialect.
+.TP
+.B \-\-citation
+Print today's gospel reference and exit (for scripts and cron).
+.TP
+.B \-\-week
+List the coming week's gospel references and exit.
+.TP
+.B \-\-cal\-new \fINAME\fR
+Scaffold a custom calendar layer at
+.IR ~/.config/lectio/calendars/NAME.ini .
+.TP
+.B \-\-cal\-check \fINAME\fR
+Validate a custom calendar layer and exit.
+.TP
+.B \-\-corpus\-check \fIX\fR
+Validate a bible corpus (a code, or a path to a \fI<code>.tsv\fR) and exit;
+errors fail, coverage gaps warn. Add \fB\-\-json\fR for a JSON report.
+.TP
+.BR \-\-rand ", " \-\-rand\-v ", " \-\-rand\-ch
+Print a random verse, or a random chapter, and exit.
+.TP
+.BR \-\-md ", " \-\-pdf ", " \-\-out " " \fIFILE\fR
+Export the readings as Markdown or PDF (to \fB\-\-out\fR or stdout).
+.TP
+.B \-\-calendar \fIYYYY-MM\fR
+Export the month as a printable A4 PDF calendar (with \fB\-\-out\fR).
+.TP
+.B \-\-format \fIWHICH\fR
+.BR json " | " ical :
+emit the computed calendar and exit. Combine with
+.BR \-\-from / \-\-to " or " \-\-year " to pick a range, and " \-\-form " to override the form."
+.TP
+.BR \-v ", " \-\-version
+Print the version and exit.
+.TP
+.BR \-h ", " \-\-help
+Print a short help summary and exit.
+.SH FILES
+.TP
+.I ~/.config/lectio/config.ini
+Main configuration (auto\-seeded, self\-documenting).
+.TP
+.I ~/.config/lectio/corpora/
+Drop\-in bible corpora (\fI<code>.tsv\fR + \fI<code>.ini\fR).
+.TP
+.I ~/.config/lectio/names/<code>.ini
+Localised temporal day names for \fBui_language = <code>\fR.
+.TP
+.I ~/.config/lectio/ui/<code>.ini
+Localised interface labels for \fBui_language = <code>\fR.
+.TP
+.I ~/.config/lectio/calendars/
+Custom calendar layers, stacked over the universal calendar via
+.B use
+in config (field\-level add / override / suppress).
+.TP
+.I ~/.config/lectio/sanctorale/of.ini
+.TQ
+.I ~/.config/lectio/sanctorale/ef.ini
+Optional external universal sanctorale that REPLACES the embedded one for that
+form (a missing or malformed file falls back to the embedded default). See the
+shipped
+.I sanctorale-of.ini
+example.
+.SH EXAMPLES
+.PP
+Today's gospel:
+.PP
+.RS
+.B lectio
+.RE
+.PP
+All of a day's readings in the Vulgate:
+.PP
+.RS
+.B lectio 2026\-07\-22 \-a \-b vul
+.RE
+.PP
+The year's key dates:
+.PP
+.RS
+.B lectio \-\-year 2026
+.RE
+.PP
+Change one day's celebration \(em copy the example layer, uncomment and edit the
+entry, enable it:
+.PP
+.RS
+.nf
+cp sanctorale-of.ini ~/.config/lectio/calendars/mine.ini
+$EDITOR ~/.config/lectio/calendars/mine.ini
+echo 'use = mine' >> ~/.config/lectio/config.ini
+.fi
+.RE
+.SH EXIT STATUS
+.TP
+.B 0
+Success.
+.TP
+.B 1
+Runtime error.
+.TP
+.B 2
+Usage error (bad flag, date, version or lectionary).
+.SH SEE ALSO
+.BR lectio-ui (1),
+.BR lectio-web (1)
+.SH LICENSE
+AGPL\-3.0\-or\-later. The bible corpora are separate public\-domain scripture
+texts, not covered by that licence (see the NOTICE file).