Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33c462bc authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

Merge branch 'dev/searxng-sync-jan' into 'master'

Sync searxng changes

Closes #65

See merge request !167
parents 6e702afa 7c389918
Loading
Loading
Loading
Loading

.codecov.yml

deleted100644 → 0
+0 −31
Original line number Diff line number Diff line
comment: false
coverage:
  status:
    project:
      default:
        # basic
        target: auto
        threshold: null
        base: auto 
        # advanced
        branches: null
        if_no_uploads: error
        if_not_found: success
        if_ci_failed: error
        only_pulls: false
        flags: null
        paths: null
    patch:
      default:
        # basic
        target: auto
        threshold: null
        base: auto 
        # advanced
        branches: null
        if_no_uploads: error
        if_not_found: success
        if_ci_failed: error
        only_pulls: false
        flags: null
        paths: null

.config.sh

deleted100644 → 0
+0 −59
Original line number Diff line number Diff line
# -*- coding: utf-8; mode: sh -*-
# SPDX-License-Identifier: AGPL-3.0-or-later
# shellcheck shell=bash disable=SC2034
#
# This environment is used by ./utils scripts like filtron.sh or searx.sh.  The
# default values are *most flexible* and *best maintained*, you normally not
# need to change the defaults (except PUBLIC_URL).
#
# Before you change any value here you have to uninstall any previous
# installation.  Further is it recommended to backup your changes simply by
# adding them to you local brand (git branch)::
#
#     git add .config

# The public URL of the searx instance: PUBLIC_URL="https://mydomain.xy/searx"
# The default is taken from ./utils/brand.env.

PUBLIC_URL="${SEARX_URL}"

if [[ ${PUBLIC_URL} == "https://searx.me" ]]; then
    # hint: Linux containers do not have DNS entries, lets use IPs
    PUBLIC_URL="http://$(primary_ip)/searx"
fi

# searx.sh
# ---------

# SEARX_INTERNAL_URL="127.0.0.1:8888"
# SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml"

# Only change, if you maintain a searx brand in your searx fork (GIT_URL) which
# is not hold by branch 'master'.  The branch has to be a local branch, in the
# repository from which you install (which is most often the case).  If you want
# to install branch 'foo', don't forget to run 'git branch foo origin/foo' once.
# GIT_BRANCH="${GIT_BRANCH:-master}"

# filtron.sh
# ----------

# FILTRON_API="127.0.0.1:4005"
# FILTRON_LISTEN="127.0.0.1:4004"
# FILTRON_TARGET="127.0.0.1:8888"

# morty.sh
# --------

# morty listen address
# MORTY_LISTEN="127.0.0.1:3000"
# PUBLIC_URL_PATH_MORTY="/morty/"

# system services
# ---------------

# Common $HOME folder of the service accounts
# SERVICE_HOME_BASE="/usr/local"

# **experimental**: Set SERVICE_USER to run all services by one account, but be
# aware that removing discrete components might conflict!
# SERVICE_USER=searx
+131 −100
Original line number Diff line number Diff line
;;; .dir-locals.el
;;
;; If you get ``*** EPC Error ***`` (even after a jedi:install-server) in your
;; emacs session, mostly you have jedi-mode enabled but the python enviroment is
;; missed.  The python environment has to be next to the
;; Per-Directory Local Variables:
;;   https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
;;
;; .. hint::
;;
;;    If you get ``*** EPC Error ***`` (even after a jedi:install-server) in
;;    your emacs session, mostly you have jedi-mode enabled but the python
;;    environment is missed.  The python environment has to be next to the
;;    ``<repo>/.dir-locals.el`` in::
;;
;;       ./local/py3
;;
;; In Emacs, some buffer locals are referencing the project environment:
;; To setup such an environment, build target::
;;
;;     $ make pyenv.install
;;
;; Some buffer locals are referencing the project environment:
;;
;; - prj-root                                --> <repo>/
;; - nvm-dir                                 --> <repo>/.nvm
;; - python-environment-directory            --> <repo>/local
;; - python-environment-default-root-name    --> py3
;; - python-shell-virtualenv-root            --> <repo>/local/py3
@@ -17,22 +27,16 @@
;;      `process-environment' and `exec-path' get proper values in order to run
;;      shells inside the specified virtualenv, example::
;;         (setq python-shell-virtualenv-root "/path/to/env/")
;; - python-shell-interpreter                --> <repo>/local/py3/bin/python
;;
;; To setup such an environment build target 'pyenv' or 'pyenvinstall'::
;;
;;   $ make pyenvinstall
;; Jedi, flycheck & other python stuff should use the 'python-shell-interpreter'
;; from the local py3 environment.
;;
;; Alternatively create the virtualenv, source it and install jedi + epc
;; (required by `emacs-jedi <https://tkf.github.io/emacs-jedi>`_)::
;; For pyright support you need to install::
;;
;;     $ python -m venv ./local/py3
;;     ...
;;     $ source ./local/py3/bin/activate
;;     (py3)$ # now install into the activated 'py3' environment ..
;;     (py3)$ pip install jedi epc
;;     ...
;;    M-x package-install lsp-pyright
;;
;; Here is what also I found useful to add to my .emacs::
;; Other useful jedi stuff you might add to your ~/.emacs::
;;
;;     (global-set-key [f6] 'flycheck-mode)
;;     (add-hook 'python-mode-hook 'my:python-mode-hook)
@@ -45,72 +49,102 @@
;;       (define-key python-mode-map (kbd "M-.")     'jedi:goto-definition)
;;       (define-key python-mode-map (kbd "M-,")     'jedi:goto-definition-pop-marker)
;;     )
;;

((nil
  . ((fill-column . 80)
     ))
 (python-mode
  . ((indent-tabs-mode . nil)
     (indent-tabs-mode . nil)
     (eval . (progn

               (add-to-list 'auto-mode-alist '("\\.html\\'" . jinja2-mode))

               ;; project root folder is where the `.dir-locals.el' is located
     (eval . (setq-local
	      prj-root (locate-dominating-file  default-directory ".dir-locals.el")))
               (setq-local prj-root
                           (locate-dominating-file  default-directory ".dir-locals.el"))

               (setq-local python-environment-directory
                           (expand-file-name "./local" prj-root))

               ;; to get in use of NVM environment, install https://github.com/rejeep/nvm.el
               (setq-local nvm-dir (expand-file-name "./.nvm" prj-root))

     (eval . (setq-local
	      python-environment-directory (expand-file-name "./local" prj-root)))
               ;; use 'py3' environment as default
               (setq-local python-environment-default-root-name
                           "py3")

     ;; use 'py3' enviroment as default
     (eval . (setq-local
	      python-environment-default-root-name "py3"))
               (setq-local python-shell-virtualenv-root
                           (expand-file-name
                            python-environment-default-root-name python-environment-directory))

     (eval . (setq-local
	      python-shell-virtualenv-root
	      (concat python-environment-directory
		      "/"
		      python-environment-default-root-name)))
               (setq-local python-shell-interpreter
                           (expand-file-name
                            "bin/python" python-shell-virtualenv-root))))))
 (makefile-gmake-mode
  . ((indent-tabs-mode . t)))

     ;; python-shell-virtualenv-path is obsolete, use python-shell-virtualenv-root!
     ;; (eval . (setq-local
     ;; 	 python-shell-virtualenv-path python-shell-virtualenv-root))
 (yaml-mode
  . ((eval . (progn

     (eval . (setq-local
	      python-shell-interpreter
	      (expand-file-name "bin/python" python-shell-virtualenv-root)))
               ;; flycheck should use the local py3 environment
               (setq-local flycheck-yaml-yamllint-executable
                           (expand-file-name "bin/yamllint" python-shell-virtualenv-root))

     (eval . (setq-local
	      python-environment-virtualenv
               (setq-local flycheck-yamllintrc
                           (expand-file-name  ".yamllint.yml" prj-root))

               (flycheck-checker . yaml-yamllint)))))

 (json-mode
  . ((eval . (progn
               (setq-local js-indent-level 4)
               (flycheck-checker . json-python-json)))))

 (js-mode
  . ((eval . (progn
               ;; use nodejs from the (local) NVM environment (see nvm-dir)
               (nvm-use-for-buffer)
               (setq-local js-indent-level 2)
               ;; flycheck should use the eslint checker from developer tools
               (setq-local flycheck-javascript-eslint-executable
                           (expand-file-name "node_modules/.bin/eslint" prj-root))

               (flycheck-mode)
               ))))

 (python-mode
  . ((eval . (progn
               ;; use nodejs from the (local) NVM environment (see nvm-dir)
               (nvm-use-for-buffer)
               (if (featurep 'lsp-pyright)
                   (lsp))
               (setq-local python-environment-virtualenv
                           (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
                                 ;;"--system-site-packages"
		    "--quiet")))
                                 "--quiet"))

     (eval . (setq-local
	      pylint-command
	      (expand-file-name "bin/pylint" python-shell-virtualenv-root)))
               (setq-local pylint-command
                           (expand-file-name "bin/pylint" python-shell-virtualenv-root))

               ;; pylint will find the '.pylintrc' file next to the CWD
               ;;   https://pylint.readthedocs.io/en/latest/user_guide/run.html#command-line-options
     (eval . (setq-local
	      flycheck-pylintrc ".pylintrc"))
               (setq-local flycheck-pylintrc
                           ".pylintrc")

               ;; flycheck & other python stuff should use the local py3 environment
     (eval . (setq-local
	      flycheck-python-pylint-executable python-shell-interpreter))
               (setq-local flycheck-python-pylint-executable
                           python-shell-interpreter)

               ;; use 'M-x jedi:show-setup-info' and 'M-x epc:controller' to inspect jedi server

               ;; https://tkf.github.io/emacs-jedi/latest/#jedi:environment-root -- You
               ;; can specify a full path instead of a name (relative path). In that case,
               ;; python-environment-directory is ignored and Python virtual environment
               ;; is created at the specified path.
     (eval . (setq-local  jedi:environment-root  python-shell-virtualenv-root))
               (setq-local jedi:environment-root
                           python-shell-virtualenv-root)

               ;; https://tkf.github.io/emacs-jedi/latest/#jedi:server-command
     (eval .(setq-local
	     jedi:server-command
               (setq-local jedi:server-command
                           (list python-shell-interpreter
		   jedi:server-script)
	     ))
                                 jedi:server-script))

               ;; jedi:environment-virtualenv --> see above 'python-environment-virtualenv'
               ;; is set buffer local!  No need to setup jedi:environment-virtualenv:
@@ -121,13 +155,10 @@
               ;;
               ;;    https://tkf.github.io/emacs-jedi/latest/#jedi:environment-virtualenv
               ;;
     ;; (eval . (setq-local
     ;; 	      jedi:environment-virtualenv
               ;; (setq-local jedi:environment-virtualenv
               ;;             (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root)
     ;; 		    ;;"--python"
     ;; 		    ;;"/usr/bin/python3.4"
     ;; 		    )))

     ;; jedi:server-args

     )))
               ;;                   "--python"
               ;;                   "/usr/bin/python3.4"
               ;;                   ))
               ))))
 )

.dockerignore

0 → 100644
+44 −0
Original line number Diff line number Diff line
*~
*/*~
*/*/*~
*/*/*/*~
*/*/*/*/*~

# Git
.git
.gitignore

# CI
.codeclimate.yml
.travis.yml
.taskcluster.yml

# Byte-compiled / optimized / DLL files
__pycache__/
*/__pycache__/
*/*/__pycache__/
*/*/*/__pycache__/
*.py[cod]
*/*.py[cod]
*/*/*.py[cod]
*/*/*/*.py[cod]

# node_modules
node_modules/
*/node_modules/
*/*/node_modules/
*/*/*/node_modules/
*/*/*/*/node_modules/

.tx/

# to sync with .gitignore
geckodriver.log
.coverage
coverage/
cache/
build/
dist/
local/
gh-pages/
*.egg-info/
+12 −2
Original line number Diff line number Diff line
searx/static/css/bootstrap.min.css -diff
searx/static/js/bootstrap.min.js -diff
*.gif -diff
*.png -diff
*.min.css -diff
*.min.js -diff
*.css.map -diff
*.js.map -diff
*.eot -diff
*.svg -diff
*.ttf -diff
*.woff -diff
*.woff2 -diff
messages.mo -diff
Loading