Add rss for entries

will fix #1000
This commit is contained in:
Jeremy
2015-03-28 14:27:45 +01:00
parent f98a2a0fc3
commit 0c83fd5994
13 changed files with 510 additions and 61 deletions

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>wallabag — {{type}} feed</title>
<link>{{ url('unread') }}</link>
<pubDate>{{ "now"|date('D, d M Y H:i:s') }}</pubDate>
<generator>wallabag</generator>
<description>wallabag {{type}} elements</description>
{% for entry in entries %}
<item>
<title><![CDATA[{{ entry.title }}]]></title>
<source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
<link>{{ url('view', { 'id': entry.id }) }}</link>
<guid>{{ url('view', { 'id': entry.id }) }}</guid>
<pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate>
<description>
<![CDATA[
{%- if entry.content| readingTime > 0 %}
{% trans %}estimated reading time :{% endtrans %} {{ entry.content| readingTime }} min
{% else -%}
{% trans %}estimated reading time :{% endtrans %} &lt; 1 min
{% endif -%}
{{ entry.content -}}
]]>
</description>
</item>
{% endfor %}
</channel>
</rss>