52 lines
1.6 KiB
Django/Jinja
52 lines
1.6 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>
|
|
m!-- <summary type="text">{{ entry.summary }}</summary> -->
|
|
{% for author in entry.authors %}
|
|
<author>
|
|
<name>{{ author }}</name>
|
|
</author>
|
|
{% endfor %}
|
|
{% if entry.updated %} <updated>{{ entry.updated }}</updated> {% endif %}
|
|
<link rel="http://opds-spec.org/image"
|
|
href="{{ entry.cover }}"
|
|
type="image/jpg"/>
|
|
<link rel="http://opds-spec.org/image/thumbnail"
|
|
href="{{ entry.cover }}"
|
|
type="image/jpg"/>
|
|
{% for link in entry.links %}
|
|
<link rel="{{ link.rel }}"
|
|
href="{{ link.href }}"
|
|
type="{{ link.type }}"/>
|
|
{% endfor %}
|
|
</entry>
|
|
{% endfor %}
|
|
|
|
</feed>
|