summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorlectio <lukasz@arcofasiagroup.com>2026-07-28 22:07:21 +0200
committerlectio <lukasz@arcofasiagroup.com>2026-07-28 22:07:45 +0200
commit42fd9a69fa2bc9ef11c65c169a58ff40c9cb0fa1 (patch)
treeeb135eae4d3374973c08b27956a6e067a95e56bc /README.md
downloadclectio-42fd9a69fa2bc9ef11c65c169a58ff40c9cb0fa1.tar.gz
clectio-42fd9a69fa2bc9ef11c65c169a58ff40c9cb0fa1.zip
clectio: tiny suckless C daily readings, all readings compiled in
clectio prints the Catholic liturgical day and its Mass readings for a date with a single table lookup -- no computation, config file, network, or deps beyond libc. The calendar, reading citations and scripture text are all compiled in; the whole shipped package fits on a 1.44 MB floppy (~1.29 MiB) and the binary is ~0.9 MB (OF) / ~0.3 MB (EF). - suckless config.h: FORM_OF/FORM_EF, SIGLA_ENGLISH/SIGLA_LATIN, COLOR. - Bring your own Bible: `make CORPUS=mybible.tsv` recompiles with any Vulgate-numbered 6-column TSV; only the ~12k cited verses are embedded. - The hard liturgical logic stays in lectio (Go, oracle-validated); its clectio-gen emits the corpus-independent tables in gen/. The scripture text is LZSS-packed (lz.h) to fit; mktext/bin2h resolve+embed it at build time. - Verified byte-identical to lectio's readings; day names match 157/157 over a 3-year sample. Default text: public-domain Latin Vulgate. ISC-licensed. Claude-Session: https://claude.ai/code/session_01S1CD1u3tgSS4xNu6WHfp5a
Diffstat (limited to 'README.md')
-rw-r--r--README.md67
1 files changed, 67 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e6b494c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,67 @@
+# clectio
+
+tiny, fast, suckless daily readings.
+
+clectio prints the Catholic liturgical day and its Mass readings for any date.
+It computes nothing at run time: the calendar, the reading citations and the
+scripture text are all compiled in. One table lookup, no config file, no
+network, no dependencies beyond libc. The default text is the public-domain
+Latin Vulgate, and the whole program fits on a 1.44 MB floppy.
+
+It is the small cousin of [lectio](https://github.com/lukaszkasprzak/lectio),
+the Go engine that computes and generates clectio's data.
+
+## Build
+
+ make # Ordinary Form, English sigla, Latin Vulgate
+ ./clectio # today
+ ./clectio 2026-12-25 # a given date
+ make install # into $PREFIX/bin (default /usr/local)
+
+Needs only a C99 compiler and libc. It builds in about a second.
+
+## Configure (suckless style)
+
+Edit `config.h` (copied from `config.def.h` on first build), then `make`:
+
+ * `FORM_OF` / `FORM_EF` — Ordinary Form (1969) or Extraordinary Form (1962)
+ * `SIGLA_ENGLISH` / `SIGLA_LATIN` — citation dialect (`Jer 14` vs `Ier 14`)
+ * `COLOR` — colour the day name with its liturgical colour
+
+One form per binary; for both, build twice. The interface is English only.
+
+## Bring your own Bible
+
+The default build embeds the Latin Vulgate. To compile with another
+translation, hand `make` a corpus in the same 6-column TSV format
+(`Book<TAB>Abbrev<TAB>BookNum<TAB>Chapter<TAB>Verse<TAB>Text`), using Vulgate
+chapter/verse numbering:
+
+ make CORPUS=/path/to/mybible.tsv
+
+clectio compiles in only the ~12000 verses the lectionary actually cites, so the
+binary stays around 1 MiB whatever the Bible. A verse the corpus lacks prints
+blank; it never fails the day.
+
+## Coverage
+
+The compiled calendar runs 2025–2054. Dates outside that range are reported, not
+guessed. To extend it, regenerate `gen/` with lectio's `clectio-gen`.
+
+## Files
+
+ clectio.c the program: date -> table lookup -> print
+ config.def.h compile-time configuration
+ lz.h a tiny LZSS codec (keeps the compiled text small)
+ mktext.c build tool: resolve verse keys against a corpus, pack the text
+ bin2h.c build tool: embed the packed text as C
+ gen/ generated, corpus-independent data (calendar + citations)
+ text_of.lz the default Vulgate text, packed (one per form)
+
+## Licence
+
+clectio's own code is ISC (see `LICENSE`). The data in `gen/` is generated from
+lectio and is dates and scripture *references* — facts, not copyrightable. The
+compiled scripture *text* is a separate work under its own terms; the default,
+the Latin Vulgate, is public domain. Distribute a build made with a different
+Bible only where that translation permits it.