diff options
| author | asciimoo <asciimoo@gmail.com> | 2014-01-14 18:17:19 +0100 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2014-01-14 18:17:19 +0100 |
| commit | 9cb744f440f72e3a4a5c1eb3e4b8a3daf88299a7 (patch) | |
| tree | 4b5c9e3b8fcc52e03e2a269b83a3c9c0609a5a30 /searx/templates | |
| parent | 467ab3791f4363c3a7e5cb70acf326729a595486 (diff) | |
[enh] opensearch/rss support part I.
Diffstat (limited to 'searx/templates')
| -rw-r--r-- | searx/templates/opensearch_response_rss.xml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/searx/templates/opensearch_response_rss.xml b/searx/templates/opensearch_response_rss.xml new file mode 100644 index 000000000..417b195a3 --- /dev/null +++ b/searx/templates/opensearch_response_rss.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rss version="2.0" + xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" + xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>Searx search: {{ q }}</title> + <link>{{ base_url }}?q={{ q }}</link> + <description>Search results for "{{ q }}" - searx</description> + <opensearch:totalResults>{{ number_of_results }}</opensearch:totalResults> + <opensearch:startIndex>1</opensearch:startIndex> + <opensearch:itemsPerPage>{{ number_of_results }}</opensearch:itemsPerPage> + <atom:link rel="search" type="application/opensearchdescription+xml" href="{{ base_url }}opensearch.xml"/> + <opensearch:Query role="request" searchTerms="{{ q }}" startPage="1" /> + {% for r in results %} + <item> + <title>{{ r.title }}</title> + <link>{{ r.url }}</link> + <description>{{ r.content }}</description> + </item> + {% endfor %} + </channel> +</rss> |