Browse Source

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

master
ccl 11 months ago
parent
commit
3157234894
  1. 7
      LogBot/logbot.py
  2. 2
      LogBot/template.html
  3. 1
      requirements.txt

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

2
LogBot/template.html

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

1
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

Loading…
Cancel
Save