From b9000d554a40e938f0a8cd16403676d59c01b674 Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 20 Dec 2008 23:20:08 +0000 Subject: [PATCH] More django templates git-svn-id: svn+ssh://svn.debian.org/svn/planet-debian/trunk@1059 c2f067bf-98e0-425f-9c98-e76020cfa380 --- config/config.ini | 2 +- config/config.ini.tmpl | 2 +- templates/atom.xml.tmpl | 62 ------------------- .../{foafroll.xml.tmpl => foafroll.xml.dj} | 18 +++--- templates/opml.xml.dj | 14 +++++ templates/opml.xml.tmpl | 15 ----- templates/rss10.xml.dj | 30 +++++++++ templates/rss10.xml.tmpl | 37 ----------- templates/rss20.xml.dj | 20 ++++++ templates/rss20.xml.tmpl | 30 --------- 10 files changed, 75 insertions(+), 155 deletions(-) delete mode 100644 templates/atom.xml.tmpl rename templates/{foafroll.xml.tmpl => foafroll.xml.dj} (50%) create mode 100644 templates/opml.xml.dj delete mode 100644 templates/opml.xml.tmpl create mode 100644 templates/rss10.xml.dj delete mode 100644 templates/rss10.xml.tmpl create mode 100644 templates/rss20.xml.dj delete mode 100644 templates/rss20.xml.tmpl diff --git a/config/config.ini b/config/config.ini index af91b36..01a3324 100644 --- a/config/config.ini +++ b/config/config.ini @@ -43,7 +43,7 @@ log_level = DEBUG spider_threads = 15 # template_files: Space-separated list of output template files -template_files = templates/index.html.dj templates/atom.xml.dj templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl +template_files = templates/index.html.dj templates/atom.xml.dj templates/rss20.xml.dj templates/rss10.xml.dj templates/opml.xml.dj templates/foafroll.xml.dj # The following provide defaults for each template: # items_per_page: How many items to put on each page diff --git a/config/config.ini.tmpl b/config/config.ini.tmpl index 54d836d..416ccf2 100644 --- a/config/config.ini.tmpl +++ b/config/config.ini.tmpl @@ -77,7 +77,7 @@ log_level = DEBUG spider_threads = 15 # template_files: Space-separated list of output template files -template_files = templates/index.html.dj templates/atom.xml.dj templates/rss20.xml.tmpl templates/rss10.xml.tmpl templates/opml.xml.tmpl templates/foafroll.xml.tmpl +template_files = templates/index.html.dj templates/atom.xml.dj templates/rss20.xml.dj templates/rss10.xml.dj templates/opml.xml.dj templates/foafroll.xml.dj # The following provide defaults for each template: # items_per_page: How many items to put on each page diff --git a/templates/atom.xml.tmpl b/templates/atom.xml.tmpl deleted file mode 100644 index 4448459..0000000 --- a/templates/atom.xml.tmpl +++ /dev/null @@ -1,62 +0,0 @@ - - - - <TMPL_VAR name> - "/> - "/> - - - - - - xml:lang=""> - xml:lang="<TMPL_VAR title_language>"</TMPL_IF>><TMPL_VAR title ESCAPE="HTML"> - "/> - - - xml:lang=""> - xml:lang=""> - - - - - - - - - - - - - - - - - - - - - <TMPL_VAR channel_title ESCAPE="HTML"> - - <TMPL_VAR channel_name ESCAPE="HTML"> - - - - - "/> - - - - - - - - - - - - - - - - diff --git a/templates/foafroll.xml.tmpl b/templates/foafroll.xml.dj similarity index 50% rename from templates/foafroll.xml.tmpl rename to templates/foafroll.xml.dj index a78e3e8..211ba37 100644 --- a/templates/foafroll.xml.tmpl +++ b/templates/foafroll.xml.dj @@ -7,25 +7,25 @@ xmlns:dc="http://purl.org/dc/elements/1.1/" > - - - " /> + {{ name }} + {{ link }} + - +{% for channel in Channels %} - + {{ channel.name }} - "> - + + {{ channel.title_plain }} - " /> + - +{% endfor %} diff --git a/templates/opml.xml.dj b/templates/opml.xml.dj new file mode 100644 index 0000000..2cc3d38 --- /dev/null +++ b/templates/opml.xml.dj @@ -0,0 +1,14 @@ + + + + {{ name }} + {{ date_822 }} + {{ owner_name }} + {{ owner_email }} + + + +{% for channel in Channels %} + {% endfor %} + + diff --git a/templates/opml.xml.tmpl b/templates/opml.xml.tmpl deleted file mode 100644 index b56ee5f..0000000 --- a/templates/opml.xml.tmpl +++ /dev/null @@ -1,15 +0,0 @@ - - - - <TMPL_VAR name ESCAPE="HTML"> - - - - - - - - " xmlUrl="" title="" htmlUrl="" /> - - - diff --git a/templates/rss10.xml.dj b/templates/rss10.xml.dj new file mode 100644 index 0000000..99726ea --- /dev/null +++ b/templates/rss10.xml.dj @@ -0,0 +1,30 @@ + + + + {{ name }} + {{ link }} + {{ name }} - {{ link }} + + + {% for item in Items %} + {% endfor %} + + + + +{% for item in Items %} + + {{ item.channel_name }}>{% if item.title %}: {{ item.title_plain }}{% endif %} + {{ item.link }} + {% if item.content %} {{ item.content }} {% endif %} + {{ item.date_iso }} + {% firstof item.author_name item.channel_author_name item.channel_name %} + {% endfor %} + + diff --git a/templates/rss10.xml.tmpl b/templates/rss10.xml.tmpl deleted file mode 100644 index f4f01f3..0000000 --- a/templates/rss10.xml.tmpl +++ /dev/null @@ -1,37 +0,0 @@ - - -"> - <TMPL_VAR name ESCAPE="HTML"> - - - - - - - - " /> - - - - - - -"> - <TMPL_VAR channel_name ESCAPE="HTML"><TMPL_IF title>: <TMPL_VAR title_plain ESCAPE="HTML"></TMPL_IF> - - - - - - - - - - - - diff --git a/templates/rss20.xml.dj b/templates/rss20.xml.dj new file mode 100644 index 0000000..743f2eb --- /dev/null +++ b/templates/rss20.xml.dj @@ -0,0 +1,20 @@ + + + + + {{ name }} + {{ link }} + en + {{ name }} - {{ link }} + +{% for item in Items %} + + {{ item.channel_name }}>{% if item.title %}: {{ item.title_plain }}{% endif %} + {{ item.id }} + {{ item.link }} + {% if item.content %} {% if item.channel_face %} <img src="http://planet.debian.org/heads/{{ item.channel_face }}" width="{{ item.channel_facewidth }}" height="{{ item.channel_faceheight }}" alt="" align="right" style="float: right;"> {% endif %} {{ item.content }} {% endif %} + {{ item.date_822 }} +{% if item.author_email %} {% if item.author_name %} {{ item.author_email }} ({{ item.author_name }}) {% else %} {{ item.author_email }} {% endif %} {% endif %} + {% endfor %} + + diff --git a/templates/rss20.xml.tmpl b/templates/rss20.xml.tmpl deleted file mode 100644 index 3f3abcf..0000000 --- a/templates/rss20.xml.tmpl +++ /dev/null @@ -1,30 +0,0 @@ - - - - - <TMPL_VAR name> - - en - - - - - - <TMPL_VAR channel_name ESCAPE="HTML"><TMPL_IF title>: <TMPL_VAR title_plain ESCAPE="HTML"></TMPL_IF> - - - - <img src="http://planet.debian.org/heads/" width="" height="" alt="" align="right" style="float: right;"> - - - - - () - - - - - - - - - -- 2.39.2