aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-03-28 14:27:45 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-03-31 22:47:43 +0200
commit0c83fd5994861efa728097dd151c994796c39ae1 (patch)
tree925520c0bb62d2b9ba7270020fc2ebcebb520f8c /src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig
parentf98a2a0fc3ae8a5955bb811f083c3d2535f96791 (diff)
downloadwallabag-0c83fd5994861efa728097dd151c994796c39ae1.tar.gz
wallabag-0c83fd5994861efa728097dd151c994796c39ae1.tar.zst
wallabag-0c83fd5994861efa728097dd151c994796c39ae1.zip
Add rss for entries
will fix #1000
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig
new file mode 100644
index 00000000..6eebc80d
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/Entry/entries.xml.twig
@@ -0,0 +1,34 @@
1<?xml version="1.0" encoding="utf-8"?>
2<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/">
3 <channel>
4 <title>wallabag — {{type}} feed</title>
5 <link>{{ url('unread') }}</link>
6 <pubDate>{{ "now"|date('D, d M Y H:i:s') }}</pubDate>
7 <generator>wallabag</generator>
8 <description>wallabag {{type}} elements</description>
9
10 {% for entry in entries %}
11
12 <item>
13 <title><![CDATA[{{ entry.title }}]]></title>
14 <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
15 <link>{{ url('view', { 'id': entry.id }) }}</link>
16 <guid>{{ url('view', { 'id': entry.id }) }}</guid>
17 <pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate>
18 <description>
19 <![CDATA[
20 {%- if entry.content| readingTime > 0 %}
21 {% trans %}estimated reading time :{% endtrans %} {{ entry.content| readingTime }} min
22 {% else -%}
23 {% trans %}estimated reading time :{% endtrans %} &lt; 1 min
24 {% endif -%}
25
26 {{ entry.content -}}
27 ]]>
28 </description>
29 </item>
30
31 {% endfor %}
32
33 </channel>
34</rss>