forked from varia/bots
adding more minor hacky checks for old foldername that include the full path of the muc in the json db
This commit is contained in:
parent
03e662e33b
commit
de5b1d961d
@ -105,6 +105,8 @@ class Logbot(Bot):
|
|||||||
"""Write new log to the file system."""
|
"""Write new log to the file system."""
|
||||||
template = jinja2.Template(open("template.html").read())
|
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")
|
log_path = os.path.join(self.output, folder_name, "index.html")
|
||||||
with open(log_path, "w") as out:
|
with open(log_path, "w") as out:
|
||||||
html = template.render(
|
html = template.render(
|
||||||
@ -117,6 +119,8 @@ class Logbot(Bot):
|
|||||||
def _generate_feed(self, message):
|
def _generate_feed(self, message):
|
||||||
template = jinja2.Template(open("feed.rss").read())
|
template = jinja2.Template(open("feed.rss").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)
|
||||||
feed_path = os.path.join(self.output, folder_name, "feed.rss")
|
feed_path = os.path.join(self.output, folder_name, "feed.rss")
|
||||||
date = datetime.now()
|
date = datetime.now()
|
||||||
with open(feed_path, "w") as out:
|
with open(feed_path, "w") as out:
|
||||||
|
Loading…
Reference in New Issue
Block a user