diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-22 11:21:14 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-22 11:21:14 +0200 |
| commit | fd8a4f115d3c62450368cf9b3fed5705ce78e805 (patch) | |
| tree | f935ec0e2e4c39cb3ddbba364ebc1f873c1b0574 /test/cli.t | |
| parent | 27b07b447be9cf960d1a44e480d8356245481d17 (diff) | |
| download | colitur-fd8a4f115d3c62450368cf9b3fed5705ce78e805.tar.gz colitur-fd8a4f115d3c62450368cf9b3fed5705ce78e805.zip | |
feat(cli): colitur rubrics prints the day's Mass formulary
Separate from day for the reason readings is: a formulary name contains
spaces and day's row is space-separated with a variable-length tail.
Modelled on readings' own structure (year parsing, --overlay plumbing,
error handling): --overlay is accepted, since an overlay can change
which celebration is observed and hence which Mass is said. --lang,
--raw and --sigla-* are refused rather than silently ignored -- this
row resolves no display name and no citation for any of them to
affect.
Output is TAB-separated (date, formulary slug, source), not space or
" | " like the two existing reports: a resolved formulary NAME is a
column a later task may add, and it can carry both spaces and
punctuation a citation never does, ruling out either separator already
in use.
day and readings verified byte-identical (sha256) against a v0.10.1
build across 1583/1900/2026/2038/9999. Man page documents rubrics
beside readings and renders through groff with no errors.
Diffstat (limited to 'test/cli.t')
| -rw-r--r-- | test/cli.t | 93 |
1 files changed, 89 insertions, 4 deletions
@@ -17,7 +17,7 @@ A year outside the supported domain is rejected (exit 2): No/garbage arguments give a usage error (exit 2): $ colitur - colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year> | colitur readings <year> | colitur emit --format FMT --from Y --to Y | colitur table --year Y --template FILE | colitur render --template FILE --year Y | colitur publish --from Y --to Y --out DIR | colitur lang --list|--dump CODE|--check FILE | colitur config --show | colitur check FILE | colitur new-overlay (try: colitur --help) + colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year> | colitur readings <year> | colitur rubrics <year> | colitur emit --format FMT --from Y --to Y | colitur table --year Y --template FILE | colitur render --template FILE --year Y | colitur publish --from Y --to Y --out DIR | colitur lang --list|--dump CODE|--check FILE | colitur config --show | colitur check FILE | colitur new-overlay (try: colitur --help) [2] The EF temporal cycle for a year, one line per day: @@ -199,6 +199,91 @@ A year outside the supported domain is rejected (exit 2): colitur: year 1000 out of range 1583..9999 [2] +Rubrics (Task 4, celebrant-rubrics-phase1): the day's own Mass formulary, one +row per day: date, the formulary's slug (which Mass is actually said, not +always the day's own), and how that was decided +(proper/own/preceding-sunday/common/votive). TAB-separated -- not space like +`day`, not " | " like `readings` -- because a resolved formulary NAME (a +later column, not this one) can itself contain both spaces and punctuation a +citation never does, and TAB is what stays unambiguous either way. A +separate command for the same mechanical reason `readings` is: `day`'s row +is fixed-width space-separated with a variable-length "+slug" tail. + + $ colitur rubrics 2026 | head -3 + 2026-01-01 ef-circumcision own + 2026-01-02 ef-christmas-1-friday own + 2026-01-03 ef-christmas-1-saturday votive + + $ colitur rubrics 2026 | wc -l + 365 + +1 January reads "own", not "proper": the Circumcision is a TEMPORAL-origin +office (Rite_ef.Temporal_ef, not the sanctoral Layer), so step 1 of the +resolution chain (a SANCTORAL observed celebration's own proper) does not +apply to it -- step 2 does (the day's own temporal slug in the lectionary), +tagged `own`. Contrast a real sanctoral saint with his own proper: + + $ colitur rubrics 2038 | grep '^2038-03-08' + 2038-03-08 john-of-god proper + +A saint with no proper of his own says his assigned Common (step 4): + + $ colitur rubrics 2038 | grep '^2038-03-06' + 2038-03-06 common-of-non-virgins-1 common + +A weekday with no proper of its own resumes the preceding Sunday's, never +its own observed slug -- 1 December 2025 is the Monday after Advent I, and +Advent's ferias have no Mass of their own (step 3): + + $ colitur rubrics 2025 | grep '^2025-12-01' + 2025-12-01 ef-advent-sunday-1 preceding-sunday + +3 January 2026 above ("votive") is the RG 78/309(a) Saturday Mass of Our +Lady, said IN PLACE of the day's own office's Mass while the office (an +unoccupied IV-class Saturday) itself is kept unchanged -- distinct from +`own` precisely because a votive Mass is not the day's own, even though +`said` names the identical slug either way. + +A year outside the supported domain is rejected (exit 2): + + $ colitur rubrics 1000 + colitur: year 1000 out of range 1583..9999 + [2] + +--overlay is accepted, the same reasoning `readings` gets it: an overlay can +change which celebration is observed, hence which Mass formulary is said. +Baseline, the unoccupied Saturday says Our Lady's votive Mass; with the +diocesan overlay's local patron observed instead (no proper or Common of his +own in the fixture), the chain falls all the way back to step 3: + + $ colitur rubrics 2026 --overlay fixtures/overlay-example-diocesan.sexp | grep '^2026-07-11' + 2026-07-11 ef-time-after-pentecost-sunday-6 preceding-sunday + $ colitur rubrics 2026 | grep '^2026-07-11' + 2026-07-11 ef-time-after-pentecost-6-saturday votive + +`--lang`/`--raw`/`--sigla-*` are refused rather than silently ignored, unlike +`readings`: this row resolves no display name and no citation for any of +them to affect. + + $ colitur rubrics 2026 --lang en + colitur: --lang/--raw have no effect on `rubrics`; refusing rather than ignoring them + [2] + + $ colitur rubrics 2026 --raw + colitur: --lang/--raw have no effect on `rubrics`; refusing rather than ignoring them + [2] + + $ colitur rubrics 2026 --sigla-style en + colitur: --sigla-style/--sigla-book/--sigla-tradition have no effect on `rubrics`; refusing rather than ignoring them + [2] + +`colitur day` and `colitur readings` are unaffected by any of the above: + + $ colitur day 2026 --raw | head -1 + 2026-01-01 thursday christmastide - ef-circumcision class-1 white + $ colitur readings 2026 --raw | head -1 + 2026-01-01 ef-circumcision | Titus 2:11-15 | Luke 2:21 + An explicit COLITUR_DATA_DIR that does not hold the data is an error (exit 2), never a silent fall-back to some other copy. A packager or operator who names a directory has stated an intent; quietly calendaring off a different one @@ -247,7 +332,7 @@ The error path is the mirror image -- nothing on stdout, exit 2: Every command the help lists is a command the binary actually accepts. This is the check that catches help text drifting away from the dispatch: - $ for c in easter temporal day readings; do colitur $c 2026 > /dev/null || echo "$c FAILED"; done + $ for c in easter temporal day readings rubrics; do colitur $c 2026 > /dev/null || echo "$c FAILED"; done --version prints the version alone, to standard output, exit 0. Deliberately not embedded in the help text above: this pin would then have to be edited @@ -327,14 +412,14 @@ A flag needing a value, given none: $ colitur day 2026 --overlay colitur: --overlay needs a file path - colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year> | colitur readings <year> | colitur emit --format FMT --from Y --to Y | colitur table --year Y --template FILE | colitur render --template FILE --year Y | colitur publish --from Y --to Y --out DIR | colitur lang --list|--dump CODE|--check FILE | colitur config --show | colitur check FILE | colitur new-overlay (try: colitur --help) + colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year> | colitur readings <year> | colitur rubrics <year> | colitur emit --format FMT --from Y --to Y | colitur table --year Y --template FILE | colitur render --template FILE --year Y | colitur publish --from Y --to Y --out DIR | colitur lang --list|--dump CODE|--check FILE | colitur config --show | colitur check FILE | colitur new-overlay (try: colitur --help) [2] An unknown option is rejected rather than treated as a positional word: $ colitur day 2026 --diocese colitur: unknown option --diocese - colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year> | colitur readings <year> | colitur emit --format FMT --from Y --to Y | colitur table --year Y --template FILE | colitur render --template FILE --year Y | colitur publish --from Y --to Y --out DIR | colitur lang --list|--dump CODE|--check FILE | colitur config --show | colitur check FILE | colitur new-overlay (try: colitur --help) + colitur: usage: colitur easter <year> | colitur temporal <year> | colitur day <year> | colitur readings <year> | colitur rubrics <year> | colitur emit --format FMT --from Y --to Y | colitur table --year Y --template FILE | colitur render --template FILE --year Y | colitur publish --from Y --to Y --out DIR | colitur lang --list|--dump CODE|--check FILE | colitur config --show | colitur check FILE | colitur new-overlay (try: colitur --help) [2] The shipped example overlay is runnable documentation, and it must actually |
