summaryrefslogtreecommitdiff
path: root/tools/bootstrap_sanctoral.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-15 00:05:35 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-15 00:05:35 +0200
commitf1d90a83ece4d8301061e8247e23ec2af8293ab4 (patch)
treebe9e86f504b4a1d5fee6e31cc5f5d230eba4522c /tools/bootstrap_sanctoral.ml
parent6f5814ccdbc839b75c3e6de95a8ba9a755bc6ece (diff)
downloadcolitur-f1d90a83ece4d8301061e8247e23ec2af8293ab4.tar.gz
colitur-f1d90a83ece4d8301061e8247e23ec2af8293ab4.zip
data(ef): carry sanctoral propers on the celebration
Celebration.citations has existed in the type, the .mli and the sexp schema since Plan 2 and has been emitted as () for every entry; the bootstrap now writes the real values for the 208 entries lectio has them for. On the celebration rather than in the lectionary table deliberately: a diocesan overlay adding a saint then carries his readings through the existing overlay algebra, with no second file to edit and no new directive. Asserted both ways -- the 13 January proper is present, and no Commemoration_only entry has readings, because in the EF a commemoration contributes an oration, not a reading.
Diffstat (limited to 'tools/bootstrap_sanctoral.ml')
-rw-r--r--tools/bootstrap_sanctoral.ml28
1 files changed, 26 insertions, 2 deletions
diff --git a/tools/bootstrap_sanctoral.ml b/tools/bootstrap_sanctoral.ml
index 4868c6c..92bda77 100644
--- a/tools/bootstrap_sanctoral.ml
+++ b/tools/bootstrap_sanctoral.ml
@@ -16,6 +16,7 @@
colitur repo root. *)
module Cel = Colitur_kernel.Celebration
+module Citation = Colitur_kernel.Citation
module Slug = Colitur_kernel.Slug
module Colour = Colitur_kernel.Colour
module Subject = Colitur_kernel.Subject
@@ -185,7 +186,29 @@ let parse_names sec =
| Some pl -> Names.of_list [ (Lang.of_string_exn "en", en); (Lang.of_string_exn "pl", pl) ]
| None -> Names.of_list [ (Lang.of_string_exn "en", en) ]
-(* reading.* is deliberately ignored -- Plan 4's lectionary bootstrap. *)
+(* reading.first / reading.gospel -> Celebration.citations. Only these two
+ parts: the plan's Global Constraints fix the scope at Epistle + Gospel and
+ lectio carries nothing else.
+
+ 208 of 328 entries have them. Of the 120 without, 104 are
+ Commemoration_only -- correctly readingless, since in the EF a
+ commemoration contributes an oration, not a reading -- and 15 are class-3
+ saints handled by the Commons (Task 6). *)
+let parse_citations sec =
+ let cite part key =
+ match field_opt sec key with
+ | None | Some "" -> None
+ | Some reference -> Some { Citation.part; reference }
+ in
+ let cs =
+ List.filter_map Fun.id
+ [ cite Citation.First "reading.first"; cite Citation.Gospel "reading.gospel" ]
+ in
+ if List.length cs = 1 then
+ die "%s: has one reading, not two -- an Epistle without a Gospel (or the \
+ reverse) is malformed" sec.name;
+ cs
+
let convert_entry sec : V.rank Layer.entry =
let slug = parse_slug sec in
let date = parse_date sec in
@@ -193,13 +216,14 @@ let convert_entry sec : V.rank Layer.entry =
let colour = parse_colour sec in
let subject = parse_subject sec in
let names = parse_names sec in
+ let citations = parse_citations sec in
(* PE.universal_layer, NOT lectio's own "tridentine" layer id and NOT the
Celebration.make default "temporal": Precedence_ef.band reads
Celebration.t.layer to classify RG 91 entries 11/16/24 (universal) vs
12/19/23 (proper) vs 13/20 (indult, PE.indult_prefix). Every entry here
is the General Roman Calendar's own universal sanctoral, so all 322 get
the same provenance tag. *)
- { Layer.date; cel = Cel.make ~slug ~names ~rank ~status ~colour ~subject ~citations:[]
+ { Layer.date; cel = Cel.make ~slug ~names ~rank ~status ~colour ~subject ~citations
~layer:PE.universal_layer () }
(* --- Provenance (spec ยง4.5) ------------------------------------------------ *)