aboutsummaryrefslogtreecommitdiff
path: root/data/templates/feed-updated.htm
blob: ff1d609ef0a91b43429ce92bc062ebcbce968527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>{{title}}: Updated pastes</title>
 <link href="{{url}}"/>
 <link rel="self" href="{{feedurl}}"/>
 <id>{{url}}</id>
{% set repo = pastes.repos.0 %}
 <updated>{{repo.modate|date('c')}}</updated>

{% for repo in pastes.repos %}
 <entry>
  <id>{{repo.getLink('display', null, true)}}</id>
  <title>{{repo.getTitle}}</title>
  <published>{{repo.crdate|date('c')}}</published>
  {% set commit = repo.getHistory().0 %}
  <updated>{{commit.committerTime|date('c')}}</updated>
  <link rel="alternate" type="text/html" href="{{repo.getLink('display', null, true)}}" />
  <author>
   <name>{{commit.committerName}}</name>
   <email>{{commit.committerEmail}}</email>
  </author>
  <summary>{% spaceless %}
   {% if commit.filesChanged %}
     {{ntext(commit.filesChanged, "%d file", "%d files")}} changed{% if commit.linesAdded %},{% endif %}
   {% endif %}
   {% if commit.linesAdded %}
     {{ntext(commit.linesAdded, "%d line", "%d lines")}} added{% if commit.linesDeleted %},{% endif %}
   {% endif %}
   {% if commit.linesDeleted %}
     {{ntext(commit.linesDeleted, "%d line", "%d lines")}} deleted
   {% endif %}
  {% endspaceless %}</summary>
 </entry>
{% endfor %}
</feed>