Files
ComicOPDS/app/templates/entry.xml.j2

48 lines
1.4 KiB
Django/Jinja

<entry xmlns="http://www.w3.org/2005/Atom">
<id>{{ entry_id }}</id>
<updated>{{ updated }}</updated>
<title>{{ title }}</title>
{% if is_dir %}
<link rel="subsection"
href="{{ href_abs }}"
type="application/atom+xml;profile=opds-catalog" />
{% else %}
<!-- OPDS acquisition (download full book) -->
<link rel="http://opds-spec.org/acquisition/open-access"
href="{{ download_href_abs }}" type="{{ mime }}" />
<!-- Direct file stream (Range-enabled, optional) -->
<link rel="enclosure" href="{{ stream_href_abs }}" type="{{ mime }}" />
<!-- OPDS Page Streaming Extension 1.2 -->
<link rel="http://vaemendis.net/opds-pse/stream"
type="image/jpeg"
href="{{ pse_template_abs }}"
pse:count="{{ page_count }}" />
{% if image_abs %}
<link rel="http://opds-spec.org/image" href="{{ image_abs }}" type="image/jpeg" />
{% endif %}
{% if thumb_href_abs %}
<link rel="http://opds-spec.org/image/thumbnail" href="{{ thumb_href_abs }}" type="image/jpeg" />
{% endif %}
{% for a in (authors or []) %}
<author><name>{{ a }}</name></author>
{% endfor %}
{% if issued %}
<published>{{ issued }}</published>
{% endif %}
{% if summary %}
<summary type="text">{{ summary }}</summary>
{% endif %}
{% for c in (categories or []) %}
<category term="{{ c }}" />
{% endfor %}
{% endif %}
</entry>