From 2468224d0aaacd8b0e7478af55142bcd831d2b77 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Wed, 29 Jul 2026 09:55:22 +0200 Subject: 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 --- calendar.def.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 calendar.def.h (limited to 'calendar.def.h') 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 */ +}; -- cgit v1.3