/upstream/templates/lists/feed_updates.tmpl
Type: /type/template
body: $def with (list)
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    $ editions = list.get_editions(limit=100)['editions']
    $list.load_changesets(editions)
    
    <title>$list.name</title>
    
    <link rel="self" type="application/atom+xml" href="$request.home$list.url('/feeds/updates.atom')"/>
    <link rel="alternate" type="text/html" href="$list.url()"/>
    <icon>${request.home}/favicon.ico</icon>

        
    $ last_update = list.last_update or list.last_modified
    <updated>$last_update.strftime("%Y-%m-%dT%H:%M:%SZ")</updated>
    
    <id>$request.home$list.url("/feeds/updates.atom")</id>
    
    $for e in editions:
        $ c = e.recent_changeset
        <entry>
            <title>$e.title</title>
            <link href="$request.home$e.url()"/>
            <link rel="alternate" type="text/html" href="$request.home$e.url()"/>
            <link rel="alternate" type="application/json" href="$request.home${e.key}.json"/>
            <id>$request.home$e.key</id>
            <updated>$c.timestamp.strftime("%Y-%m-%dT%H:%M:%SZ")</updated>
            <summary>$c.comment</summary>
            <author>
                $if c.author:
                    <name>$c.author.displayname</name>
                    <uri>$request.home$c.author.key</uri>
                $else:
                    <name>Anonymous</name>
            </author>
        </entry>
</feed>
plugin: openlibrary
title: Updates feed for a list
m: edit