forked from Data-Science-2Like/SCOPE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelper_parse_log.py
More file actions
45 lines (28 loc) · 893 Bytes
/
helper_parse_log.py
File metadata and controls
45 lines (28 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
log_file = './tmp2.log'
if __name__ == "__main__":
with open(log_file,'r') as f:
problem_ids = []
good_ids = []
cLine = 0
cID = str()
for l in f:
s = l.split(' ')
if l.startswith('Loaded paper'):
if cLine == 0:
good_ids.append(cID)
else:
problem_ids.append(cID)
cLine = 0
cID = s[2]
elif l.startswith('Overwritting existing string for key') or l.startswith('Entry type online not standard'):
continue
else:
cLine += 1
print("PROBLEM IDS")
print("-" * 20)
for p_id in problem_ids:
print(p_id.strip())
print("GOOD IDS")
print("-" * 20)
for g_id in good_ids:
print(g_id.strip())