Skip to content

Commit 9b8c1bb

Browse files
committed
feat(new): add job_compassplus/cyr_lat_audit_stats.py
1 parent 73f9548 commit 9b8c1bb

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
4+
__author__ = "ipetrash"
5+
6+
7+
import re
8+
from collections import Counter
9+
from pathlib import Path
10+
11+
# TODO:
12+
file_path: str = r"C:\Users\IPetrash\Desktop\cyr_lat_audit.py-v8.txt"
13+
14+
text = Path(file_path).read_text("utf-8")
15+
items = re.findall("File: '(.+?)'", text)
16+
print(items)
17+
18+
module_counter = Counter()
19+
for item in items:
20+
module_counter.update([item.split("\\\\")[4] + "/" + item.split("\\\\")[5].split(".")[0]])
21+
print(module_counter)
22+
for module, count in module_counter.most_common():
23+
print(f"{module}: {count}")

0 commit comments

Comments
 (0)