Age | Commit message (Collapse) | Author |
|
Related-to: https://github.com/searxng/searxng/pull/1029#issuecomment-1086824911
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
In v2.1.0 werkzeug [1] fixed an issue [2] to keep relative redirect locations by
default [3]. Since relative locations are returned, we need to fix out test
cases to avoid AssertionErrors like this one::
======================================================================
FAIL: test_index_html_get (tests.unit.test_webapp.ViewsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/searxng/searxng/tests/unit/test_webapp.py", line 105, in test_index_html_get
self.assertEqual(result.location, 'http://localhost/search?q=test')
AssertionError: '/search?q=test' != 'http://localhost/search?q=test'
- /search?q=test
+ http://localhost/search?q=test
[1] https://werkzeug.palletsprojects.com/
[2] https://github.com/pallets/werkzeug/issues/2352 fixed in
[3] https://github.com/pallets/werkzeug/pull/2354
Related-to: https://github.com/searxng/searxng/pull/1039#issuecomment-1085538288
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
[enh] simple: basic ARIA fixes
|
|
This patch implements a bolierplate to share content from info-pages of the
SearXNG instance (URL /info) with the project documentation (path /docs/user).
The info pages are using Markdown (CommonMark), to include them in the project
documentation (reST) the myst-parser [1] is used in the Sphinx-doc build chain.
If base_url is known (defined in settings.yml) links to the instance are also
inserted into the project documentation::
searxng_extra/docs_prebuild
[1] https://www.sphinx-doc.org/en/master/usage/markdown.html
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
|
|
* allow to cache the static file forever
* avoid bugs when the static files are updated but not reloaded
|
|
* drop image_layout.js from simple theme
* move image_layout.js to oscar theme and delete common js dir (since its empty now)
* align top position of image detail modal with bottom position of search header
* use flexbox to display images; row height can be set via @results-image-row-height in defenitions.less
* display span title underneath each image with a max width of 12rem
* increase margin and padding around image article on desktop and tablet
* make article height smaller on phone layout (height of 6rem) to display more content on current view
* remove content from result, if the title and content matches
* use a group that cotains the flex image article, if images are mixed with other categories
* fix pylint issues in webapp.py
* use the default.html result template in unit tests (thanks @return42)
|
|
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Introduce `/help` route
|
|
[mod] add documentation about searx.utils
|
|
Otherwise you can change the value of a select,
refresh the page and the preferences stay changed,
leaving the wrong impression that they were saved.
|
|
Translation will be implemented in the future.
For now the "en" in /help/en/<pagename> is hardcoded.
|
|
Now that about.html extends page_with_header.html
it already has a link to the start page and removing
the link makes it easier to extract the page title
from the Markdown for the following commit.
|
|
This module is a toolbox for the engines.
Is should be documented.
In addition, searx/utils.py is checked by pylint.
|
|
|
|
Bangs with a `*` suffix (e.g. `!!d*`) overwrite Bangs with the same
prefix (e.g. `!!d`) [1]. This can be avoid when a non printable character is
used to tag a LEAF_KEY.
[1] https://github.com/searxng/searxng/pull/740#issuecomment-1010411888
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
Refactor `preferences`
|
|
The previous implementation used two hash sets and a list.
... that's not necessary ... a single hash map suffices.
And it's also less error prone ... because the previous data structure
allowed a setting to be enabled and disabled at the same time.
|
|
Previously the Setting classes used a horrible _post_init
hack that prevented proper type checking.
|
|
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.
|
|
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.
|
|
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>
|
|
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
|
|
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>
|
|
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>
|
|
|