]> git.deb.at Git - deb/hackedgotchi.git/commitdiff
More django templates
authorjoerg <joerg@c2f067bf-98e0-425f-9c98-e76020cfa380>
Sat, 20 Dec 2008 23:20:08 +0000 (23:20 +0000)
committerjoerg <joerg@c2f067bf-98e0-425f-9c98-e76020cfa380>
Sat, 20 Dec 2008 23:20:08 +0000 (23:20 +0000)
git-svn-id: svn+ssh://svn.debian.org/svn/planet-debian/trunk@1059 c2f067bf-98e0-425f-9c98-e76020cfa380

config/config.ini
config/config.ini.tmpl
templates/atom.xml.tmpl [deleted file]
templates/foafroll.xml.dj [new file with mode: 0644]
templates/foafroll.xml.tmpl [deleted file]
templates/opml.xml.dj [new file with mode: 0644]
templates/opml.xml.tmpl [deleted file]
templates/rss10.xml.dj [new file with mode: 0644]
templates/rss10.xml.tmpl [deleted file]
templates/rss20.xml.dj [new file with mode: 0644]
templates/rss20.xml.tmpl [deleted file]

index af91b36b3259cdb9061ca6f998eac2d1c79fdef8..01a3324d852864ec63b5c22ea79cead1907abc51 100644 (file)
@@ -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
index 54d836d7c381116405e1d0416f89f02782a7ad45..416ccf2fcb1b9b19d271c9e225d1dcac96f42922 100644 (file)
@@ -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 (file)
index 4448459..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<feed xmlns="http://www.w3.org/2005/Atom">
-
-       <title><TMPL_VAR name></title>
-       <link rel="self" href="<TMPL_VAR feed ESCAPE="HTML">"/>
-       <link href="<TMPL_VAR link ESCAPE="HTML">"/>
-       <id><TMPL_VAR feed ESCAPE="HTML"></id>
-       <updated><TMPL_VAR date_iso></updated>
-       <generator uri="http://www.intertwingly.net/code/venus/"><TMPL_VAR generator ESCAPE="HTML"></generator>
-
-<TMPL_LOOP Items>
-       <entry<TMPL_IF channel_language> xml:lang="<TMPL_VAR channel_language>"</TMPL_IF>>
-               <title type="html"<TMPL_IF title_language> xml:lang="<TMPL_VAR title_language>"</TMPL_IF>><TMPL_VAR title ESCAPE="HTML"></title>
-               <link href="<TMPL_VAR link ESCAPE="HTML">"/>
-               <id><TMPL_VAR id ESCAPE="HTML"></id>
-               <updated><TMPL_VAR date_iso></updated>
-               <summary type="html"<TMPL_IF summary_language> xml:lang="<TMPL_VAR summary_language>"</TMPL_IF>><TMPL_VAR summary ESCAPE="HTML"></summary>
-               <content type="html"<TMPL_IF content_language> xml:lang="<TMPL_VAR content_language>"</TMPL_IF>><TMPL_VAR content ESCAPE="HTML"></content>
-               <author>
-<TMPL_IF author_name>
-                       <name><TMPL_VAR author_name ESCAPE="HTML"></name>
-<TMPL_IF author_email>
-                       <email><TMPL_VAR author_email ESCAPE="HTML"></email>
-</TMPL_IF author_email>
-<TMPL_ELSE>
-<TMPL_IF channel_author_name>
-                       <name><TMPL_VAR channel_author_name ESCAPE="HTML"></name>
-<TMPL_IF channel_author_email>
-                       <email><TMPL_VAR channel_author_email ESCAPE="HTML"></email>
-</TMPL_IF channel_author_email>
-<TMPL_ELSE>
-                       <name><TMPL_VAR channel_name ESCAPE="HTML"></name>
-</TMPL_IF>
-</TMPL_IF>
-                       <uri><TMPL_VAR channel_link ESCAPE="HTML"></uri>
-               </author>
-               <source>
-<TMPL_IF channel_title>
-                       <title type="html"><TMPL_VAR channel_title ESCAPE="HTML"></title>
-<TMPL_ELSE>
-                       <title type="html"><TMPL_VAR channel_name ESCAPE="HTML"></title>
-</TMPL_IF>
-<TMPL_IF channel_subtitle>
-                       <subtitle type="html"><TMPL_VAR channel_subtitle ESCAPE="HTML"></subtitle>
-</TMPL_IF>
-                       <link rel="self" href="<TMPL_VAR channel_url ESCAPE="HTML">"/>
-<TMPL_IF channel_id>
-                       <id><TMPL_VAR channel_id ESCAPE="HTML"></id>
-<TMPL_ELSE>
-                       <id><TMPL_VAR channel_url ESCAPE="HTML"></id>
-</TMPL_IF>
-<TMPL_IF channel_updated_iso>
-                       <updated><TMPL_VAR channel_updated_iso></updated>
-</TMPL_IF>
-<TMPL_IF channel_rights>
-                       <rights type="html"><TMPL_VAR channel_rights ESCAPE="HTML"></rights>
-</TMPL_IF>
-               </source>
-       </entry>
-
-</TMPL_LOOP>
-</feed>
diff --git a/templates/foafroll.xml.dj b/templates/foafroll.xml.dj
new file mode 100644 (file)
index 0000000..211ba37
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<rdf:RDF
+       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+       xmlns:foaf="http://xmlns.com/foaf/0.1/"
+       xmlns:rss="http://purl.org/rss/1.0/"
+       xmlns:dc="http://purl.org/dc/elements/1.1/"
+>
+<foaf:Group>
+       <foaf:name>{{ name }}</foaf:name>
+       <foaf:homepage>{{ link }}</foaf:homepage>
+       <rdfs:seeAlso rdf:resource="{{ url }}" />
+
+{% for channel in Channels %}
+       <foaf:member>
+               <foaf:Agent>
+                       <foaf:name>{{ channel.name }}</foaf:name>
+                       <foaf:weblog>
+                               <foaf:Document rdf:about="{{ channel.link }}">
+                                       <dc:title>{{ channel.title_plain }}</dc:title>
+                                       <rdfs:seeAlso>
+                                               <rss:channel rdf:about="{{ channel.url }}" />
+                                       </rdfs:seeAlso>
+                               </foaf:Document>
+                       </foaf:weblog>
+               </foaf:Agent>
+       </foaf:member>
+{% endfor %}
+
+</foaf:Group>
+</rdf:RDF>
diff --git a/templates/foafroll.xml.tmpl b/templates/foafroll.xml.tmpl
deleted file mode 100644 (file)
index a78e3e8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<rdf:RDF
-       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-       xmlns:foaf="http://xmlns.com/foaf/0.1/"
-       xmlns:rss="http://purl.org/rss/1.0/"
-       xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-<foaf:Group>
-       <foaf:name><TMPL_VAR name ESCAPE="HTML"></foaf:name>
-       <foaf:homepage><TMPL_VAR link ESCAPE="HTML"></foaf:homepage>
-       <rdfs:seeAlso rdf:resource="<TMPL_VAR url ESCAPE="HTML">" />
-
-<TMPL_LOOP Channels>
-       <foaf:member>
-               <foaf:Agent>
-                       <foaf:name><TMPL_VAR name ESCAPE="HTML"></foaf:name>
-                       <foaf:weblog>
-                               <foaf:Document rdf:about="<TMPL_VAR link ESCAPE="HTML">">
-                                       <dc:title><TMPL_VAR title_plain ESCAPE="HTML"></dc:title>
-                                       <rdfs:seeAlso>
-                                               <rss:channel rdf:about="<TMPL_VAR url ESCAPE="HTML">" />
-                                       </rdfs:seeAlso>
-                               </foaf:Document>
-                       </foaf:weblog>
-               </foaf:Agent>
-       </foaf:member>
-</TMPL_LOOP>
-
-</foaf:Group>
-</rdf:RDF>
diff --git a/templates/opml.xml.dj b/templates/opml.xml.dj
new file mode 100644 (file)
index 0000000..2cc3d38
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<opml version="1.1">
+       <head>
+               <title>{{ name }}</title>
+               <dateModified>{{ date_822 }}</dateModified>
+               <ownerName>{{ owner_name }}</ownerName>
+               <ownerEmail>{{ owner_email }}</ownerEmail>
+       </head>
+       
+       <body>
+{% for channel in Channels %}
+               <outline type="rss" text="{{ channel.name }}" xmlUrl="{{channel.url }}" title="{% firstof channel.title channel.name %}"{% if channel.channel_link %} htmlUrl="{{ channel.channel_link }}"{% endif %} /> {% endfor %}
+       </body>
+</opml>
diff --git a/templates/opml.xml.tmpl b/templates/opml.xml.tmpl
deleted file mode 100644 (file)
index b56ee5f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<opml version="1.1">
-       <head>
-               <title><TMPL_VAR name ESCAPE="HTML"></title>
-               <dateModified><TMPL_VAR date_822></dateModified>
-               <ownerName><TMPL_VAR owner_name></ownerName>
-               <ownerEmail><TMPL_VAR owner_email></ownerEmail>
-       </head>
-       
-       <body>
-               <TMPL_LOOP Channels>
-               <outline type="rss" text="<TMPL_VAR name ESCAPE="HTML">" xmlUrl="<TMPL_VAR url ESCAPE="HTML">" title="<TMPL_IF title><TMPL_VAR title ESCAPE="HTML"></TMPL_IF><TMPL_UNLESS title><TMPL_VAR name ESCAPE="HTML"></TMPL_UNLESS>"<TMPL_IF channel_link> htmlUrl="<TMPL_VAR channel_link ESCAPE="HTML">"</TMPL_IF> />
-               </TMPL_LOOP>
-       </body>
-</opml>
diff --git a/templates/rss10.xml.dj b/templates/rss10.xml.dj
new file mode 100644 (file)
index 0000000..99726ea
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<rdf:RDF
+       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+       xmlns:dc="http://purl.org/dc/elements/1.1/"
+       xmlns:foaf="http://xmlns.com/foaf/0.1/"
+       xmlns:content="http://purl.org/rss/1.0/modules/content/"
+       xmlns="http://purl.org/rss/1.0/"
+>
+<channel rdf:about="{{ link }}">
+       <title>{{ name }}</title>
+       <link>{{ link }}</link>
+       <description>{{ name }} - {{ link }}</description>
+
+       <items>
+               <rdf:Seq> {% for item in Items %}
+                 <rdf:li rdf:resource="{{ item.id }}"/>{% endfor %}
+               </rdf:Seq>
+       </items>
+</channel>
+
+{% for item in Items %}
+<item rdf:about="{{ item.id }}">
+       <title>{{ item.channel_name }}>{% if item.title %}: {{ item.title_plain }}{% endif %}</title>
+       <link>{{ item.link }}</link>
+    {% if item.content %} <content:encoded>{{ item.content }}</content:encoded> {% endif %}
+       <dc:date>{{ item.date_iso }}</dc:date>
+       <dc:creator>{% firstof item.author_name item.channel_author_name item.channel_name %}</dc:creator>
+</item> {% endfor %}
+
+</rdf:RDF>
diff --git a/templates/rss10.xml.tmpl b/templates/rss10.xml.tmpl
deleted file mode 100644 (file)
index f4f01f3..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<rdf:RDF
-       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-       xmlns:dc="http://purl.org/dc/elements/1.1/"
-       xmlns:foaf="http://xmlns.com/foaf/0.1/"
-       xmlns:content="http://purl.org/rss/1.0/modules/content/"
-       xmlns="http://purl.org/rss/1.0/"
->
-<channel rdf:about="<TMPL_VAR link ESCAPE="HTML">">
-       <title><TMPL_VAR name ESCAPE="HTML"></title>
-       <link><TMPL_VAR link ESCAPE="HTML"></link>
-       <description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
-
-       <items>
-               <rdf:Seq>
-<TMPL_LOOP Items>
-                       <rdf:li rdf:resource="<TMPL_VAR id ESCAPE="HTML">" />
-</TMPL_LOOP>
-               </rdf:Seq>
-       </items>
-</channel>
-
-<TMPL_LOOP Items>
-<item rdf:about="<TMPL_VAR id ESCAPE="HTML">">
-       <title><TMPL_VAR channel_name ESCAPE="HTML"><TMPL_IF title>: <TMPL_VAR title_plain ESCAPE="HTML"></TMPL_IF></title>
-       <link><TMPL_VAR link ESCAPE="HTML"></link>
-       <TMPL_IF content>
-       <content:encoded><TMPL_VAR content ESCAPE="HTML"></content:encoded>
-       </TMPL_IF>
-       <dc:date><TMPL_VAR date_iso></dc:date>
-       <TMPL_IF author_name>
-       <dc:creator><TMPL_VAR author_name ESCAPE="HTML"></dc:creator>
-       </TMPL_IF>
-</item>
-</TMPL_LOOP>
-
-</rdf:RDF>
diff --git a/templates/rss20.xml.dj b/templates/rss20.xml.dj
new file mode 100644 (file)
index 0000000..743f2eb
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<rss version="2.0">
+
+<channel>
+       <title>{{ name }}</title>
+       <link>{{ link }}</link>
+       <language>en</language>
+       <description>{{ name }} - {{ link }}</description>
+
+{% for item in Items %}
+<item>
+       <title>{{ item.channel_name }}>{% if item.title %}: {{ item.title_plain }}{% endif %}</title>
+       <guid>{{ item.id }}</guid>
+       <link>{{ item.link }}</link>
+    {% if item.content %} <description> {% if item.channel_face %} &lt;img src=&quot;http://planet.debian.org/heads/{{ item.channel_face }}&quot; width=&quot;{{ item.channel_facewidth }}&quot; height=&quot;{{ item.channel_faceheight }}&quot; alt=&quot;&quot; align=&quot;right&quot; style=&quot;float: right;&quot;&gt; {% endif %} {{ item.content }} </description> {% endif %}
+       <pubDate>{{ item.date_822 }}</pubDate>
+{% if item.author_email %} {% if item.author_name %} <author>{{ item.author_email }} ({{ item.author_name }})</author> {% else %} <author>{{ item.author_email }}</author> {% endif %} {% endif %}
+</item> {% endfor %}
+</channel>
+</rss>
diff --git a/templates/rss20.xml.tmpl b/templates/rss20.xml.tmpl
deleted file mode 100644 (file)
index 3f3abcf..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<rss version="2.0">
-
-<channel>
-       <title><TMPL_VAR name></title>
-       <link><TMPL_VAR link ESCAPE="HTML"></link>
-       <language>en</language>
-       <description><TMPL_VAR name ESCAPE="HTML"> - <TMPL_VAR link ESCAPE="HTML"></description>
-
-<TMPL_LOOP Items>
-<item>
-       <title><TMPL_VAR channel_name ESCAPE="HTML"><TMPL_IF title>: <TMPL_VAR title_plain ESCAPE="HTML"></TMPL_IF></title>
-       <guid><TMPL_VAR id ESCAPE="HTML"></guid>
-       <link><TMPL_VAR link ESCAPE="HTML"></link>
-    <TMPL_IF content>
-    <description><TMPL_IF channel_face>&lt;img src=&quot;http://planet.debian.org/heads/<TMPL_VAR channel_face ESCAPE="HTML">&quot; width=&quot;<TMPL_VAR channel_facewidth>&quot; height=&quot;<TMPL_VAR channel_faceheight>&quot; alt=&quot;&quot; align=&quot;right&quot; style=&quot;float: right;&quot;&gt;</TMPL_IF><TMPL_VAR content ESCAPE="HTML"></description>
-    </TMPL_IF>
-       <pubDate><TMPL_VAR date_822></pubDate>
-       <TMPL_IF author_email>
-       <TMPL_IF author_name>
-       <author><TMPL_VAR author_email ESCAPE="HTML"> (<TMPL_VAR author_name ESCAPE="HTML">)</author>
-       <TMPL_ELSE>
-       <author><TMPL_VAR author_email ESCAPE="HTML"></author>
-       </TMPL_IF>
-       </TMPL_IF>
-</item>
-</TMPL_LOOP>
-
-</channel>
-</rss>