From 5cc8f5d893c82acd9a2d2eba72973e38ab3100a1 Mon Sep 17 00:00:00 2001 From: Gabor Guzmics Date: Fri, 14 Apr 2017 18:49:21 +0200 Subject: [PATCH] ??? --- logs/logstream.py | 2 +- logs/session.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/logs/logstream.py b/logs/logstream.py index 3237418..bd1a314 100644 --- a/logs/logstream.py +++ b/logs/logstream.py @@ -141,4 +141,4 @@ class LogStream(object): def resolve(self, gd): # gd is a dict. # try to find a class that is responsible for this log. - return gd \ No newline at end of file + return gd diff --git a/logs/session.py b/logs/session.py index 09f2382..3177f6a 100644 --- a/logs/session.py +++ b/logs/session.py @@ -15,7 +15,8 @@ class LogSession(object): class LogFileSession(LogSession): """ The Log-File-Session is supposed to save one directory of logs. - It can parse its logs, and build up its internal structure into Battle Instances etc. + It can parse its logs, and should become able to build up its internal + structure into Battle Instances etc. """ VALID_FILES = ['combat.log', 'game.log', 'chat.log' ] # extend this to other logs. @@ -147,6 +148,15 @@ class LogFileSession(LogSession): return found class LogSessionCollector(object): + """ + finds sessions in a directory, a.k.a. you load the log directories + of SC into sessions. + + - find_sessions: only find and instantiate sessions. + - collect: validates each found session and returns them as list. + - collect_unique: instead of a list, a dict is returned, where each + session can be accessed via its idstr. does not parse/validate sessions. + """ def __init__(self, directory): self.initial_directory = directory self.sessions = []