{% from 'feed_description.html' import item_desc %}

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>{{ title_url }}</id>
  <title>{{ pageTitle|e }}</title>
  {% if project_url -%}
  <link rel="self" href="{{ title_url }}/atom"/>
  <link rel="alternate" href="{{ title_url }}"/>
  {% endif %}
  {%- if description -%}
  <subtitle>{{ description }}</subtitle>
  {% endif %}
  {%- if rfc3339_pubdate -%}
  <updated>{{ rfc3339_pubdate }}</updated>
  {% endif -%}
  <author>
    <name>BuildBot</name>
  </author>

  {% for b in builds -%}
  <entry>
    <title>{{ b.pageTitle }}</title>
    <link href="{{ b.link }}"/>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        {{ item_desc(b, title_url, title)|indent(6) }}
        <pre xml:space="preserve">{{ b.log_lines|join('\n')|e }}</pre>
      </div>
    </content>
    {% if b.rfc3339_pubdate -%}
    <updated>{{ b.rfc3339_pubdate }}</updated>
    <id>{{ b.guid }}</id>
    {% endif -%}
    <author>Buildbot</author>
  </entry>

  {% endfor -%}

</feed>
