Browse Source

harcoding the feed url, not the log url

master
manetta 3 years ago
parent
commit
d8892cef99
  1. 5
      LogBot/logbot.py
  2. 2
      LogBot/template.rss

5
LogBot/logbot.py

@ -112,9 +112,8 @@ class Logbot(Bot):
template = jinja2.Template(open("template.rss").read()) # self.feedtemplate would be useful to have in the conf
with open(feed_path, "w") as out:
feed = template.render(
log_path=os.path.join(
"https://vvvvvvaria.org/logs/", folder_name, "index.html"
), # hardcoding the url now, self.baseurl would be helpful to have in the conf
log_path=os.path.join("https://vvvvvvaria.org/logs/", folder_name, "index.html"), # hardcoding the url now, self.baseurl would be helpful to have in the conf
feed_path=os.path.join("https://vvvvvvaria.org/logs/", folder_name, "feed.rss"), # hardcoding the url again
title=self.db[message.room]["title"],
db=self.db[message.room],
date=date.strftime("%a, %d %b %Y %H:%M:%S +0100") # timezone is hardcoded now

2
LogBot/template.rss

@ -5,7 +5,7 @@
<link>{{ log_path }}</link>
<description>Collective log writing using XMPP chat groups and LogBot.</description>
<lastBuildDate>{{ date }}</lastBuildDate>
<atom:link href="{{ log_path }}" rel="self" type="application/rss+xml" />
<atom:link href="{{ feed_path }}" rel="self" type="application/rss+xml" />
{% for x, post in db["messages"].items() %}
<item>
<title>{{ title }}</title>

Loading…
Cancel
Save