|
|
@ -104,7 +104,9 @@ class Logbot(Bot): |
|
|
|
def _write_log(self, message): |
|
|
|
"""Write new log to the file system.""" |
|
|
|
template = jinja2.Template(open("template.html").read()) |
|
|
|
folder_name = self.db[message.room]["folder"] |
|
|
|
folder_name = self.db[message.room]["folder"] |
|
|
|
if "@" in folder_name: # hacky |
|
|
|
folder_name = self._parse_room_name(folder_name) |
|
|
|
log_path = os.path.join(self.output, folder_name, "index.html") |
|
|
|
with open(log_path, "w") as out: |
|
|
|
html = template.render( |
|
|
@ -117,6 +119,8 @@ class Logbot(Bot): |
|
|
|
def _generate_feed(self, message): |
|
|
|
template = jinja2.Template(open("feed.rss").read()) |
|
|
|
folder_name = self.db[message.room]["folder"] |
|
|
|
if "@" in folder_name: # hacky |
|
|
|
folder_name = self._parse_room_name(folder_name) |
|
|
|
feed_path = os.path.join(self.output, folder_name, "feed.rss") |
|
|
|
date = datetime.now() |
|
|
|
with open(feed_path, "w") as out: |
|
|
|