Loading Dockerfile +3 −3 Original line number Diff line number Diff line FROM alpine:3.6 MAINTAINER searx <https://github.com/asciimoo/searx> LABEL description "A privacy-respecting, hackable metasearch engine." FROM alpine:3.8 LABEL maintainer="searx <https://github.com/asciimoo/searx>" LABEL description="A privacy-respecting, hackable metasearch engine." ENV BASE_URL=False IMAGE_PROXY=False EXPOSE 8888 Loading manage.sh +14 −3 Original line number Diff line number Diff line #!/bin/sh BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")" export PATH="$BASE_DIR/node_modules/.bin":$PATH cd -- "$BASE_DIR" set -e # subshell PYTHONPATH="$BASE_DIR" SEARX_DIR="$BASE_DIR/searx" ACTION="$1" cd -- "$BASE_DIR" set -e # # Python Loading Loading @@ -109,7 +109,14 @@ tests() { # Web # npm_path_setup() { which npm || (printf 'Error: npm is not found\n'; exit 1) export PATH="$(npm bin)":$PATH } npm_packages() { npm_path_setup echo '[!] install NPM packages' cd -- "$BASE_DIR" npm install less@2.7 less-plugin-clean-css grunt-cli Loading @@ -124,10 +131,14 @@ npm_packages() { } build_style() { npm_path_setup lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2" } styles() { npm_path_setup echo '[!] Building legacy style' build_style themes/legacy/less/style.less themes/legacy/css/style.css build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css Loading requirements.txt +4 −4 Original line number Diff line number Diff line Loading @@ -2,10 +2,10 @@ redis certifi==2017.11.5 flask==1.0.2 flask-babel==0.11.2 lxml==4.2.1 idna==2.6 lxml==4.2.3 idna==2.7 pygments==2.1.3 pyopenssl==18.0.0 python-dateutil==2.7.3 pyyaml==3.12 requests[socks]==2.18.4 pyyaml==3.13 requests[socks]==2.19.1 searx/answerers/random/answerer.py +21 −3 Original line number Diff line number Diff line import hashlib import random import string import sys import uuid from flask_babel import gettext # required answerer attribute Loading @@ -16,9 +18,13 @@ else: random_string_letters = string.ascii_lowercase + string.digits + string.ascii_uppercase def random_characters(): return [random.choice(random_string_letters) for _ in range(random.randint(8, 32))] def random_string(): return u''.join(random.choice(random_string_letters) for _ in range(random.randint(8, 32))) return u''.join(random_characters()) def random_float(): Loading @@ -29,9 +35,21 @@ def random_int(): return unicode(random.randint(-random_int_max, random_int_max)) def random_sha256(): m = hashlib.sha256() m.update(b''.join(random_characters())) return unicode(m.hexdigest()) def random_uuid(): return unicode(uuid.uuid4()) random_types = {b'string': random_string, b'int': random_int, b'float': random_float} b'float': random_float, b'sha256': random_sha256, b'uuid': random_uuid} # required answerer function Loading searx/data/useragents.json 0 → 100644 +14 −0 Original line number Diff line number Diff line { "ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}", "versions": [ "61.0.1", "61.0", "60.0.2", "60.0.1", "60.0" ], "os": [ "Windows NT 10; WOW64", "X11; Linux x86_64" ] } No newline at end of file Loading
Dockerfile +3 −3 Original line number Diff line number Diff line FROM alpine:3.6 MAINTAINER searx <https://github.com/asciimoo/searx> LABEL description "A privacy-respecting, hackable metasearch engine." FROM alpine:3.8 LABEL maintainer="searx <https://github.com/asciimoo/searx>" LABEL description="A privacy-respecting, hackable metasearch engine." ENV BASE_URL=False IMAGE_PROXY=False EXPOSE 8888 Loading
manage.sh +14 −3 Original line number Diff line number Diff line #!/bin/sh BASE_DIR="$(dirname -- "`readlink -f -- "$0"`")" export PATH="$BASE_DIR/node_modules/.bin":$PATH cd -- "$BASE_DIR" set -e # subshell PYTHONPATH="$BASE_DIR" SEARX_DIR="$BASE_DIR/searx" ACTION="$1" cd -- "$BASE_DIR" set -e # # Python Loading Loading @@ -109,7 +109,14 @@ tests() { # Web # npm_path_setup() { which npm || (printf 'Error: npm is not found\n'; exit 1) export PATH="$(npm bin)":$PATH } npm_packages() { npm_path_setup echo '[!] install NPM packages' cd -- "$BASE_DIR" npm install less@2.7 less-plugin-clean-css grunt-cli Loading @@ -124,10 +131,14 @@ npm_packages() { } build_style() { npm_path_setup lessc --clean-css="--s1 --advanced --compatibility=ie9" "$BASE_DIR/searx/static/$1" "$BASE_DIR/searx/static/$2" } styles() { npm_path_setup echo '[!] Building legacy style' build_style themes/legacy/less/style.less themes/legacy/css/style.css build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css Loading
requirements.txt +4 −4 Original line number Diff line number Diff line Loading @@ -2,10 +2,10 @@ redis certifi==2017.11.5 flask==1.0.2 flask-babel==0.11.2 lxml==4.2.1 idna==2.6 lxml==4.2.3 idna==2.7 pygments==2.1.3 pyopenssl==18.0.0 python-dateutil==2.7.3 pyyaml==3.12 requests[socks]==2.18.4 pyyaml==3.13 requests[socks]==2.19.1
searx/answerers/random/answerer.py +21 −3 Original line number Diff line number Diff line import hashlib import random import string import sys import uuid from flask_babel import gettext # required answerer attribute Loading @@ -16,9 +18,13 @@ else: random_string_letters = string.ascii_lowercase + string.digits + string.ascii_uppercase def random_characters(): return [random.choice(random_string_letters) for _ in range(random.randint(8, 32))] def random_string(): return u''.join(random.choice(random_string_letters) for _ in range(random.randint(8, 32))) return u''.join(random_characters()) def random_float(): Loading @@ -29,9 +35,21 @@ def random_int(): return unicode(random.randint(-random_int_max, random_int_max)) def random_sha256(): m = hashlib.sha256() m.update(b''.join(random_characters())) return unicode(m.hexdigest()) def random_uuid(): return unicode(uuid.uuid4()) random_types = {b'string': random_string, b'int': random_int, b'float': random_float} b'float': random_float, b'sha256': random_sha256, b'uuid': random_uuid} # required answerer function Loading
searx/data/useragents.json 0 → 100644 +14 −0 Original line number Diff line number Diff line { "ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}", "versions": [ "61.0.1", "61.0", "60.0.2", "60.0.1", "60.0" ], "os": [ "Windows NT 10; WOW64", "X11; Linux x86_64" ] } No newline at end of file