Age | Commit message (Collapse) | Author |
|
The ? search operator has been broken for some time and
currently only raises the question why it's still there.
## Context ##
The query "Paris !images" searches for "Paris" in the "images" category.
Once upon a time Searx supported "Paris ?images" to search for "Paris"
in the currently enabled categories and the "images" category.
The feature makes sense ... the ? syntax does not.
We will hopefully introduce a +!images syntax in the future.
Fixes #702.
|
|
Introduce `categories_as_tabs` & group engines in tabs
|
|
Upgrade httpx
|
|
httpx 0.21.2 and httpcore 0.14.4 fix multiple issues:
* https://github.com/encode/httpx/releases/tag/0.21.2
* https://github.com/encode/httpcore/releases/tag/0.14.4
so most of the workarounds in searx.network have been removed.
|
|
The tab icon names are currently hard coded in the templates.
This commit lets us introduce an icon property in the future, e.g:
categories_as_tabs:
general:
icon: search-outline
|
|
Previously all categories were displayed as search engine tabs.
This commit changes that so that only the categories listed under
categories_as_tabs in settings.yml are displayed.
This lets us introduce more categories without cluttering up the UI.
Categories not displayed as tabs can still be searched with !bangs.
|
|
|
|
secret_key can't be bytes (see settings_default.py)
|
|
Fix pylint issues from commit (3d96a983)
[format.python] initial formatting of the python code
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
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>
|
|
Disable the python code formatting from python-black, where the readability of
code suffers by formatting.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
[fix] interface language zh_CN and zh_TW don't work
|
|
|
|
pybabel separates locales with underscores but we use hyphens
everywhere babel doesn't directly touch
|
|
based on @MarcAbonce commit on searx
|
|
add a new function "init" call when the app starts.
The function can:
* return False to disable the plugin.
* modify the Flask app.
|
|
SearXNG: searx_extra
|
|
|
|
|
|
|
|
|
|
If there is no write access, there is no need for global. Remove global
statement if there is no assignment.
global-variable-not-assigned:
Using global for names but no assignment is done Used when a variable is
defined through the "global" statement but no assignment to this variable is
done.
In Pylint 2.11 the global-variable-not-assigned checker now catches global
variables that are never reassigned in a local scope and catches (reassigned)
functions [1][2]
[1] https://pylint.pycqa.org/en/latest/whatsnew/2.11.html
[2] https://github.com/PyCQA/pylint/issues/1375
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
debug mode: more readable logging
|
|
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
in debug mode, add some padding to make the output more readable
in procution mode, add the timestamp
|
|
see #247
|
|
move robot tests to tests.robot
manage calls "python -m tests.robot"
|
|
Pylint 2.10 added new default checks [1]:
redundant-u-string-prefix:
Emitted when the u prefix is added to a string
[1] https://pylint.pycqa.org/en/latest/whatsnew/2.10.html
[2] https://github.com/PyCQA/pylint/issues/4102
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
pre_request already set the locale.
|
|
There are detected from the searx/translations directory
|
|
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>
|
|
close #115
|
|
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Fixed messages reported by::
make test.yamllint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
Add a new environment variable SEARX_DISABLE_ETC_SETTINGS
to disable loading of /etc/searx/settings.yml
unit tests:
* set SEARX_DISABLE_ETC_SETTINGS to 1
* remove SEARX_SETTINGS_PATH if it exists
|
|
tests/units/network/test_network.py requires a call to searx.network.network.initialize
Depending of the test order execution, this function was sometimes call in another test,
sometimes not.
This commit ensure there is a call to initialize()
|
|
it prepares the new architecture change,
everything about multithreading in moved in the searx.search.* packages
previously the call to the "init" function of the engines was done in searx.engines:
* the network was not set (request not sent using the defined proxy)
* it requires to monkey patch the code to avoid HTTP requests during the tests
|
|
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
|
|
|
|
patch engine initialization to skip HTTP request
(engine_init function in searx.engines.initialize_engines)
|
|
|
|
Add searx_extra package
|