ComicOPDS/opds/templates/catalog.opds.jinja2

40 lines
1.2 KiB
Django/Jinja

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:ov="http://open.vocab.org/terms/"
xmlns:oz="http://openzim.org/terms/"
xmlns:opds="http://opds-spec.org/2010/catalog">
<id>urn:uuid:{{ catalog.id }}</id>
<title>{{ catalog.title }}</title>
{% if catalog.author_name or catalog.author_url %}
<author>
{% if catalog.author_name %}
<name>{{ catalog.author_name }}</name>
{% endif %}
{% if catalog.author_url %}
<uri>{{ catalog.author_url }}</uri>
{% endif %}
</author>
{% endif %}
<link rel="start"
href="{{ catalog.root_url }}"
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<link rel="self"
href="{{ catalog.url }}"
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
{% for entry in catalog.entries %}
<entry>
<title>{{ entry.title }}</title>
<id>{{ entry.id }}</id>
{% if entry.updated %} <updated>{{ entry.updated }}</updated> {% endif %}
{% for link in entry.links %}
<link rel="{{ link.rel }}"
href="{{ link.href }}"
type="{{ link.type }}"/>
{% endfor %}
</entry>
{% endfor %}
</feed>