add atom:link ref="self" tags in rss10.xml and rss20.xml

This commit is contained in:
Matt Domsch 2010-06-15 10:39:47 -05:00 committed by Sam Ruby
parent b5c2879570
commit 1f5c9ce848
3 changed files with 8 additions and 0 deletions

View File

@ -256,8 +256,10 @@ def run(script, doc, output_file=None, options={}):
tp.set(key, value)
if output_file:
basename = os.path.basename(output_file)
reluri = os.path.splitext(os.path.basename(output_file))[0]
tp.set('url', urlparse.urljoin(config.link(),reluri))
tp.set('fullurl', urlparse.urljoin(config.link(),basename))
output = open(output_file, "w")
output.write(tp.process(template))

View File

@ -14,6 +14,9 @@
<TMPL_IF pubsubhubbub_hub>
<atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
</TMPL_IF>
<TMPL_IF fullurl>
<atom:link rel="self" href="<TMPL_VAR fullurl ESCAPE="HTML">" type="application/rss+xml"/>
</TMPL_IF>
<items>
<rdf:Seq>

View File

@ -9,6 +9,9 @@
<TMPL_IF pubsubhubbub_hub>
<atom:link rel="hub" href="<TMPL_VAR pubsubhubbub_hub ESCAPE="HTML">"/>
</TMPL_IF>
<TMPL_IF fullurl>
<atom:link rel="self" href="<TMPL_VAR fullurl ESCAPE="HTML">" type="application/rss+xml"/>
</TMPL_IF>
<TMPL_LOOP Items>
<item>