diff options
Diffstat (limited to 'tools/bootstrap_sanctoral.ml')
| -rw-r--r-- | tools/bootstrap_sanctoral.ml | 28 |
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) ------------------------------------------------ *) |
