Browse Source

matching the RSS build date with w3c standards

master
manetta 3 years ago
parent
commit
6879b73c3b
  1. 18
      LogBot/feed.rss
  2. 2
      LogBot/logbot.py

18
LogBot/feed.rss

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>{{ title }}</title>
<link>{{ log_path }}</link>
<description>Collective log writing using XMPP chat groups and LogBot.</description>
<lastBuildDate>{{ date }}</lastBuildDate>
{% for x, post in db["messages"].items() %}
<item>
<title>{{ title }}</title>
<link>{{ log_path }}#{{ x }}</link>
<description>{{ post }}</description>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogBot</dc:creator>
<pubDate>{{ post.date }}</pubDate>
</item>
{% endfor %}
</channel>
</rss>

2
LogBot/logbot.py

@ -143,7 +143,7 @@ class Logbot(Bot):
), # hard-coding the URL for now
title=self.db[message.room]["title"],
db=self.db[message.room],
date=date.strftime("%A, %d. %B %Y %I:%M%p"),
date=date.strftime("%a, %d %b %Y %H:%M:%S +0100")
)
out.write(feed)
self.log.info(f"writing to: { feed_path }")

Loading…
Cancel
Save