Skip to content

Commit b1db931

Browse files
committed
Minor improvements to sc2parse usability.
1 parent 524d9c7 commit b1db931

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sc2reader/scripts/sc2parse.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def main():
4141
if not args.one_each or not already_did:
4242
replay = sc2reader.load_replay(path, debug=True, load_level=1)
4343
if not args.one_each or replay.is_ladder:
44-
replay = sc2reader.load_replay(path, debug=True, verbose=True)
44+
replay = sc2reader.load_replay(path, debug=True)
4545
except sc2reader.exceptions.ReadError as e:
4646
print
4747
print path
@@ -56,13 +56,15 @@ def main():
5656
print
5757
print path
5858
try:
59-
replay = sc2reader.load_replay(path, debug=True, load_level=1)
59+
replay = sc2reader.load_replay(path, debug=True, load_level=2)
6060
print '{build} - {real_type} on {map_name} - Played {start_time}'.format(**replay.__dict__)
6161
print '[ERROR]', e.message
6262
for pid, attributes in replay.attributes.items():
6363
print pid, attributes
6464
for pid, info in enumerate(replay.raw_data['replay.details'].players):
6565
print pid, info
66+
for message in replay.raw_data['replay.message.events'].messages:
67+
print message.pid, message.text
6668
print replay.raw_data['replay.initData'].player_names
6769
traceback.print_exc()
6870
print

0 commit comments

Comments
 (0)