Beispiel #1
0
 def get_messages(self, start=None):
     if not self.exists:
         return
     with io.open(self.path, encoding='utf-8', errors='replace') as fp:
         for msg in parse_log(fp, start):
             yield msg
Beispiel #2
0
def messages(channel_id, channel, filename):
    with io.open(filename, encoding='utf-8', errors='replace') as fp:
        for msg in parse_log(fp):
            if msg['type'] == 'privmsg':
                print_xml(channel_id, channel, msg)
Beispiel #3
0
 def get_messages(self, start=None):
     if not self.exists:
         return
     with io.open(self.path, encoding='utf-8', errors='replace') as fp:
         for msg in parse_log(fp, start):
             yield msg