propers: add octave Matins readings, starting with St. Lawrence's
Deploy / deploy (push) Successful in 46s
Deploy / deploy (push) Successful in 46s
Adds propers/octave-readings.ts: a day-indexed lookup
(getOctaveReading(octaveId, dayNumber), id convention
"${octaveId}-octave-day-${dayNumber}") since readings genuinely vary day
to day within a single octave (confirmed: the Assumption's own octave
gives different patristic excerpts on day 2 vs. day 5) -- the singular
OctaveConfig.readingId field from the previous commit didn't fit that
reality and is removed.
Sourced via a different query command (prayMatutinum, not prayTertia)
than every other proper this pull has pulled -- the raw per-date
Sancti/MM-DD.txt files for octave-continuation days are occupied by
unrelated later-calendar saints (same trap as everywhere else), but the
real content lives in MM-DDoct.txt/MM-DDbmv.txt-style variant files the
live engine resolves correctly.
Per project convention (2026-08 discussion): the historical 3 (or 9-12,
on a day's own higher-rank office) Lectios are collapsed into one
continuous reading rather than kept broken up, and only the first
responsory is kept (which one to use when several collapse into one is
still an open question). A caught bug along the way: several readings
have no English translation in the source at all -- its own English page
silently falls back to showing the Latin text under the "Reading"
header, which an early pass mistakenly stored as a duplicate before the
mismatch was caught; now left honestly missing instead.
St. Lawrence's octave: real readings for days 2-5 and 8 (day 8, "In
Octava S. Laurentii," is a fuller distinct office); days 6-7 (Aug 15-16)
belong entirely to the Assumption's feast and octave instead -- day 7's
query, redirected, became assumption-octave-day-2's reading. The other
five octaves (Assumption's remaining days, Nativity BVM, Immaculate
Conception, All Saints, the Christmas trio, Pentecost) are follow-up
work, not done in this pass.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,4 +47,6 @@ export function getTemporalProper(id: string): ProperText {
|
||||
return resolve(temporalPropers, id);
|
||||
}
|
||||
|
||||
export { getOctaveReading } from './octave-readings';
|
||||
export type { ProperText } from './types';
|
||||
export type { OctaveReadingText } from './octave-readings';
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// Matins readings for octave days — a separate small store from
|
||||
// common/temporal propers because these are keyed by
|
||||
// `${octaveId}-octave-day-${dayNumber}` (day 1 = the feast's own day, not
|
||||
// normally authored here since that day already has its own real content
|
||||
// elsewhere) rather than a flat id, and because unlike a collect, a
|
||||
// day's worth of historical lessons (usually 3, sometimes 9) is
|
||||
// deliberately collapsed into one continuous reading here rather than kept
|
||||
// broken up the way the sources present it — a project-specific
|
||||
// simplification, not how these are actually prayed historically.
|
||||
import type { LanguageCode, TranslationStatus } from '../psalter/types';
|
||||
|
||||
export interface OctaveReadingText {
|
||||
id: string;
|
||||
/** Attribution for the reading — author and work, e.g. "St. John
|
||||
* Damascene, 2nd Sermon on the Dormition of the Mother of God". Not
|
||||
* itself translated/localized. */
|
||||
source: string;
|
||||
text: Partial<Record<LanguageCode, string>>;
|
||||
/** The first responsory following the reading in the source, where one
|
||||
* was found — which one to use when several lessons (and several
|
||||
* responsories) collapse into a single reading is an open question
|
||||
* (2026-08 discussion); "the first one" is the working answer. Omitting
|
||||
* the closing Gloria Patri outside Septuagesima-Holy Saturday is a
|
||||
* rendering concern, not captured here. */
|
||||
responsory?: Partial<Record<LanguageCode, string>>;
|
||||
status: Partial<Record<LanguageCode, TranslationStatus>>;
|
||||
}
|
||||
|
||||
const octaveReadingModules = import.meta.glob<{ default: OctaveReadingText }>(
|
||||
'../data/propers/octave-readings/*.yml',
|
||||
{ eager: true },
|
||||
);
|
||||
|
||||
const octaveReadingsById = new Map<string, OctaveReadingText>();
|
||||
for (const mod of Object.values(octaveReadingModules)) {
|
||||
octaveReadingsById.set(mod.default.id, mod.default);
|
||||
}
|
||||
|
||||
/** Undefined, not a "missing" placeholder, when this octave day has no
|
||||
* reading authored — normal and expected (not every day has one), unlike
|
||||
* getCommonProper/getTemporalProper's ids, which are always expected to
|
||||
* resolve to *something* eventually. */
|
||||
export function getOctaveReading(octaveId: string, dayNumber: number): OctaveReadingText | undefined {
|
||||
return octaveReadingsById.get(`${octaveId}-octave-day-${dayNumber}`);
|
||||
}
|
||||
Reference in New Issue
Block a user