17 lines
750 B
Python
17 lines
750 B
Python
import json
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(r"E:/Wiki/2nd")
|
|
data = json.load(open(ROOT / "20_Meta/ReviewQueue/_index.json", encoding="utf-8"))
|
|
stubs = [e for e in data if e["is_stub"] and not e["is_redirect"] and not e["is_operational"]]
|
|
print(f"STUB COUNT: {len(stubs)}")
|
|
out = ROOT / "_tools" / "stubs_to_augment.json"
|
|
out.write_text(json.dumps(
|
|
[{"path": e["path"], "filename": e["filename"], "folder": e["folder"],
|
|
"body_chars": e["body_chars"], "title": e["title"], "fm_id": e["fm_id"]}
|
|
for e in sorted(stubs, key=lambda x: x["path"])],
|
|
ensure_ascii=False, indent=1), encoding="utf-8")
|
|
print(f"Wrote list to {out}")
|
|
for e in sorted(stubs, key=lambda x: x["path"])[:30]:
|
|
print(f" {e['body_chars']:4d} {e['path']}")
|