diff options
author | Richard Darst <rkd@zgib.net> | 2009-08-16 02:25:59 (GMT) |
---|---|---|
committer | Richard Darst <rkd@zgib.net> | 2009-08-16 02:25:59 (GMT) |
commit | 4f97081a0d6d6fda96b2d6f7c1ddb16c8ed5ff3a (patch) | |
tree | dfdc473c6d4503f18f72cd8ae81cba66caf80a50 /writers.py | |
parent | 4f2700b46897d48628ef11ce63df9e5b25d3ec41 (diff) |
Improve code for realtime updating of log files
- The old code for realtime logfile updating was very messy and hard to
understand. This is better, but still not perfect.
- Updating in realtime still will have issues if the filename changes
during the meeting. This would (right now) be only if you use the
#meetingname command.
- This is not the most efficient in that it rewrites the whole file every
time it updates it. This is for convenience and to keep it from getting
too complicated (but may not be true forever).
- Right now only the .log.txt writer updates at every step, since that one
requires the least computation at each step.
darcs-hash:20090816022559-82ea9-f952ffebd683907ff599f8ae78544dfc5faaa13b.gz
Diffstat (limited to 'writers.py')
-rw-r--r-- | writers.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -75,9 +75,8 @@ def MeetBotVersion(): class _BaseWriter(object): - def __init__(self, M, save_file=None, **kwargs): + def __init__(self, M, **kwargs): self.M = M - self.save_file = save_file def format(self, extension=None): """Override this method to implement the formatting. @@ -134,8 +133,7 @@ class TextLog(_BaseWriter): M = self.M """Write raw text logs.""" return "\n".join(M.lines) - def addline(self, line): - self.save_file(self.format()) + update_realtime = True |