diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 23:48:35 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 23:48:35 +0200 |
| commit | ecadd969e1d96918820a1fdac0cf0d520d96ba06 (patch) | |
| tree | a06ed1160bfd28ae4578d9445242e48ac9ac3ea4 /schema/day-v1.json | |
| parent | 6762ce46af3cb12bc6ae37cda762c5d95add7903 (diff) | |
| parent | 329d07b49e397cb65ab52e7ca019b47313027136 (diff) | |
| download | colitur-ecadd969e1d96918820a1fdac0cf0d520d96ba06.tar.gz colitur-ecadd969e1d96918820a1fdac0cf0d520d96ba06.zip | |
feat: naming, localisation and the rebuilt printed output
colitur computed the calendar correctly and could not say what it had
computed. A printed ordo read ef-septuagesima-sunday-2 where a reader
expects Dominica in Sexagesima, and the wall calendar showed slugs in
every cell.
lib/naming a language table and a config file, both pure and total,
parsing the INI reader Overlay_ini already had
lang/ la.ini and en.ini -- 725 names, every one transcribed
from the 1962 Missal and citing the line it came from
templates the ordo rebuilt as an A5 booklet: one week per page, a
table of contents, framed days, a colour swatch; the wall
calendar now fills its sheet instead of a quarter of it
tools check_citations.py verifies all 400 citations resolve,
with 33 self-tests of its own
Names resolve through lang -> declared fallback -> the slug, so a partial
translation is usable from its first line and the fully degraded case is
the old output rather than a blank page.
colitur day and colitur readings are BYTE-IDENTICAL to before, verified
against main rather than asserted; --lang, --raw and the lang/config
subcommands are still to come, and man/colitur-templates.5 still
documents the pre-naming view, so writing a custom template needs the
source until that lands.
Diffstat (limited to 'schema/day-v1.json')
| -rw-r--r-- | schema/day-v1.json | 58 |
1 files changed, 38 insertions, 20 deletions
diff --git a/schema/day-v1.json b/schema/day-v1.json index b48133a..5a7537c 100644 --- a/schema/day-v1.json +++ b/schema/day-v1.json @@ -3,10 +3,21 @@ "$id": "https://colitur/schema/day-v1.json", "title": "colitur liturgical year, v1", "type": "object", - "required": ["rite", "year", "months", "days"], + "required": ["rite", "year", "term", "weekday_headings", "months", "days"], "properties": { "rite": { "type": "string" }, "year": { "type": "string", "pattern": "^[0-9]{4}$" }, + "term": { "type": "object", "additionalProperties": { "type": "string" }, "description": "fixed vocabulary (ordo, contents, epistle, lesson, gospel, commemoration, week) in the active language" }, + "weekday_headings": { + "type": "array", + "minItems": 7, + "maxItems": 7, + "items": { + "type": "object", + "required": ["name", "last"], + "properties": { "name": { "type": "string" }, "last": { "type": "boolean" } } + } + }, "months": { "type": "array", "items": { "$ref": "#/$defs/month" } }, "days": { "type": "array", "items": { "$ref": "#/$defs/day" } } }, @@ -16,36 +27,43 @@ "required": ["num", "name", "days", "weeks"], "properties": { "num": { "type": "string" }, - "name": { "type": "object", "additionalProperties": { "type": "string" } }, + "name": { "type": "string", "description": "the resolved display name, e.g. \"Ianuarius\"" }, "days": { "type": "array", "items": { "$ref": "#/$defs/day" } }, "weeks": { "type": "array", "items": { "$ref": "#/$defs/week" } } } }, "week": { "type": "object", - "required": ["num", "days"], + "required": ["num", "month_num", "month_name", "days"], "properties": { - "num": { "type": "string" }, - "days": { "type": "array", "minItems": 7, "maxItems": 7, "items": { "$ref": "#/$defs/day" } } + "num": { "type": "string" }, + "month_num": { "type": "string", "description": "the enclosing month's num, carried here because the engine has no parent-path syntax" }, + "month_name": { "type": "string", "description": "the enclosing month's resolved name, same reason" }, + "days": { "type": "array", "minItems": 7, "maxItems": 7, "items": { "$ref": "#/$defs/day" } } } }, "day": { "type": "object", - "required": ["iso", "dom", "dow", "in_month", "season", "week", "slug", - "name", "rank", "colour", "is_white", "is_red", "is_green", - "is_violet", "is_rose", "is_black", "subject", "comms", - "transferred_in", "transferred_out", "first", "gospel", "last"], + "required": ["iso", "dom", "dow", "in_month", "season", "season_name", "week", + "slug", "name", "weekday", "rank", "rank_name", "colour", "colour_name", + "is_white", "is_red", "is_green", "is_violet", "is_rose", "is_black", + "subject", "comms", "transferred_in", "transferred_out", "first", + "gospel", "last"], "properties": { - "iso": { "type": "string", "description": "empty on a grid padding cell" }, - "dom": { "type": "string" }, - "dow": { "type": "string", "description": "0 = Sunday" }, - "in_month": { "type": "boolean", "description": "false = grid padding cell" }, - "season": { "type": "string" }, - "week": { "type": "string", "description": "empty when the rite numbers no week here" }, - "slug": { "type": "string" }, - "name": { "type": "object", "additionalProperties": { "type": "string" } }, - "rank": { "type": "string" }, - "colour": { "type": "string", "enum": ["white","red","green","violet","rose","black",""] }, + "iso": { "type": "string", "description": "empty on a grid padding cell" }, + "dom": { "type": "string" }, + "dow": { "type": "string", "description": "0 = Sunday" }, + "in_month": { "type": "boolean", "description": "false = grid padding cell" }, + "season": { "type": "string" }, + "season_name": { "type": "string", "description": "the resolved season name in the active language" }, + "week": { "type": "string", "description": "empty when the rite numbers no week here" }, + "slug": { "type": "string", "description": "the stable machine key -- unaffected by the active language" }, + "name": { "type": "string", "description": "the resolved display name; under --raw this equals slug" }, + "weekday": { "type": "string", "description": "the resolved weekday name in the active language" }, + "rank": { "type": "string" }, + "rank_name": { "type": "string", "description": "the resolved rank name in the active language" }, + "colour": { "type": "string", "enum": ["white","red","green","violet","rose","black",""] }, + "colour_name": { "type": "string", "description": "the resolved colour name in the active language" }, "is_white": { "type": "boolean" }, "is_red": { "type": "boolean" }, "is_green": { "type": "boolean" }, "is_violet":{ "type": "boolean" }, "is_rose": { "type": "boolean" }, "is_black": { "type": "boolean" }, @@ -57,7 +75,7 @@ "required": ["slug", "name", "privileged"], "properties": { "slug": { "type": "string" }, - "name": { "type": "object", "additionalProperties": { "type": "string" } }, + "name": { "type": "string", "description": "the resolved display name, same table as the day's own name" }, "privileged": { "type": "boolean" } } } |
