From 088752959e5cb635b55cb74e8d9d90e5062e0a7f Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Tue, 17 Dec 2019 21:06:22 +0100 Subject: [PATCH 1/3] :memo: Opencontainers labels in docker image #1772 Signed-off-by: mathieu.brunot --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b0b5a609d..9885fb794 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,4 +76,11 @@ LABEL maintainer="searx " \ org.label-schema.vcs-ref=${LABEL_VCS_REF} \ org.label-schema.vcs-url=${LABEL_VCS_URL} \ org.label-schema.build-date="${LABEL_DATE}" \ - org.label-schema.usage="https://github.com/searx/searx-docker" + org.label-schema.usage="https://github.com/searx/searx-docker" \ + org.opencontainers.image.title="searx" \ + org.opencontainers.image.version="${SEARX_GIT_VERSION}" \ + org.opencontainers.image.url="${LABEL_VCS_URL}" \ + org.opencontainers.image.revision=${LABEL_VCS_REF} \ + org.opencontainers.image.source=${LABEL_VCS_URL} \ + org.opencontainers.image.created="${LABEL_DATE}" \ + org.opencontainers.image.documentation="https://github.com/searx/searx-docker" From b136480546c7b14958261338c27f0b2a97ea0aac Mon Sep 17 00:00:00 2001 From: piplongrun Date: Fri, 14 Feb 2020 19:19:24 +0100 Subject: [PATCH 2/3] Add Swisscows autocomplete option --- searx/autocomplete.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/searx/autocomplete.py b/searx/autocomplete.py index ff8958500..00a9f9553 100644 --- a/searx/autocomplete.py +++ b/searx/autocomplete.py @@ -165,6 +165,14 @@ def startpage(query, lang): return [] +def swisscows(query, lang): + # swisscows autocompleter + url = 'https://swisscows.ch/api/suggest?{query}&itemsCount=5' + + resp = loads(get(url.format(query=urlencode({'query': query}))).text) + return resp + + def qwant(query, lang): # qwant autocompleter (additional parameter : lang=en_en&count=xxx ) url = 'https://api.qwant.com/api/suggest?{query}' @@ -196,6 +204,7 @@ backends = {'dbpedia': dbpedia, 'duckduckgo': duckduckgo, 'google': google, 'startpage': startpage, + 'swisscows': swisscows, 'qwant': qwant, 'wikipedia': wikipedia } From b7105da2af11c4f5cd34d2cba61da5a0f3f36d95 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 23 Feb 2020 15:41:08 +0100 Subject: [PATCH 3/3] Add missing autocomplete backends to settings.yml comment Signed-off-by: Markus Heiser --- searx/settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/settings.yml b/searx/settings.yml index f39a5e32d..078d95b72 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -4,7 +4,7 @@ general: search: safe_search : 0 # Filter results. 0: None, 1: Moderate, 2: Strict - autocomplete : "" # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "startpage", "wikipedia" - leave blank to turn it off by default + autocomplete : "" # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off by default default_lang : "" # Default search language - leave blank to detect from browser information or use codes from 'languages.py' ban_time_on_fail : 5 # ban time in seconds after engine errors max_ban_time_on_fail : 120 # max ban time in seconds after engine errors