bots/LogBot/template.rss

39 lines
1.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ title }}</title>
<link>{{ log_path }}</link>
<description>Collective log writing using XMPP chat groups and LogBot.</description>
<lastBuildDate>{{ date }}</lastBuildDate>
<atom:link href="{{ feed_path }}" rel="self" type="application/rss+xml" />
{% for x, post in db["messages"].items() %}
<item>
<title>{{ title }} #{{ x }}</title>
<link>{{ log_path }}#{{ x }}</link>
<guid>{{ log_path }}#{{ x }}</guid>
<description>
{% if 'media' in post %}
2022-02-18 17:11:12 +01:00
<p>
{% if 'image' in post.media.type %}
2022-02-18 17:20:53 +01:00
<img src="{{ log_folder_url }}/{{ post.media.path }}" loading="lazy"></img>
{% elif 'application' in post.media.type %}
2022-02-18 17:20:53 +01:00
<iframe src="{{ log_folder_url }}/{{ post.media.path }}" loading="lazy"></iframe>
{% elif 'audio' in post.media.type %}
2022-02-18 17:20:53 +01:00
<audio src="{{ log_folder_url }}/{{ post.media.path }}" preload="none"></audio>
{% elif 'video' in post.media.type %}
2022-02-18 17:20:53 +01:00
<video src="{{ log_folder_url }}/{{ post.media.path }}" preload="none"></video>
{% else %}
The media file is not added to the RSS feed :(.
{% endif %}
</p>
{% else %}
2022-02-18 17:11:12 +01:00
<p>{{ post.post }}</p>
{% endif %}
</description>
2022-02-18 17:20:53 +01:00
{% if 'media' in post %}<enclosure url="{{ log_folder_url }}/{{ post.media.path }}" length="{{ post.media.size }}" type="{{ post.media.type }}" />{% endif %}
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">LogBot</dc:creator>
<pubDate>{{ post.date }}</pubDate>
</item>
{% endfor %}
</channel>
</rss>