diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 14:35:36 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 14:35:36 +0200 |
| commit | 22824ef50abfeb497f04e73f88d0f7ab2e164eaf (patch) | |
| tree | 8032af1a7beb2078163ba052efcb58b0ba00888c /Makefile | |
| parent | f00f7a66d073815249e94cec1b6ef10539d773e7 (diff) | |
| download | colitur-22824ef50abfeb497f04e73f88d0f7ab2e164eaf.tar.gz colitur-22824ef50abfeb497f04e73f88d0f7ab2e164eaf.zip | |
fix(lang): correct two wrong citation lines, add check-citations
Two of la.ini's LT.txt:<n> citations pointed at the wrong line -- the
Latin itself was right, only the pinned line was wrong:
- advent cited LT.txt:8631 ("Tempus Nativitatis"); the real "Tempus
Adventus" heading is at 8609.
- ef-christ-the-king and [rank]'s own citation both pointed near
"Dominica ultima Octobris" (12459) when the text they actually quote,
"D.NI NOSTRI JESU CHRISTI REGIS" and "I classis", sits two and three
lines further down, at 12461 and 12462.
ef-christmas-sunday-0 was marked PATTERN but LT.txt:8644 is the identical
string verbatim -- relabelled as a direct citation, not constructed.
Added tools/check_citations.py and `make check-citations`: for every
LT.txt:<n> citation outside a PATTERN block, confirms a +-2-line window
around line n actually contains the Latin text the citation claims,
rather than trusting each of the 38 citations by hand. Follows
check-schema/check-templates' own precedent -- docs/ is gitignored, so
the target prints SKIPPED loudly and exits 0 when docs/research/LT.txt
is absent, never a silent pass.
The checker's own teeth are proven three ways: replayed against the
pre-fix file it independently re-derives both corrections above; a fresh
mutation (redirecting one citation to an unrelated line) is caught and
reverted; the fixed file passes clean, 147 citations checked, 0 wrong.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -22,7 +22,7 @@ MAN5DIR := $(PREFIX)/share/man/man5 # over documenting the dune commands. DUNE := opam exec -- -.PHONY: help build test check check-schema check-templates install uninstall reinstall clean fmt man doc release +.PHONY: help build test check check-schema check-templates check-citations install uninstall reinstall clean fmt man doc release help: ## show this help @grep -hE '^[a-z-]+:.*##' $(MAKEFILE_LIST) | sed -E 's/:.*## /\t/' | sort @@ -84,6 +84,24 @@ check-templates: build ## typeset every shipped template (needs pdflatex/groff; else echo "SKIPPED: groff not installed -- groff templates render but are NOT typeset"; fi; \ test $$ok -eq 1 +# lang/la.ini's own discipline: every celebration/season/rank name cites the +# docs/research/LT.txt line it was transcribed from, so a claim can be +# checked, not just trusted. tools/check_citations.py re-derives that check +# mechanically: for every "LT.txt:<n>" citation outside a PATTERN-marked +# block, it confirms a +-2-line window around line n actually contains the +# Latin text the citation claims -- see that script's own docstring for the +# exact rule and its known limits (a heuristic, not a proof). docs/ is +# gitignored, so a fresh clone has no docs/research/LT.txt at all: the same +# "SKIPPED, loudly, exit 0" discipline check-schema/check-templates already +# use above -- a silent skip reads as a pass, which this project has hit +# the cost of before. +check-citations: ## verify lang/la.ini's LT.txt:<n> citations (needs docs/research/LT.txt, gitignored; SKIPPED if absent) + @if command -v python3 >/dev/null 2>&1; then \ + python3 tools/check_citations.py; \ + else \ + echo "SKIPPED: python3 not installed -- citations NOT verified this run"; \ + fi + install: build ## install binary, calendar data, templates, schema and man pages into PREFIX (default ~/.local) $(DUNE) dune install --prefix $(PREFIX) @mkdir -p $(MANDIR) |
