Files
Warhammer_DLP_Helper/version-python/tools/plan_summary.py
T
Ben_Kosytorz 271fb3bf68 chore: start transition layout — python into version-python/, scaffold version-rust/
- git mv of all existing files into version-python/ (history preserved)
- version-rust/: minimal cargo scaffold (edition 2024), no deps yet
- root AGENTS.md documents the transition rules and artifact/schema contract
- main is untouched; the python layout there stays as-is
2026-10-09 13:18:31 +02:00

23 lines
824 B
Python

#!/usr/bin/env python3
"""Summarize a sorter plan JSON: match kinds, top targets, oddities."""
import json
import sys
from collections import Counter
from pathlib import Path
plan = json.loads(Path(sys.argv[1]).read_text())
print(f"files: {len(plan)}")
print("kinds:", Counter(p["kind"] for p in plan))
print("actions:", Counter(p.get("action", "?") for p in plan))
# system breakdown
print("systems:", Counter(p["system"] for p in plan).most_common(10))
# top-level targets
roots = Counter(str(Path(p["target"]).relative_to(
Path(p["target"]).parents[3])) if len(Path(p["target"]).parents) > 3
else p["target"] for p in plan)
for root, n in roots.most_common(15):
print(f" {n:5d} {root}")
# anything with empty target?
empties = [p for p in plan if not p.get("target")]
print("empty targets:", len(empties))