Files
troupe-standup/wizard-work/quill/verify_standup_draft.py
T

22 lines
447 B
Python
Executable File

import sys, os
path = sys.argv[1]
if not os.path.exists(path):
print("MISSING")
sys.exit(1)
with open(path, "r", encoding="utf-8") as f:
text = f.read()
if len(text.strip()) < 40:
print("TOO_SHORT")
sys.exit(2)
if "## Lane: Draft" not in text:
print("NO_LANE")
sys.exit(3)
if "VERDICT:" not in text:
print("NO_VERDICT")
sys.exit(4)
if "—" in text:
print("EM_DASH")
sys.exit(5)
print("OK")
sys.exit(0)