parent
d8f98afa55
commit
7bec6fe40e
@ -1,21 +0,0 @@ |
|||||||
import sys |
|
||||||
import re |
|
||||||
import json |
|
||||||
from datetime import datetime |
|
||||||
|
|
||||||
err_re = re.compile("(?P<file>.*?):(?P<line>[0-9]+):(?P<col>[0-9]+): (?P<type>.*?): (?P<message>.*)\n") |
|
||||||
|
|
||||||
stats = []; |
|
||||||
|
|
||||||
for line in sys.stdin: |
|
||||||
found = err_re.fullmatch(line) |
|
||||||
print(line, end="") |
|
||||||
|
|
||||||
if found: |
|
||||||
stats.append(found.groupdict()) |
|
||||||
print("FOUND", found.groupdict()) |
|
||||||
|
|
||||||
with open("stats.json", "a+") as out: |
|
||||||
out.write(json.dumps({"date": datetime.now().isoformat(), |
|
||||||
"messages": stats})); |
|
||||||
out.write("\n") |
|
Loading…
Reference in new issue