aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:48:35 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-19 23:48:35 +0200
commitecadd969e1d96918820a1fdac0cf0d520d96ba06 (patch)
treea06ed1160bfd28ae4578d9445242e48ac9ac3ea4 /Makefile
parent6762ce46af3cb12bc6ae37cda762c5d95add7903 (diff)
parent329d07b49e397cb65ab52e7ca019b47313027136 (diff)
downloadcolitur-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 'Makefile')
-rw-r--r--Makefile35
1 files changed, 32 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d9377df..3f534c3 100644
--- a/Makefile
+++ b/Makefile
@@ -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
@@ -58,8 +58,10 @@ check-templates: build ## typeset every shipped template (needs pdflatex/groff;
if command -v pdflatex >/dev/null 2>&1; then \
for t in ordo grid; do \
opam exec -- dune exec colitur -- table --year 2027 --template templates/ef/$$t.tex > /tmp/$$t.tex && \
- (cd /tmp && pdflatex -halt-on-error -interaction=nonstopmode $$t.tex >/dev/null) && \
- echo "pdflatex: $$t.tex OK" || { echo "pdflatex: $$t.tex FAILED"; ok=0; }; \
+ (cd /tmp && pdflatex -halt-on-error -interaction=nonstopmode $$t.tex >/dev/null && \
+ pdflatex -halt-on-error -interaction=nonstopmode $$t.tex >/dev/null) && \
+ echo "pdflatex: $$t.tex OK (two passes, so a TOC's own \\pageref settles)" || \
+ { echo "pdflatex: $$t.tex FAILED"; ok=0; }; \
done; \
else echo "SKIPPED: pdflatex not installed -- LaTeX templates render but are NOT typeset"; fi; \
if command -v groff >/dev/null 2>&1; then \
@@ -84,6 +86,33 @@ 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 the EXACT cited line (or an explicit "n-m" range, for
+# a heading that genuinely wraps -- no automatic +-2-line tolerance any
+# more, see the script's own docstring for why) contains the Latin text the
+# citation claims, scoped to that citation's own entry only, never to
+# prose quoted elsewhere in the surrounding comment. A citation whose pool
+# of candidate words is too thin to discriminate a right line from a wrong
+# nearby one (a heuristic, not a proof) is reported CANNOT VERIFY, not
+# silently passed, and fails the target exactly like a genuine mismatch --
+# a human adjudicates it. The script has its own self-test
+# (tools/test_check_citations.py, wired into `dune test`/`make test` as
+# well as this target) after an earlier version of this exact check was
+# found to be self-poisoning: see either docstring for the full account.
+# 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)