summaryrefslogtreecommitdiff
path: root/searxng_extra/standalone_searx.py
AgeCommit message (Collapse)Author
2024-03-11[mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTIONMarkus Heiser
In the past, some files were tested with the standard profile, others with a profile in which most of the messages were switched off ... some files were not checked at all. - ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished - the distinction ``# lint: pylint`` is no longer necessary - the pylint tasks have been reduced from three to two 1. ./searx/engines -> lint engines with additional builtins 2. ./searx ./searxng_extra ./tests -> lint all other python files Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-08-09[fix] make flask_babel.gettext() work in engine modules (L10n & threads)Markus Heiser
incident: flask_babel.gettext() does not work in the engine modules. cause: the request() and response() functions of the engine modules run in the processor, whose search() method runs in a thread and in the threads the context of the Flask app does not exist. The context of the Flask app is needed by the gettext() function for the L10n. Solution: copy context of the Flask app into the threads. [1] special case: We cannot equip the search() method of the processors with the decorator [1], because the decorator requires a context (Flask app) that does not yet exist at the time of the initialization of the processors (the initialization of the processors is part of the initialization of the Flask app). [1] https://flask.palletsprojects.com/en/2.3.x/api/#flask.copy_current_request_context Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-06-19[mod] move some code from webapp module to webutils module (no functional ↵Markus Heiser
change) Over the years the webapp module became more and more a mess. To improve the modulaization a little this patch moves some implementations from the webapp module to webutils module. HINT: this patch brings non functional change Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-20[mod] switch default theme from oscar to simpleMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-03[docs] move searxng_extra/ stuff to the developer section.Markus Heiser
Stuff in folder searxng_extra/ is not suitable for normal users and should only be used by developers. The script searxng_extra/standalone_searx.py must not give the impression that it improves privacy. [1] [1] https://github.com/searxng/searxng/pull/651#issuecomment-1001389726 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27[format.python] initial formatting of the python codeMarkus Heiser
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-26[fix] python searxng_extra/standalone_searx.py --helpAlexandre Flament
The scripts loads the engine and then parse the arguments. After that the engines are initialized. Before this commit, with "--help", the HTTP clients are closed before the engine initialization threads. When these init threads try to send an HTTP request, an exception is raised.
2021-10-03[mod] searxng_extras - minor improvementsMarkus Heiser
- fix docs/searxng_extra/standalone_searx.py.rst - add SPDX tag - pylint standalone_searx.py and update_wikidata_units.py Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-02SearXNG: searxng_extraAlexandre Flament