Browse Source

updating the feed.rss template, hardcoding the link

master
manetta 4 years ago
parent
commit
555d37bc91
  1. 2
      LogBot/feed.rss
  2. 2
      LogBot/logbot.py

2
LogBot/feed.rss

@ -7,7 +7,7 @@
<lastBuildDate>{{ date }}</lastBuildDate> <lastBuildDate>{{ date }}</lastBuildDate>
{% for x, post in db["messages"].items() %} {% for x, post in db["messages"].items() %}
<item> <item>
<title></title> <title>{{ title }}</title>
<link>{{ log_path }}#{{ x }}</link> <link>{{ log_path }}#{{ x }}</link>
<description>{{ post }}</description> <description>{{ post }}</description>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogBot</dc:creator> <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogBot</dc:creator>

2
LogBot/logbot.py

@ -101,7 +101,7 @@ class Logbot(Bot):
"""Write new log to the file system.""" """Write new log to the file system."""
template = jinja2.Template(open("template.html").read()) template = jinja2.Template(open("template.html").read())
room_name = self._parse_room_name(message.room) room_name = self._parse_room_name(message.room)
log_path = os.path.join(self.output, room_name, "index.html") log_path = os.path.join("https://vvvvvvaria.org/logs/", room_name, "index.html") # hard-coding the URL for now
with open(log_path, "w") as out: with open(log_path, "w") as out:
html = template.render( html = template.render(
title=self.db[message.room]["title"], title=self.db[message.room]["title"],

Loading…
Cancel
Save