This repository has been archived on 2025-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
trantor/templates/search.opds

101 lines
3.2 KiB
Text
Raw Permalink Normal View History

2015-01-17 02:19:14 -06:00
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:odl="http://opds-spec.org/odl"
xml:lang="en"
xmlns="http://www.w3.org/2005/Atom"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:app="http://www.w3.org/2007/app"
xmlns:opds="http://opds-spec.org/2010/catalog"
xmlns:thr="http://purl.org/syndication/thread/1.0"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<id>{{.S.BaseURL}}/search/?q={{.S.Search}}</id>
<icon>{{.S.BaseURL}}/img/favicon.ico</icon>
<link rel="self"
href="/search/?q={{.S.Search}}&amp;p={{.Page}}&amp;fmt=opds"
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<link rel="start"
href="/?fmt=opds"
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
<link rel="up"
href="/?fmt=opds"
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
{{if .Prev}}
<link rel="first"
href="/search/?q={{.S.Search}}&amp;fmt=opds"
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<link rel="previous"
href="{{html .Prev}}&amp;fmt=opds"
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
{{end}}
{{if .Next}}
<link rel="next"
href="{{html .Next}}&amp;fmt=opds"
type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
{{end}}
<link rel="search"
title="Search The Imperial Libary of Trantor"
href="/search/?q={searchTerms}&amp;fmt=opds"
type="application/atom+xml"/>
<link rel="search"
href="opensearch.xml"
type="application/opensearchdescription+xml"/>
<opensearch:totalResults>{{.Found}}</opensearch:totalResults>
<opensearch:itemsPerPage>{{.ItemsPage}}</opensearch:itemsPerPage>
<title>{{.S.Title}}</title>
2015-01-17 02:19:14 -06:00
<author>
<name>The Imperial Library of Trantor</name>
<uri>{{.S.BaseURL}}</uri>
<email>zenow@riseup.net</email>
</author>
<updated>{{.S.Updated}}</updated>
{{$updated := .S.Updated}}
{{$baseurl := .S.BaseURL}}
{{range .Books}}
<entry>
<title>{{html .Title}}</title>
2016-07-30 07:59:30 -04:00
<id>{{$baseurl}}/book/{{.ID}}</id>
2015-01-17 02:19:14 -06:00
<updated>{{$updated}}</updated>
{{range .Authors}}
2015-01-17 02:19:14 -06:00
<author>
<name>{{html .}}</name>
</author>
{{end}}
{{if .Contributor}}
<contributor>
<name>{{html .Contributor}}</name>
</contributor>
{{end}}
{{if .Isbn}}
<dcterms:identifier>urn:isbn:{{.Isbn}}</dcterms:identifier>
{{end}}
<dcterms:publisher>{{html .Publisher}}</dcterms:publisher>
{{if .Date}}
<dcterms:issued>{{.Date}}</dcterms:issued>
{{end}}
{{if .Lang}}
<dcterms:language>{{.Lang}}</dcterms:language>
2015-01-17 02:19:14 -06:00
{{end}}
{{range .Tags}}
2015-01-17 02:19:14 -06:00
<category term="{{html .}}"
label="{{html .}}"/>
{{end}}
<summary>{{html .Description}}</summary>
2016-07-30 07:59:30 -04:00
<link type="image/jpeg" href="/cover/{{.ID}}/big/cover.jpg" rel="http://opds-spec.org/image"/>
<link type="image/jpg" href="/cover/{{.ID}}/small/thumbnail.jpg" rel="http://opds-spec.org/image/thumbnail" />
2015-01-17 02:19:14 -06:00
<link rel="http://opds-spec.org/acquisition"
2016-07-30 07:59:30 -04:00
href="/download/{{.ID}}/{{urlquery .Title}}.epub"
2015-01-17 02:19:14 -06:00
type="application/epub+zip" />
</entry>
{{end}}
</feed>