#!/usr/bin/env python3 """Cross-block the two lessons the worksheet made ambiguous. Both packs talk about perpendicular bisectors and perpendicular diagonals, but about different segments. Without these, "trung trực của AC" (phiếu bài 1) lands on bài 3.3, which proves AC is the bisector of BD — the exact opposite. """ import json import pathlib EXTRA = { "bai-3-3": ["cua ac", "bai 1"], "dinh-doi-canh-doi-duong-cheo": ["vuong goc", "pytago", "chu vi"], "tu-giac-loi": ["hinh nao"], } def main() -> int: path = pathlib.Path(__file__).resolve().parents[1] / "content" / "bai-10-tu-giac" / "pack.json" pack = json.loads(path.read_text(encoding="utf-8")) for scenario in pack["scenarios"]: extra = EXTRA.get(scenario["id"]) if extra: scenario["blockers"] = sorted(set(scenario.get("blockers", []) + extra)) path.write_text(json.dumps(pack, ensure_ascii=False, indent=2) + "\n", encoding="utf-8") print(f"Cập nhật blockers cho {len(EXTRA)} scenario.") return 0 if __name__ == "__main__": raise SystemExit(main())