-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_demo.py
More file actions
34 lines (24 loc) · 1.08 KB
/
Copy pathrun_demo.py
File metadata and controls
34 lines (24 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from __future__ import annotations
import json
from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parent
SRC = ROOT / "src"
sys.path.insert(0, str(SRC))
from meeting_prep import build_report, load_json, render_markdown # noqa: E402
def main() -> int:
meetings = ROOT / "samples" / "meetings.json"
rules = ROOT / "samples" / "prep_rules.json"
output_dir = ROOT / "outputs"
output_dir.mkdir(parents=True, exist_ok=True)
report = build_report(load_json(meetings), load_json(rules))
report_md = output_dir / "meeting_prep_report.md"
report_json = output_dir / "meeting_prep_report.json"
report_md.write_text(render_markdown(report), encoding="utf-8", newline="\n")
report_json.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n", encoding="utf-8", newline="\n")
print(f"wrote {report_md.relative_to(ROOT)}")
print(f"wrote {report_json.relative_to(ROOT)}")
print("safety: sample-first / no-participant-send / no-calendar-update / confirmation-required")
return 0
if __name__ == "__main__":
raise SystemExit(main())