mirror of
https://git.pumpin.online/funkpower/typikon.git
synced 2026-10-22 18:57:13 +00:00
Nine Sundays went unnamed in every jurisdiction. Three were missing from the movable cycle outright: the Paralytic, the Samaritan Woman and the Blind Man, so the fourth, fifth and sixth Sundays of Pascha reported only the saint of the fixed date. Six more are reckoned from a fixed feast rather than from Pascha — before and after the Exaltation, the Forefathers, before and after the Nativity, before and after the Theophany — and were not modelled at all. The three Pentecostarion Sundays rank with Thomas Sunday and the Myrrh-bearing Women, so a vigil-rank saint still keeps the day and the Sunday is commemorated on it. The six fixed-cycle ones never name a day: they are found in ecclesiastical space, so the old calendar and the new get them on the right morning, and they join the commemorations. Where a short window holds no Sunday the Typikon says what to do and this follows it; where the books disagree, the day goes unmarked rather than carrying an answer this calendar cannot defend. `week` says where a day falls in the count from Pentecost, which is how the books head the long ordinary stretch. It runs on across the new year and stops at the Triodion, whose Sundays have names instead of numbers. `--every-day` gives ics an event for every day, ferias included. The default still thins the calendar, which is right for a subscription and wrong for a reader who wants the saint of each morning; and the description now leads with the commemorations rather than burying them under the church date. Checked against 1.1.2 over every jurisdiction from 2015 to 2035: rank, feast and title move on the three new Sundays and nowhere else. No fast, obligation, binding or season changes on any day.
36 lines
1.5 KiB
Python
36 lines
1.5 KiB
Python
"""The command line's answer, which every other surface is measured against."""
|
|
import json
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
FIELDS = [
|
|
"date", "weekday", "jurisdiction", "calendar", "churchDate", "season",
|
|
"cycle", "week", "feast", "rank", "sign", "tradition", "title", "commemorations",
|
|
"fast", "fastLabel", "emoji", "reason", "obligation", "binds", "pascha",
|
|
"daysToPascha", "julianOffset",
|
|
]
|
|
|
|
cli, probes_path, out_path = sys.argv[1:4]
|
|
|
|
# Neither a config file nor a fetched menaion may reach any surface, or the
|
|
# comparison measures the machine rather than the code. The caller has already
|
|
# pointed these at empty directories; this only refuses to run without them,
|
|
# because an oracle that quietly read the developer's own jurisdiction would
|
|
# make every surface agree about the wrong thing.
|
|
env = dict(os.environ)
|
|
for var in ("XDG_CONFIG_HOME", "XDG_DATA_HOME"):
|
|
if not env.get(var):
|
|
sys.exit(f"{var} must be set to an empty directory before reckoning the oracle")
|
|
|
|
out = {}
|
|
for date, jurisdiction, typikon in json.load(open(probes_path)):
|
|
args = [cli, "--date", date, "--jurisdiction", jurisdiction, "--json",
|
|
"--typikon" if typikon else "--no-typikon"]
|
|
day = json.loads(subprocess.run(args, capture_output=True, text=True,
|
|
env=env, check=True).stdout)
|
|
out[f"{date}|{jurisdiction}|{int(typikon)}"] = {k: day[k] for k in FIELDS}
|
|
|
|
json.dump(out, open(out_path, "w"), ensure_ascii=False)
|
|
print(f"oracle: {len(out)} probes, {len(FIELDS)} fields")
|