summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/opensearch.xml
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-09-22 22:42:29 +0200
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-05 14:40:46 +0200
commitc21a907cacbbfa8ce8a135362067086063a805f6 (patch)
treebb1a6236036b1e226385aef80e5291b24c3ed14f /searx/templates/oscar/opensearch.xml
parent5d7b63223fc9242a5be030851d3f6f3dc05d7c8b (diff)
initial commit of the new template 'oscar'
* base.html mostly implemented * stats.html implemented * about.html implemented * most of preferences.html implemented * using bootstrap.js
Diffstat (limited to 'searx/templates/oscar/opensearch.xml')
-rw-r--r--searx/templates/oscar/opensearch.xml27
1 files changed, 27 insertions, 0 deletions
diff --git a/searx/templates/oscar/opensearch.xml b/searx/templates/oscar/opensearch.xml
new file mode 100644
index 000000000..f39283f99
--- /dev/null
+++ b/searx/templates/oscar/opensearch.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+ <ShortName>searx</ShortName>
+ <Description>Search searx</Description>
+ <InputEncoding>UTF-8</InputEncoding>
+ <LongName>searx metasearch</LongName>
+ {% if opensearch_method == 'get' %}
+ <Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
+ {% if autocomplete %}
+ <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
+ <Param name="format" value="x-suggestions" />
+ <Param name="q" value="{searchTerms}" />
+ </Url>
+ {% endif %}
+ {% else %}
+ <Url type="text/html" method="post" template="{{ host }}">
+ <Param name="q" value="{searchTerms}" />
+ </Url>
+ {% if autocomplete %}
+ <!-- TODO, POST REQUEST doesn't work -->
+ <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
+ <Param name="format" value="x-suggestions" />
+ <Param name="q" value="{searchTerms}" />
+ </Url>
+ {% endif %}
+ {% endif %}
+</OpenSearchDescription>