diff --git a/LogBot/logbot.py b/LogBot/logbot.py index 421e0df..5e3b3a6 100644 --- a/LogBot/logbot.py +++ b/LogBot/logbot.py @@ -118,6 +118,7 @@ class Logbot(Bot): with open(log_path, "w") as out: html = template.render( title=self.db[message.room]["title"], + # description = self.db[message.room]["description"], db=self.db[message.room]["messages"], sorted_numbering=[str(num) for num in sorted([int(num) for num in self.db[message.room]["messages"].keys()])] ) @@ -291,6 +292,12 @@ class Logbot(Bot): self.db[message.room]["title"] = title reply = f"The title of the log is changed to: { title }" + # # Trying to make a function for the room to have a description + # elif "@description" in message.text: + # match = re.findall("@description .*", message.content)[0] + # description = re.findall(r'"(.*?)"', message.text) + # reply = description + # Response to @folder # https://git.vvvvvvaria.org/varia/bots/issues/5 elif "@folder" in message.text: diff --git a/LogBot/template.html b/LogBot/template.html index 74d983b..1062385 100644 --- a/LogBot/template.html +++ b/LogBot/template.html @@ -5,9 +5,11 @@ {{ title }} - (Generator: LogBot) +

{{ title }}

+

{{ description }}

(Follow this log: RSS)
{% for num in sorted_numbering | reverse %} diff --git a/requirements.txt b/requirements.txt index 633e0f2..c98e48e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,3 +19,4 @@ slixmpp==1.6.0 typing-extensions==3.7.4.3 yarl==1.6.3 pytz==2021.3 +Pillow==9.5.0