trying to fix git hooks and also sending some of the updates

This commit is contained in:
ccl 2023-06-12 20:49:06 +02:00
parent 5a90db8b0c
commit 3157234894
3 changed files with 10 additions and 0 deletions

View File

@ -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:

View File

@ -5,9 +5,11 @@
<title>{{ title }} - (Generator: LogBot)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Refresh" content="300">
</head>
<body>
<h1>{{ title }}</h1>
<p> {{ description }} </p>
(Follow this log: <a href="./feed.rss.xml">RSS</a>)
<div id="container">
{% for num in sorted_numbering | reverse %}

View File

@ -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