-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-babostats.py
28 lines (25 loc) · 926 Bytes
/
1-babostats.py
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
with open("console.log") as f:
content = f.read().splitlines()
playerFile = open('playerFile.txt', 'w')
killFile = open('killFile.txt', 'w')
playerKilledDict = {}
playerWeaponDict = {}
for item in content:
if item.find("Player")==0:
item = item.replace("Player", "Player:")
playerFile.write(item)
playerFile.write("\n")
else:
if item.find("{") == -1:
if item.find("}") == -1:
if item.find("R ") != 0:
if item.find("----->") != -1:
item = item.replace("\"", ".")
item = item.replace("'", ".")
item = item.replace(" -----", ";")
item = item.replace("-----> ", ";")
killFile.write(item)
killFile.write("\n")
playerFile.close()
killFile.close()
f.close()