content,
<feed version="0.3"
xmlns="http://purl.org/atom/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:kid="http://purl.org/kid/ns#">
<?python
#
from datetime import datetime
BLOG = redfoot.namespace("http://redfoot.net/3.0/blog#")
DC = redfoot.namespace("http://purl.org/dc/elements/1.1/")
DCTERMS = redfoot.namespace("http://purl.org/dc/terms/")
COMMENT = redfoot.namespace("http://redfoot.net/3.0/comment#")
format = redfoot.module(URIRef("simple_format#module", base=redfoot.uri)).format
resources = []
for resource in redfoot.subjects(RDF.type, COMMENT.Comment):
created = redfoot.value(resource, DCTERMS.created)
if resource.startswith(request.host):
content_value = redfoot.comment(resource)
resources.append((created, resource, content_value))
resources.sort()
resources.reverse()
html_page = redfoot.value(None, SERVER.alternate, request.uri, any=True)
now = datetime.utcnow().replace(microsecond=0).isoformat() + "Z"
?>
<title>${"%s: %s" % (redfoot.label(request.host), redfoot.label(request.uri))}</title>
<link rel="alternate" type="text/html" href="${html_page}"/>
<modified>${now}</modified>
<author>
<name>${redfoot.label(request.host)}</name>
<url>${"%s/" % request.host}</url>
</author>
<dc:subject>resources</dc:subject>
<span kid:for="created, resource, content_value in resources" kid:omit="">
<entry>
<title>${redfoot.label(resource, resource)}</title>
<link rel="alternate" type="text/html" href="${resource.concrete()}"/>
<id>${resource}</id>
<issued>${created}</issued>
<modified>${created}</modified>
<content type="text/html" mode="escaped">
${content_value}
</content>
<dc:subject>resource</dc:subject>
</entry>
</span>
</feed>
Comments regarding comments feed (atom 0.3)
Login to submit a comment.