diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-29 08:49:03 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-29 08:49:03 +0200 |
| commit | 4290b7b2cbeeba4f08446f15c04b64d70dedbabc (patch) | |
| tree | d6e6067a5c179035e17eba33868e948156978599 /README.md | |
| parent | 302897c5e8d61db9107505ba929f9abfc197896d (diff) | |
| download | clectio-4290b7b2cbeeba4f08446f15c04b64d70dedbabc.tar.gz clectio-4290b7b2cbeeba4f08446f15c04b64d70dedbabc.zip | |
feat: -a/-g runtime reading toggle and WRAP config option
- -a/--all and -g/--gospel override the compiled GOSPEL_ONLY default per run;
the reading text for both is always embedded, so this is free. Flags may
appear in any position alongside the optional date.
- WRAP config.h option wraps reading text at N columns; 0 (default) fits the
terminal via TIOCGWINSZ and leaves piped output one line per verse. Greedy,
space-breaking, UTF-8 aware (continuation bytes do not count as columns).
- Rework arg parsing into a small flag loop; expand -h usage.
No table/data change; OF and EF both build clean under -Wall -Wextra. Binary
grows ~4 KB (666 KB OF). Stays compile-time-first, suckless-style: the only
run-time options are the reading-set toggle and -h.
Claude-Session: https://claude.ai/code/session_01S1CD1u3tgSS4xNu6WHfp5a
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -16,10 +16,17 @@ the Go engine that computes and generates clectio's data. make # Ordinary Form, English sigla, Latin Vulgate ./clectio # today ./clectio 2026-12-25 # a given date + ./clectio -g 2026-12-25 # the Gospel only + ./clectio -a # all readings (override a Gospel-only build) make install # into $PREFIX/bin (default /usr/local) Needs only a C99 compiler and libc. It builds in about a second. +The only run-time options are `-a`/`--all`, `-g`/`--gospel` (which reading set +to print, overriding the compiled default) and `-h`/`--help`; everything else is +compile-time. Reading text wraps to the terminal width by default (see `WRAP`); +piped output is left one line per verse. + ## Configure (suckless style) Edit `config.h` (copied from `config.def.h` on first build), then `make`: @@ -27,7 +34,8 @@ 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 - * `GOSPEL_ONLY` — print every reading (0, default) or just the Gospel (1) + * `GOSPEL_ONLY` — default reading set: every reading (0) or the Gospel only (1); override per run with `-a` / `-g` + * `WRAP` — wrap reading text at N columns; `0` fits the terminal (and leaves piped output unwrapped) One form per binary; for both, build twice. The interface is English only. |
