mirror of
https://github.com/lazylibrarian/LazyLibrarian.git
synced 2026-04-29 03:15:40 -04:00
53 lines
2.0 KiB
HTML
53 lines
2.0 KiB
HTML
<%!
|
|
import lazylibrarian
|
|
%>
|
|
<feed xmlns="http://www.w3.org/2005/Atom"
|
|
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
|
xmlns:opds="http://opds-spec.org/2010/catalog"
|
|
xmlns:odl="http://opds-spec.org/odl" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
|
|
xmlns:dcterms="http://purl.org/dc/terms/">
|
|
<title>${opds['title']}</title>
|
|
<id>${opds['id']}</id>
|
|
<updated>${opds['updated']}</updated>
|
|
<author>
|
|
<name>LazyLibrarian Server</name>
|
|
<uri>https://${lazylibrarian.CONFIG['GIT_HOST']}/${lazylibrarian.CONFIG['GIT_USER']}/${lazylibrarian.CONFIG['GIT_REPO']}</uri>
|
|
</author>
|
|
%for link in opds['links']:
|
|
<%
|
|
linktitle = ''
|
|
if 'title' in link:
|
|
linktitle = ' title="%s"' % link['title']
|
|
%>
|
|
<link rel="${link['rel']}" href="${link['href']}" type="${link['type']}"${linktitle}/>
|
|
%endfor
|
|
%for entry in opds['entries']:
|
|
<entry>
|
|
<title>${entry['title']}</title>
|
|
<id>${entry['id']}</id>
|
|
%if 'author' in entry and entry['author']:
|
|
<author>
|
|
<name>${entry['author']}</name>
|
|
</author>
|
|
%endif
|
|
<updated>${entry['updated']}</updated>
|
|
<content type="text">${entry['content']}</content>
|
|
%if entry['rel'] == 'file':
|
|
<link href="${entry['href']}" rel="http://opds-spec.org/acquisition" type="${entry['type']}"/>
|
|
%else:
|
|
% if entry['rel'] == 'multi':
|
|
${entry['type']}
|
|
%else:
|
|
<link href="${entry['href']}" rel="${entry['rel']}" type="application/atom+xml; profile=opds-catalog; kind=${entry['kind']}"/>
|
|
%endif
|
|
%endif
|
|
%if 'thumbnail' in entry and entry['thumbnail']:
|
|
<link href="${entry['thumbnail']}" type="image/jpeg" rel="http://opds-spec.org/image/thumbnail"/>
|
|
%endif
|
|
%if 'image' in entry and entry['image']:
|
|
<link href="${entry['image']}" type="image/jpeg" rel="http://opds-spec.org/image"/>
|
|
%endif
|
|
</entry>
|
|
%endfor
|
|
</feed>
|