32 lines
986 B
Python
32 lines
986 B
Python
import re
|
|
SRC = "/root/troupe-standup/WORK-QUEUE.md"
|
|
text = open(SRC, encoding="utf-8").read().splitlines()
|
|
Q = re.compile(r"^## Q(\d+)\s?(.*)$")
|
|
TOP = re.compile(r"^## ")
|
|
# Simulate the extractor, tracking which Q got a status.
|
|
current_q = None
|
|
status = None
|
|
no_status = []
|
|
for raw in text:
|
|
line = raw.rstrip()
|
|
m = Q.match(line)
|
|
if m:
|
|
if current_q is not None and status is None:
|
|
no_status.append(current_q)
|
|
current_q = int(m.group(1))
|
|
status = None
|
|
continue
|
|
if TOP.match(line):
|
|
if current_q is not None and status is None:
|
|
no_status.append(current_q)
|
|
current_q = None
|
|
status = None
|
|
continue
|
|
if current_q is not None and status is None:
|
|
m2 = re.match(r"^\*\*\s*Status\s*:(.*)$", line)
|
|
if m2:
|
|
status = m2.group(1).strip()
|
|
if current_q is not None and status is None:
|
|
no_status.append(current_q)
|
|
print("Q numbers with NO status line:", no_status)
|