- Add ``# lint: pylint`` header to pylint this python file.
- Fix issues reported by pylint.
- Add source code documentation of modul searx.locales
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In ./manage implement babel.*:
- extract : extract messages from source files and generate POT file
- update : update existing message catalogs from POT file
- compile : compile translation catalogs into binary MO files
Replace searx_extra/update/update_translations.sh by command:
- ci.babel.update
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
the script expects searx/translations/messages.pot to be commited
it calls "pybabel extract", and if there is a meaningful change,
it calls "pybabel update"
exit code 0 when there is a change in messages.pot
In commit 4d3f2f48d common used languages has been droped. By reducing the
number of `min_engines_per_lang` from 15 to 13 we get theses languages back.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In commit 4b43775c9 the brand.git_url & brand.git_branch has been removed, with
this patch these settings are removed from the documentation.
docs/admin/engines/settings.rst
- Remove brand.git_url & brand.git_branch
docs/dev/makefile.rst
- Remove brand.git_url & brand.git_branch
modified docs/dev/lxcdev.rst
- Remove brand.git_url & brand.git_branch
- fix searXNG to SearXNG
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
The first import of names from the searx package implies loading the
settings.yml. Before this is done, the enviroment variables must be unset to
not overwrite the values from the settings.yml
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit remove the need to update the brand for GIT_URL and GIT_BRANCH:
there are read from the git repository.
It is possible to call python -m searx.version freeze to freeze the current version.
Useful when the code is installed outside git (distro package, docker, etc...)
Deny formats has been implemented in 6ed4616d.
To harden SearXNG instances by default, other formats than HTML should be
denied. Most of JSON, RSS and CSV requests are bots [1]::
Bots are the only users of this feature on a public instance, and they abuse
it too much that the engines rate limit pretty quickly the IP address of the
instance.
[1] https://github.com/searxng/searxng/issues/95
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In unit tests settings from
searx/settings.yml
and the user settings from:
unit/settings/test_settings.yml
are used. In the latter, settings can be activated that are needed in the unit
test but should not activated by default in production.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Do not merge this patch in master branch of SearXNG! This branch exists only
for testing the feature branch fix-searx.sh @return42.
This patch changes the buildenv to::
GIT_URL='https://github.com/return42/searxng'
GIT_BRANCH='fix-searx.sh'
SEARX_PORT='7777'
SEARX_BIND_ADDRESS='127.0.0.12'
To test installation procedure, clone feature branch (fix-searx.sh)::
$ cd ~/Downloads
$ git clone --branch fix-searx.sh https://github.com/return42/searxng searxng
$ cd searxng
$ ./utils/searx.sh install all
...
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
The filtron target is the SearXNG installation and the default of FILTRON_TARGET
is taken from the YAML configuration ('server.port' & 'server.bind_address').
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Some defaults in the settings.yml are taken from the environment.
By example;
The manage scripts sources the ./utils/brand.env and sets SEARX_PORT
environment. This enviroment *wins over* any settings in a YAML file.
Whe we run a::
make test.robot
The searx/settings_robot.yml is used, in this file the server settings are::
server:
port: 11111
bind_address: 127.0.0.1
To get in use of the 'port: 11111' we have to unset the SEARX_PORT environment
which was sourced before.
The function buildenv.unset_env() can be called in all use cases where the
enviroment from ./utils/brand.env is not wanted. ATM it unset the enviroment
variables::
unset GIT_URL
unset GIT_BRANCH
unset SEARX_URL
unset SEARX_PORT
unset SEARX_BIND_ADDRESS
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>