summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/opensearch.xml
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2014-11-11 09:36:39 +0100
committerAdam Tauber <asciimoo@gmail.com>2014-11-11 09:36:39 +0100
commit0d80d5d3b45f9c761a7fd6c457538b54f6d25fce (patch)
treea669f19b5f3a6886ae8c9930e97aa97af3e00778 /searx/templates/oscar/opensearch.xml
parentb422788eb46906d9befbd8b7399bf4653e1fb14e (diff)
parent25312c53e170deb55bd48029e3b76b87692e1911 (diff)
Merge pull request #105 from pointhi/template_oscar
new template: oscar
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>