diff --git a/templates/schedule/web_schedule_template.html b/templates/schedule/web_schedule_template.html deleted file mode 100644 index 2a058c1..0000000 --- a/templates/schedule/web_schedule_template.html +++ /dev/null @@ -1,41 +0,0 @@ - - -{% for d in days %} -

{{ d.name }}

- -{% endfor %} - - diff --git a/zosia_print.py b/zosia_print.py index ecfaebf..e8f1afa 100644 --- a/zosia_print.py +++ b/zosia_print.py @@ -143,6 +143,11 @@ def has_lecture(events: List[Dict[str, Any]]) -> bool: return schedule +def export_schedule_to_json(schedule: List[Dict[str, Any]]) -> None: + with open(f"{TARGET_DIR}/web_schedule.json", "w", encoding="utf-8") as file: + file.write(json.dumps(schedule)) + + def get_options(path: str) -> List[str]: return [f.rstrip(".yaml") for f in os.listdir(path)] @@ -301,9 +306,7 @@ def main() -> None: }) # Web schedule for zosia-site - render_document("schedule/web_schedule_template.html", { - "days": schedule - }, "web_schedule", True) + export_schedule_to_json(schedule) if render_all or args.render.startswith('identifier'): # Identifier