Create atom feed
authorVincent Tondellier <tonton+hg@team1664.org>
Wed, 02 May 2012 21:46:54 +0200
changeset 4 7ffe7b48b8de
parent 3 2ff78fe4abda
child 5 2f224f085623
child 6 8dfc7e5dbdc7
Create atom feed
templates/index.atom.ep
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/index.atom.ep	Wed May 02 21:46:54 2012 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-US">
+  <id>tag:crash,2012,<%= url_for('index')->to_abs =%></id>
+  <link type="text/html" rel="alternate" href="<%= url_for()->to_abs =%>"/>
+  <link type="application/atom+xml" rel="self" href="<%= url_for('current', format => 'atom')->to_abs =%>"/>
+  <title>Recent Crashs</title>
+  <updated><%= POSIX::strftime("%FT%T%z", gmtime(@$files[0]->{date} || 0)) =%></updated>
+
+% foreach my $file(@$files) {
+  <entry>
+    <id>tag:crash,2012:uuid::<%= $file->{uuid} =%></id>
+    <link type="text/html" rel="alternate" href="<%= url_for('report', uuid => $file->{uuid})->to_abs =%>"/>
+    <title><%= $file->{product} =%>: <%= $file->{signature} =%></title>
+    <updated><%= POSIX::strftime("%FT%T%z", gmtime($file->{date})) =%></updated>
+    <author>
+      <name></name>
+    </author>
+    <content type="html">
+      %= t span => POSIX::strftime("%F %T", localtime($file->{date}))
+    </content>
+  </entry>
+% }
+</feed>