fix: preserve daily Gospel editorial metadata
Co-authored-by: rafa <rcalvotorrejon@gmail.com> Signed-off-by: rafa <rcalvotorrejon@gmail.com>
This commit is contained in:
@@ -26,6 +26,15 @@ MANUAL_CITATIONS = {
|
||||
"Miércoles de la 32ª semana Lc 17,11-19)": "Lc 17,11-19",
|
||||
"22 de Julio": "Jn 20,1-2.11-18",
|
||||
"2 de noviembre": "Jn 11,21-44",
|
||||
"DOMINGO IV DE ADVIENTO (C)": "Lc 1,39-45",
|
||||
"Sábado de la 7ª semana (Mc 10 13-16)": "Mc 10,13-16",
|
||||
"8 de diciembre": "Lc 1,26-38",
|
||||
"1 de noviembre": "Mt 5,1-12a",
|
||||
"DOMINGO DE RAMOS (A)": "Mt 26,14-27,66",
|
||||
"DOMINGO DE RAMOS (B)": "Mc 14,1-15,47",
|
||||
"DOMINGO DE RAMOS (C)": "Lc 22,14-23,56",
|
||||
"VIERNES SANTO": "Jn 18,1-19,42",
|
||||
"DOMINGO IV TIEMPO ORDINARIO (A)": "Mt 5,1-12a",
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +66,7 @@ def new_entry(title: str, kind: str) -> dict[str, object]:
|
||||
"gospel": "",
|
||||
"motto": "",
|
||||
"paragraphs": [],
|
||||
"editorial_notes": [],
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +128,9 @@ def parse(source: Path) -> list[dict[str, object]]:
|
||||
elif role == MOTTO:
|
||||
current["motto"] = value
|
||||
elif role == PARAGRAPH:
|
||||
if not current["gospel"] and not current["motto"] and value.startswith("Si toca alguna semana anterior"):
|
||||
current["editorial_notes"].append(value)
|
||||
continue
|
||||
# One source inconsistency (Easter VI, cycle A) styles the Gospel as
|
||||
# a normal paragraph. Before the motto, that position is unambiguous.
|
||||
if not current["gospel"] and not current["motto"]:
|
||||
@@ -127,7 +140,7 @@ def parse(source: Path) -> list[dict[str, object]]:
|
||||
|
||||
finish()
|
||||
for entry in entries:
|
||||
if not entry["citation"] and entry["title"] in MANUAL_CITATIONS:
|
||||
if entry["title"] in MANUAL_CITATIONS:
|
||||
entry["citation"] = MANUAL_CITATIONS[entry["title"]]
|
||||
return entries
|
||||
|
||||
|
||||
Reference in New Issue
Block a user