diff options
author | ng0 <ng0@n0.is> | 2019-02-28 10:47:33 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-02-28 10:47:33 +0000 |
commit | ad6f053c18b9c8396182ce843d178c97f4fa49af (patch) | |
tree | c8e4f2a415784bf8673881330a0c0e8f1218ab24 | |
parent | 2466c4a84fc936fa439f9b59a5673059e58405fc (diff) | |
download | www-ad6f053c18b9c8396182ce843d178c97f4fa49af.tar.gz www-ad6f053c18b9c8396182ce843d178c97f4fa49af.zip |
Add drafty, unfinished, unused files for rss
-rw-r--r-- | templates/feed-atom.py | 4 | ||||
-rw-r--r-- | templates/feed.atom.j2 | 12 | ||||
-rw-r--r-- | templates/feed.xml | 15 |
3 files changed, 31 insertions, 0 deletions
diff --git a/templates/feed-atom.py b/templates/feed-atom.py new file mode 100644 index 00000000..37a596c4 --- /dev/null +++ b/templates/feed-atom.py | |||
@@ -0,0 +1,4 @@ | |||
1 | import jinja2 | ||
2 | |||
3 | env = jinja2.Environment(loader=jinja2.FileSystemLoader(".")) | ||
4 | print(env.get_template("feed.rss.j2").render(items=get_list_of_items())) | ||
diff --git a/templates/feed.atom.j2 b/templates/feed.atom.j2 new file mode 100644 index 00000000..0a201ff2 --- /dev/null +++ b/templates/feed.atom.j2 | |||
@@ -0,0 +1,12 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <feed xmlns="http://www.w3.org/2005/Atom"> | ||
3 | <author>Author's name</author</author> | ||
4 | <title>Feed title</title> | ||
5 | {% for item in items %} | ||
6 | <entry> | ||
7 | <title>{{ item[0] }}</title> | ||
8 | <link href="{{ item[1] }}" /> | ||
9 | <content type="html">{{ item[2] }}</content> | ||
10 | </entry> | ||
11 | {% endfor %} | ||
12 | </feed> | ||
diff --git a/templates/feed.xml b/templates/feed.xml new file mode 100644 index 00000000..e509fd10 --- /dev/null +++ b/templates/feed.xml | |||
@@ -0,0 +1,15 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <rss version="2.0"> | ||
3 | <channel> | ||
4 | <title>{{ title }}</title> | ||
5 | <link>{{ site_url }}</link> | ||
6 | <description>gnunet.org feed</description> | ||
7 | {% for item in items %} | ||
8 | <item> | ||
9 | <title>{{ item[0] }}</title> | ||
10 | <link href="{{ item[1] }}" /> | ||
11 | <content type="html">{{ item[2] }}</content> | ||
12 | </item> | ||
13 | {% endfor %} | ||
14 | </channel> | ||
15 | </rss> | ||