diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-29 09:55:22 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-29 09:55:22 +0200 |
| commit | 2468224d0aaacd8b0e7478af55142bcd831d2b77 (patch) | |
| tree | 8b88e2421083c73b6257ea5c6abda56ed601f9d7 /calendar.def.h | |
| parent | d0bcdc3f3912a4e746fe12050e8062b3679124aa (diff) | |
| download | clectio-2468224d0aaacd8b0e7478af55142bcd831d2b77.tar.gz clectio-2468224d0aaacd8b0e7478af55142bcd831d2b77.zip | |
feat: standalone calendar overrides (calendar.h) + document customization
Add a compile-time override table for MINOR local calendar changes, standalone
(no lectio, no toolchain): edit calendar.h (copied from calendar.def.h), add a
{ month, day, colour, "name" } row, make. It replaces a fixed date's name and
colour, every year, in both single-day and --month output. Limits (no engine):
fixed dates only; name/colour only, not readings or rank/precedence; an override
wins unconditionally.
README gains a "Customize the calendar" section documenting both tiers with
their limits: the standalone override above, and -- for readings, ranks and
movable feasts -- regenerating gen/ from a lectio calendar layer via
clectio-gen (-caldir/-use), then rebuilding with CORPUS= to repack any newly
cited verses, with a git-checkout revert note.
Both forms build clean under -Wall -Wextra; binary unchanged at 666 KB; default
(empty override table) output is unchanged.
Claude-Session: https://claude.ai/code/session_01S1CD1u3tgSS4xNu6WHfp5a
Diffstat (limited to 'calendar.def.h')
| -rw-r--r-- | calendar.def.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/calendar.def.h b/calendar.def.h new file mode 100644 index 0000000..3a43f0a --- /dev/null +++ b/calendar.def.h @@ -0,0 +1,25 @@ +/* clectio local calendar overrides -- suckless style: copy to calendar.h, + * edit, `make`. Compiled in; there is no config file at run time. + * + * Each row REPLACES the name and colour of ONE fixed date (month, day), every + * year. This is for MINOR local changes only. clectio has no calendar engine, + * so it CANNOT, here: + * - change a day's READINGS, or its RANK / precedence (it stores neither); + * - place MOVABLE feasts (Easter-relative dates); + * - arbitrate against the universal day -- an override wins UNCONDITIONALLY, + * so only override a date whose celebration you truly mean to replace. + * The readings shown on an overridden day stay the underlying day's -- which is + * correct for a memorial (it uses the weekday readings). For proper readings, + * ranks, or movable feasts, regenerate the calendar from lectio (see README). + * + * Colours: GREEN WHITE RED VIOLET ROSE BLACK + * Fields: { month, day, colour, "Display name" } + */ +static const Override overrides[] = { + /* Uncomment, edit, or add rows. Examples: */ + /* { 5, 16, RED, "Saint Andrew Bobola, priest and martyr" }, */ + /* { 4, 23, RED, "Saint Adalbert, bishop and martyr" }, */ + /* { 8, 15, WHITE, "The Assumption -- Our Lady of the Herbs" }, */ + + { 0, 0, 0, 0 } /* end marker -- keep this row last */ +}; |
