diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/gen-sanctoral.go | 16 | ||||
| -rw-r--r-- | scripts/genlect-of.go | 16 |
2 files changed, 22 insertions, 10 deletions
diff --git a/scripts/gen-sanctoral.go b/scripts/gen-sanctoral.go index b179b67..561bec0 100644 --- a/scripts/gen-sanctoral.go +++ b/scripts/gen-sanctoral.go @@ -77,13 +77,23 @@ func slugify(title string) string { } // classOf infers the celebration class from its English title (precedence hint). +// Feasts of the Lord (class lord) outrank Ordinary Sundays; the BVM class carries +// Marian-commemoration precedence. Order matters: the Lord tests run before the +// saint default; "holy cross" (the feast) is distinguished from "of the cross" +// (saints like John of the Cross), which stay saints. func classOf(en string) string { l := strings.ToLower(en) switch { - case strings.Contains(l, "blessed virgin mary"), strings.Contains(l, "our lady"), strings.Contains(l, "of mary"): - return "bvm" - case strings.Contains(l, "the lord"), strings.Contains(l, "of the cross"), strings.Contains(l, "transfiguration"), strings.Contains(l, "holy trinity"): + case strings.Contains(l, "holy cross"), strings.Contains(l, "transfiguration of the lord"), + strings.Contains(l, "presentation of the lord"), strings.Contains(l, "holy name of jesus"), + strings.Contains(l, "sacred heart"), strings.Contains(l, "holy trinity"), + strings.Contains(l, "body and blood"), strings.Contains(l, "dedication of the lateran"), + strings.HasSuffix(l, "of the lord"), strings.Contains(l, "of the lord,"): return "lord" + case strings.Contains(l, "blessed virgin mary"), strings.Contains(l, "our lady"), + strings.Contains(l, "of mary"), strings.Contains(l, "queenship"), + strings.Contains(l, "immaculate heart"), strings.Contains(l, "the annunciation"): + return "bvm" default: return "saint" } diff --git a/scripts/genlect-of.go b/scripts/genlect-of.go index 00d0992..32a8525 100644 --- a/scripts/genlect-of.go +++ b/scripts/genlect-of.go @@ -115,14 +115,16 @@ func main() { // A true ferial (incl. optional-memorial days, where the ferial is the // observed default): niedziela shows the ferial readings. key = full.Observed.Slug + "-" + full.WeekdayCycle - } else if full.Observed.Rank == calendar.RankMemorial { - // An obligatory memorial: niedziela shows its PROPER readings (e.g. St - // Barnabas, Acts 11) or, for memorials without proper readings, the - // ferial. Either way it is keyed by the memorial's OWN slug, so it is - // correctly attributed and never miskeyed to a ferial position. - key = full.Observed.Slug + "-" + full.WeekdayCycle } else { - continue // (unreachable: optional memorials are ferial-observed) + // Obligatory memorial: SKIP. Most memorials read the ferial of the + // DAY, which varies year to year (the fixed feast date lands in a + // different Ordinary-Time week each year) -- so keying by the saint + // slug would freeze one year's ferial and be wrong in others. At + // runtime the resolver falls the memorial back to the day's ferial + // slug, which resolves to the correct week's reading. (Proper-reading + // memorials therefore show the ferial, a permitted OF option; their + // propers are a later refinement.) + continue } if seen[key] { continue // already stored from an earlier year |
