summaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2020-12-26[fix] utils/lib.sh: various typos in messages and commentsMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24[fix] message to install different python versions from apt PPAMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24[perf] pyenvinstall: reinstall only when requirements are changeMarkus Heiser
Create a (PY_ENV)/requirements.sha256 file with sha256 sums of the ./requirements*.txt files and reinstall only if the sha256 sums change. Suggested-by: @dalf / https://github.com/searx/searx/pull/2418#pullrequestreview-558426579 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24[perf] virtualenv: install boilerplate only onceMarkus Heiser
Install boilerplate packages (pip, wheel, setuptools and requirements.txt) only once, when virtualenv is created. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24Merge pull request #2418 from return42/fix-pyenv-installAlexandre Flament
[fix] makefile.python: remove duplicate pyenv-(un)install targets
2020-12-24[fix] makefile.python: remove duplicate pyenv-(un)install targetsMarkus Heiser
Makefile targets 'pyenv-install' and 'pyenv-uninstall' are unused duplicates of 'pyenvinstall' and 'pyenvuninstall'. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-23[mod] utils/searx.sh install: create branch if not already existsMarkus Heiser
This patch keeps an eye on: 1. When installing searx, the branch to install needs to be a local branch. 2. The branch to install can be different from the current branch. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-23[fix] use SEARX_SETTINGS_TEMPLATE from .config environmentMarkus Heiser
In commit a70b9b9f the SEARX_SETTINGS_TEMPLATE environment was added to the .config file, but was not use in utils/searx.sh. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-20Merge pull request #2399 from return42/fix-lxcAlexandre Flament
[fix] determine path to makefile.lxc in a LXC
2020-12-18[fix] yum installation of 'Development Tools'Markus Heiser
'yum install' does not support '@development-tools' notation for group installation. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-18[mod] remove obsolete virtualenv commandMarkus Heiser
Installation and use of the command 'virtualenv' was only needed in py2 and py2 is no longer suported by searx. In py3 the command is replaced by 'python -m venv'. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-18[fix] determine path to makefile.lxc in a LXCMarkus Heiser
The path to the makefile.lxc is not always static and '/share/searx/utils/makefile.lxc' can be wrong. When target 'lxc.activate' is called within the LXC container the path to makefile.lxc depends on LXC_SHARE_FOLDER and the basename of the folder where searx was cloned inital on the HOST system. This patch determines the path of 'makefile.lxc' next to 'makefile.include' itself. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-18Add link to contact instance maintainer to footer of each page (#2391)BBaoVanC
2020-12-17[mod] split searx.search into different processorsAlexandre Flament
see searx.search.processors.abstract.EngineProcessor First the method searx call the get_params method. If the return value is not None, then the searx call the method search.
2020-12-08[doc] recommend to use 'use_default_settings=True'Markus Heiser
Since #2291 is merged, it is recommend to use:: use_default_settings=True 1. Add a template file use_default_settings.yml:: SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml" 2. In Chapter "Configuration" recommend to make use of 'use_default_settings=True' and describe it 3. Rewrite of docs/admin/settings.rst - move chapter 'settings.yml location' to the top - update and split chapter 'Global Settings' 4. Add environment SEARX_SETTINGS_TEMPLATE to .config.sh 5. Use environment $SEARX_SETTINGS_TEMPLATE in the utils/searx.sh script Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-04[mod] documentations & comments: update http://* URL to https://*.Alexandre Flament
About http://lesscss.org see https://github.com/less/less-docs/issues/520
2020-11-04Feature/standalone searx update (#1591)rachmadani haryono
* chg: dev: update standalone_searx parent d8a5df721b33dd8a7cc9e21dba4060f21d629f69 author rachmadaniHaryono <foreturiga@gmail.com> 1603896594 +0800 committer rachmadaniHaryono <foreturiga@gmail.com> 1603896619 +0800 chg: dev: debug engine_shortcuts chg: dev: only initilize if engine is given chg: dev: split main chg: dev: standalone_searx chg: dev: update standalone_searx chg: doc: remove unnecessary log chg: test: differentiate travis chg: test: disable shortcut chg: test: use default engine settings fix: dev: category choices fix: dev: duplicate engine shortcut fix: dev: travis python3 fix: test: use empty string as shortcut fix: test: apkm fix: test: engine shortcut fix: test: mypy fix: test: parameter fix: test: pep8 fix: test: py2 compatibilities fix: test: searx settings fix: test: travis engines new: dev: deduplicate engine new: dev: main receive engines parameter new: dev: parse_argument accept engines parameter new: dev: split search query from get_result func new: test: basic result case Suggestions: use RawTextQuery to make the suggestions URLs. Update all themes accordingly. * new: doc: searx import and init * chg: dev: parse_argument - doc - run on __main__ - simple parse_args * chg: doc: module * chg: dev: import section - remove unused python path modification - new required package * chg: dev: script run - parse_argument func return directly parsed results - main func return dict instead json text - dump directly on sys.stdout.write * chg: dev: get_search_query and get_search_query func * chg: dev: main func - move inner function outside - return dict instead of json text * new: dev: add utils to doc sys path * new: doc: standalone_searx * fix: doc: run script * chg: dev: mypy type hint * chg: dev: SearchQuery don't have attr engines * chg: dev: reset engines __init__ * chg: test: unit test update * chg: dev: pylint and flake8 * new: test: standalone_searx * chg: dev: main func and doc * chg: dev: import and type hint * new: dev: main func - remove get_result func - single func which just translate dict * chg: test: put mypy on dev requirement * chg: doc: update * new: doc: add standalone_searx module member * chg: doc: shell command line * chg: dev: remove mypy * chg: doc: module docstring
2020-10-30[mod] make docs-live - remove --port option from sphinx-autobuildMarkus Heiser
Setting port fixed to 8080 has drawbacks when this port is already in use from another application [1]. Removing this option from the command line offers the use of the sphinx-autobuild defaults which are much more flexible [2]. [1] https://github.com/searx/searx/issues/2282 [2] https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-10-28[mod] .travis.yml: build documentation automatically on the master branchAlexandre Flament
2020-10-28[mod] add external_urls.json and wikidata_units.jsonAlexandre Flament
2020-10-25add Ahmia filter plugin for onion resultsMarc Abonce Seguin
2020-10-19Fix typo chmod searx:searx > chown searx:searxrenyhp
2020-09-28[fix] migration from github.com/asciimoo/searx to github.com/searx/searx : ↵Alexandre Flament
fix URLs
2020-09-28Merge pull request #2189 from dalf/architecture-clean-upAdam Tauber
Architecture clean up
2020-09-28[fix] Update Sphinx package versionsAlexandre Flament
* Update call to sphinx-autobuild (remove --poll -B options, add --open-browser) * Upgrade the Sphinx and sphinx-tabs versions. * utils/makefile.sphinx: remove the SPHINXVERS variable. * utils/makefile.sphinx: remove the sphinx-doc and sphinx-live targets, Sphinx is already installed by the pyenvinstall target.
2020-09-22[mod] add typing and __slots__Alexandre Flament
2020-09-22[mod] check the engine tokens in searx/webadapter.py instead of searx/search.pyAlexandre Flament
2020-09-22[mod] add searx/webadapter.pyAlexandre Flament
* move searx.search.get_search_query_from_webapp to searx.webadapter * move searx.query.SearchQuery to searx.search
2020-09-22fix utils/fetch_languages to work with new languagesMarc Abonce Seguin
2020-09-20[fix] remove doc-build for centos-7 from './utils/searx.sh doc'Markus Heiser
Since there is no centos-7 documentation 'searx.sh doc' produce an error message:: ERROR: centos-: uWSGI not yet implemented Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-08-08[enh] add centos-7 to LXC images (#2118)Markus Heiser
## What does this PR do? To test centos-7 on non centos systems add centos-7 image to the LXC suite. ## Why is this change important? PR #2112 adds centos-7 support to the install scripts ## How to test this PR locally? `sudo ./utils/lxc.sh build searx-centos7`
2020-08-01Utility scripts adapted to run on CentOS 7 (#2112)Eliesemoule
2020-07-11[fix] external_bang - UnicodeDecodeError: 'ascii' codec can't decode (#2043)Markus Heiser
Python's default encoding depends on the platform, set (python) default encoding UTF-8 in uwsgi ini files: LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 Error pattern: Traceback (most recent call last): File "/usr/local/searx/searx-src/searx/webapp.py", line 74, in <module> from searx.search import SearchWithPlugins, get_search_query_from_webapp File "/usr/local/searx/searx-src/searx/search.py", line 32, in <module> from searx.external_bang import get_bang_url File "/usr/local/searx/searx-src/searx/external_bang.py", line 13, in <module> for bang in json.load(json_file)['bang']: File "/usr/lib/python3.8/json/__init__.py", line 293, in load return loads(fp.read(), File "/usr/lib/python3.8/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 31341: ordinal not in range(128) close: https://github.com/asciimoo/searx/issues/2041 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-06-29Merge branch 'master' into gigablastMarkus Heiser
2020-06-24[fix] markup of auto generated installation instruction (uWSGI part)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-06-19Merge branch 'master' into gigablastMarkus Heiser
2020-06-18[fix] buildprocess of the docs by adding sphinx-doc-prebuilds targetMarkus Heiser
The sphinx-doc-prebuilds is the single point of definition for prerequisites each doc build needs BTW: remove $(LXC_ENV_FOLDER) offset from BOOKS_FOLDER and DOCS_FOLDER path. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-06-18[fix] add missing latexmk package to debian's BUILD_PACKAGESMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-06-18[fix] indentation of filtron's rules (json)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-05-28utils/fetch_languages.py: print more meaningfull messagesMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-05-21[fix] installation instructions: pip install -e searx (setup.py)Markus Heiser
In the past we did not really install searx into the virtualenv. This is a problem, since entry-points and other python installation stuff is not trigger. See discussion: https://github.com/asciimoo/searx/pull/1938#issuecomment-632056508 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-05-04archlinux: add package 'inetutils' to boilerplateMarkus Heiser
Even it is a core component, some hoster do not have pre installed the 'inetutils' package. We do need this package for the 'hostname' command. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-30[fix] fatal: repository '/root/searx' does not existMarkus Heiser
The $SERVICE_USER (searx) needs read permission to clone repository. The installation script stops if permission is not granted. - https://github.com/asciimoo/searx/pull/1803#issuecomment-616406528 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-28utils/morty.sh option new-key: set new morty keyMarkus Heiser
A command to set new morty key in morty & searx service (settings.yml) and to restart both services with new key:: utils/morty.sh option new-key Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-28utils/morty.sh: set morty key to avoid service abuseMarkus Heiser
- https://github.com/asciimoo/searx/issues/1871#issuecomment-592459798 make install all generates random MORTY_KEY, install service with that key and sets option in the searx settingy.yml file. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-23Merge branch 'master' of https://github.com/asciimoo/searx into filtronMarkus Heiser
2020-04-22[fix] old images need an initial 'apt update'Markus Heiser
see https://github.com/asciimoo/searx/pull/1803#issuecomment-616684353 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-22[fix] ffox useragent: use Windows NT 10.0 and not Windows NT 10Markus Heiser
This is an addittion to PR #1934: The .0 change really counts on some engines like Bing which seems to allow Windows NT 10.0 but not Windows NT 10. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-13tooling box: added nginx + polished bash scripts and environmentMarkus Heiser
- add installation method for nginx sites, morty and filtron - clean up PUBLIC_URL environment in and outside of containers - clean up comand lines - handle uWSGI quirks on fedora (emperor mode) - handle Python quirks on debian (there is no 'python' command anymore) - lib.sh: add die and die_caller functions - lxc_suite_install_info is now a function - lint: shellcheck Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>