summaryrefslogtreecommitdiff
path: root/lib/kernel
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 /lib/kernel
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 'lib/kernel')
-rw-r--r--lib/kernel/overlay_ini.mli9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/kernel/overlay_ini.mli b/lib/kernel/overlay_ini.mli
index bace93b..321cac1 100644
--- a/lib/kernel/overlay_ini.mli
+++ b/lib/kernel/overlay_ini.mli
@@ -32,6 +32,15 @@
Dates take three forms, matching {!Date_spec}: [MM-DD], [easter+N] or
[easter-N], and [mon/day/nth] such as [oct/sun/1] or [oct/sun/-1]. *)
+(** One [section] of a flat INI file. Exposed so other libraries (the language
+ and config files) reuse this reader rather than growing a second one that
+ would drift in its comment, quoting and trimming rules. *)
+type section = { name : string; fields : (string * string) list }
+
+(** Split INI text into sections. [\[section\]] headers, [key = value] lines,
+ ';' and '#' comments, blank lines ignored. Never raises. *)
+val parse_sections : string -> (section list, string) result
+
(** [parse ~rank_of_string text] is the overlay [text] denotes.
[rank_of_string] is supplied by the rite, exactly as [Overlay.load] takes