Skip to content

Commit 7256cb8

Browse files
committed
todo tracker
1 parent 8e3576e commit 7256cb8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

count-todos.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import csv
2+
import sys
3+
from pathlib import Path
4+
5+
MARKERS = ["TODO", "RITA", "DAVID", "SEBASTIAN", "JAN", "CSANAD"]
6+
7+
out = csv.writer(sys.stdout)
8+
out.writerow(["Chapter"] + MARKERS)
9+
for path in sorted(Path(".").rglob("chapter*.asciidoc")):
10+
chapter_name = str(path).replace(".asciidoc", "")
11+
todos = [
12+
path.read_text().count(thing)
13+
for thing in MARKERS
14+
]
15+
out.writerow([chapter_name] + todos)

0 commit comments

Comments
 (0)