Commit Graph
100 Commits
Author SHA1 Message Date
Alexandre Flament 0b27c8698f [doc] update docs/dev/plugins.rst 2021-09-10 10:58:22 +02:00
Alexandre Flament 70c9bb6f2c [fix] remove references to transifex 2021-09-09 21:29:55 +02:00
Alexandre Flament b941763e20 [mod] ahmia_filter: use on_result instead of post_search
see commit 6c9ae7911e9639bc46cd53af215734b4bdb61ba9
2021-09-09 11:31:46 +02:00
Alexandre Flament 660c180170 [mod] plugin: call on_result after each engine from the ResultContainer
Currently, searx.search.Search calls on_result once the engine results have been merged
(ResultContainer.order_results).

on_result plugins can rewrite the results: once the URL(s) are modified, even they can be merged,
it won't be the case since ResultContainer.order_results has already be called.

This commit call on_result inside for each result of each engines.
In addition the on_result function can return False to remove the result.

Note: the on_result function now run on the engine thread instead of the Flask thread.
2021-09-09 11:31:44 +02:00
Alexandre Flament 1973e4ecf6 Merge pull request #303 from return42/fix-README
[fix] README - fix minor typo
2021-09-08 09:39:45 +02:00
Alexandre Flament fc20c561bf [mod] oa_doi_rewrite plugin: get_doi_resolver: remove args parameter
doi_resolvers.get_value('preferences') already contains the value from
request.args.get('doi_resolver')
2021-09-07 19:14:36 +02:00
Alexandre Flament a3789b3bb4 Merge pull request #295 from return42/fix-csp-2
[fix] make HTML templates more CSP compliant
2021-09-07 18:51:00 +02:00
Alexandre Flament e41f78b806 Merge pull request #301 from return42/fix-lintrc
[pylint] .pylintrc - disable missing-function-docstring
2021-09-07 15:09:40 +02:00
Alexandre Flament 9ef7f38e4f Merge pull request #300 from return42/fix-engine-pylint
[fix] drop useless pylint: disable=undefined-variable
2021-09-07 10:43:16 +02:00
Alexandre Flament f869e73d2f Merge pull request #299 from dalf/fix-osm-workaround
[fix] fix openstreetmap engine
2021-09-06 22:54:27 +02:00
Alexandre Flament ea60c03827 [fix] fix openstreetmap engine
close #298

This is a workaround: inside engine code, any call to function in another engine can crash
since the logger won't be initialized except if it is done explicitly.
2021-09-06 22:44:22 +02:00
Alexandre Flament b57d776edb Merge pull request #293 from dalf/fix-290
[fix] translation: lock weblate only when there is an actual change of messages.pot
2021-09-06 20:00:19 +02:00
Alexandre Flament 17e739a859 Merge pull request #296 from return42/engine-logger
one logger per engine
2021-09-06 19:50:58 +02:00
Alexandre Flament 2a5f690a71 [fix] translation: lock weblate only when there is an actual change of messages.pot
Close #290
2021-09-06 17:16:51 +02:00
Alexandre Flament a26e4eff10 Merge pull request #292 from return42/fix-csp
[fix] make HTML templates more CSP compliant
2021-09-06 11:45:15 +02:00
Alexandre Flament 33ea1d5909 Merge pull request #289 from return42/fix-xpath
[fix] remove minimum length of content for XPath engine
2021-09-04 15:34:18 +02:00
Alexandre Flament 39bbd15b39 Merge pull request #287 from return42/azlyrics
[enh] add engine AZLyrics.com (XPath)
2021-09-04 13:36:09 +02:00
Alexandre Flament 3b1acdd5c5 Merge pull request #288 from return42/enh-brave
[enh] add suggestions to brave engine
2021-09-04 13:25:42 +02:00
Alexandre Flament 2f348216b0 Merge pull request #283 from searxng/update-readme
README.rst: differences with searx
2021-09-03 16:58:55 +02:00
Alexandre Flament 94458b4881 README.rst: differences with searx 2021-09-03 16:54:24 +02:00
Alexandre Flament a14ea6396e [mod] remove searx.raise_for_httperror
Not used anymore
2021-09-02 16:24:25 +02:00
Alexandre Flament a7d781c49d [mod] remove remaining references to locales in settings.yml
see #247
2021-09-02 16:19:18 +02:00
Alexandre Flament 3c377c0aa8 [mod] searx.webapp: code clean up 2021-09-02 16:16:20 +02:00
Alexandre Flament b9c73fb697 [mod] move searx/testing.py to the tests directory
move robot tests to tests.robot
manage calls "python -m tests.robot"
2021-09-02 16:01:34 +02:00
Alexandre Flament d246679dbe [build] /static 2021-08-31 15:43:28 +02:00
Alexandre Flament f77f797f8c [mod] simple theme: fix eslint errors, fix VIM keys
* VIM keys: fix the next page and previous pages (n, p keys)
* Map: Enable the wikipedia map (the layer was initialized but not included)
2021-08-31 15:41:31 +02:00
Alexandre Flament 66a27757fd Merge pull request #244 from return42/eslint-simple-client
[mod] simple theme - add ESLint
2021-08-31 13:24:06 +02:00
Alexandre Flament 0ee316f3d1 eslint: grunt integration 2021-08-31 12:20:23 +02:00
Alexandre Flament 7dc370efe9 [enh] new issue: include information from searx.version 2021-08-31 11:45:33 +02:00
Alexandre Flament 4494589227 Merge pull request #272 from searxng/dependabot/pip/master/yamllint-1.26.3
Bump yamllint from 1.26.2 to 1.26.3
2021-08-27 12:00:05 +02:00
Alexandre Flament 6edf98216f Merge pull request #274 from searxng/translations_update
Update translations
2021-08-27 11:59:40 +02:00
Alexandre Flament 38e0b9360b Merge pull request #257 from dalf/mod_image_proxy
Mod image proxy
2021-08-25 11:24:27 +02:00
Alexandre Flament 697ebeddcc [mod] searx.utils.dict_subset: rewrite with comprehension 2021-08-24 15:28:08 +02:00
Alexandre Flament 3b0f70ed0f [mod] /image_proxy: use HTTP/1 instead of HTTP/2
httpx: HTTP/2 is slow when a lot data is downloaded.
https://github.com/dalf/pyhttp-benchmark

also, the usage of HTTP/1 decreases the load average
2021-08-24 14:51:20 +02:00
Alexandre Flament 43fcaa642a [fix] image_proxy: always close the httpx respone
previously, when the content type was not an image and some other error,
the httpx response was not closed
2021-08-24 14:51:20 +02:00
Alexandre Flament df15c655f7 [mod] /image_proxy: don't decompress images 2021-08-24 14:51:20 +02:00
Alexandre Flament dec9df28f3 Merge pull request #264 from searxng/dependabot/pip/master/pygments-2.10.0
Bump pygments from 2.9.0 to 2.10.0
2021-08-24 09:36:58 +02:00
Alexandre Flament 6f9e3868d6 Merge pull request #267 from dalf/backport_google
[enh] google: add filter=0 to Google engine for more results
2021-08-21 17:51:18 +02:00
Alexandre Flament 102c815231 Merge pull request #265 from searxng/translations_update
Update translations
2021-08-20 11:44:11 +02:00
Alexandre Flament 6844e3a617 Merge pull request #263 from return42/fix-config
[fix] /config add missing GIT_BRANCH value
2021-08-18 20:04:26 +02:00
Alexandre Flament 771691e3b0 README.rst : add weblate link 2021-08-17 10:58:26 +02:00
Alexandre Flament 9760e763f1 Merge pull request #262 from searxng/translations_update
Update translations
2021-08-17 10:51:44 +02:00
Alexandre Flament 28b350eda6 Merge pull request #250 from dalf/weblate_v2
[translations] weblate integration
2021-08-17 10:38:50 +02:00
Alexandre Flament 28ccf47ca4 [mod] searx.webapp.get_locale: read locale from the preferences
pre_request already set the locale.
2021-08-17 08:18:30 +02:00
Alexandre Flament a925254c3d Merge pull request #258 from dalf/plugin_minor_change
[mod] plugins: minor change
2021-08-16 17:10:28 +02:00
Alexandre Flament 0b0071af00 Merge pull request #259 from dalf/fix_checker
[fix] searx.search.checker.get_result() always return a dict
2021-08-16 14:00:17 +02:00
Alexandre Flament 2f363858b8 [fix] searx.search.checker.get_result() always return a dict
So checker_results['status'] == 'ok' is enough to check the checker result.
See searx/webapp.py, /preferences endpoint
2021-08-16 08:29:16 +02:00
Alexandre Flament 3f3b5d6181 [mod] plugins: minor change
required attributes: display a different message
when the attribute has the wrong type
2021-08-14 18:03:31 +02:00
Alexandre Flament 9667142d5c Merge pull request #255 from searxng/dependabot/pip/master/uvloop-0.16.0
Bump uvloop from 0.15.3 to 0.16.0
2021-08-13 09:15:42 +02:00
Alexandre Flament 7f18cbbee0 Merge pull request #253 from return42/minor-fix
[fix] settings.yml - replace http:// URLs by https://
2021-08-07 18:12:44 +02:00
Alexandre Flament 901ab87717 [translations] web integration
* make babel.translations.to.master: pull weblate updates
* make babel.master.to.translations: push .pot and .po files to weblate
2021-08-07 15:06:06 +02:00
Alexandre Flament 4e2ec9b8b3 Merge pull request #247 from dalf/remote_settings_locales
settings.yml: remove locales section.
2021-08-04 11:05:13 +02:00
Alexandre Flament 0d20e5dfe3 [mod] searx/locales.py: language names based on Unicode CLDR
rename "oc" to "Occitan":
* https://github.com/unicode-org/cldr/blob/35.1/seed/main/oc.xml#L115
* https://oc.wikipedia.org/wiki/Occitan

see https://github.com/searxng/searxng/pull/247#issuecomment-892382001
2021-08-04 09:50:34 +02:00
Alexandre Flament f30d01ffab [mod] settings.yml: remove locales
There are detected from the searx/translations directory
2021-08-03 15:44:45 +02:00
Alexandre Flament bd17544f82 [fix] make test.robot: firefox profile: intl.accept_languages=en
make sure Firefox in test.robot asks for English pages
2021-08-03 15:11:51 +02:00
Alexandre Flament 34ffd08187 Merge pull request #235 from searxng/dependabot-npm
dependabot.yml: check npm packages
2021-08-02 11:15:56 +02:00
Alexandre Flament 83b973d401 Merge pull request #238 from dalf/update_babel
Automatic update of searx/translations/messages.pot and messages.po files.
2021-08-02 11:04:37 +02:00
Alexandre Flament 7fa7177759 Update translations (pot, po) 2021-08-02 09:44:13 +02:00
Alexandre Flament 49aa7822d9 github workflow: babel jobs to update messages.pot 2021-08-02 09:44:13 +02:00
Alexandre Flament 32263ea637 remove .tx directory (transifex) 2021-08-02 09:44:13 +02:00
Alexandre Flament d1fb3c2592 babel: update searx_extra/update/update_translations.sh
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
2021-08-02 09:44:13 +02:00
Alexandre Flament efc81ca3dc babel.cfg: ignore node_modules directories
The NPM packages contains python scripts: they should be included by "pybabel extract"
2021-08-02 09:44:13 +02:00
Alexandre Flament b6711ba0ad Merge pull request #241 from searxng/update_data_update_languages.py
Update searx.data - update_languages.py
2021-08-02 09:01:57 +02:00
Alexandre Flament a7a181064f manage script: remove unused reference to utils/brand.env and .config.sh 2021-08-01 07:05:00 +02:00
Alexandre Flament 4ca318aad2 dependabot.yml: check npm packages 2021-07-31 09:56:57 +02:00
Alexandre Flament 38ee88b390 Merge pull request #229 from dalf/version-from-git
version based on git
2021-07-30 18:57:00 +02:00
Alexandre Flament 4b43775c91 version based on the git repository
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...)
2021-07-30 14:40:09 +02:00
Alexandre Flament feef577f99 Merge pull request #230 from dalf/remove-zh-hant-tw
Remove zh_Hant_TW translation
2021-07-28 08:34:09 +02:00
Alexandre Flament 0b2dca088f Remove zh_Hant_TW translation
See https://github.com/searxng/searxng/issues/195#issuecomment-887518808
2021-07-27 18:54:25 +02:00
Alexandre Flament ed0db4d61a Merge pull request #226 from return42/hardening
[mod] hardening SearXNG instances by default (formats)
2021-07-27 11:22:18 +02:00
Alexandre Flament 24fcd7475a Revert "[brand] !!DO NOT MERGE!! this patch uses branch fix-searx.sh @return42"
This reverts commit e946c3462c.
2021-07-27 08:40:53 +02:00
Alexandre Flament 48fe83b901 Merge pull request #221 from dalf/fix-peertube_fetch_supported_languages
[fix] peertube: update _fetch_supported_languages
2021-07-25 10:30:53 +02:00
Alexandre Flament cb4220657c Merge pull request #223 from return42/fix-qwant
[fix] qwant engine - hardening the engine
2021-07-25 10:30:41 +02:00
Alexandre Flament b0a12924a0 [fix] peertube: update _fetch_supported_languages
update the regex to match the changes in peertube source code
fix "make data.languages"
2021-07-23 12:03:16 +02:00
Alexandre Flament b1100e2b7d [fix] /preferences: remove the empty engine category "social medias" (it is "social media") 2021-07-23 10:43:16 +02:00
Alexandre Flament 4f0d232a3d Merge pull request #213 from return42/drop-brand
[mod] drop searx.brand namespace
2021-07-21 14:27:49 +02:00
Alexandre Flament 17e028e579 Merge pull request #106 from searxng/dependabot/pip/master/flask-2.0.1
Bump flask from 1.1.2 to 2.0.1
2021-07-19 10:41:10 +02:00
Alexandre Flament 555bea6f24 Merge pull request #89 from searxng/dependabot/pip/master/jinja2-3.0.1
Bump jinja2 from 2.11.3 to 3.0.1
2021-07-17 14:57:05 +02:00
Alexandre Flament f523fd3ea7 Merge pull request #211 from MarcAbonce/onions_v3_fix_searxng
Update onion engines to v3
2021-07-16 17:25:37 +02:00
Alexandre Flament 5f4d05db33 Merge pull request #210 from searxng/dependabot/pip/master/sphinx-4.1.1
Bump sphinx from 4.0.2 to 4.1.1
2021-07-16 16:16:05 +02:00
Alexandre Flament d47b8e36cf Merge pull request #207 from return42/mongodb
[enh] add mongodb offline engine
2021-07-16 16:15:01 +02:00
Alexandre Flament 401f7d38f6 Merge pull request #209 from searxng/dependabot/pip/master/python-dateutil-2.8.2
Bump python-dateutil from 2.8.1 to 2.8.2
2021-07-16 15:58:33 +02:00
Alexandre Flament 8237cb557e Merge pull request #206 from return42/improve-qwant
[mod] improve video results of the qwant engine
2021-07-16 15:33:56 +02:00
Alexandre Flament 0d65a81b1c [mod] qwant engine: fix typos / minor change
minor modification of commit 628b5703f3
(no functionnal change)
2021-07-16 15:32:12 +02:00
Alexandre Flament 1ba3e5afa0 Merge pull request #208 from searxng/dependabot/pip/master/uvloop-0.15.3
Bump uvloop from 0.15.2 to 0.15.3
2021-07-16 10:03:56 +02:00
Alexandre Flament f376b4ed3e Merge pull request #205 from unixfox/patch-2
Add missing parameter for mobile UI search
2021-07-15 17:19:12 +02:00
Alexandre Flament 7efb527719 Merge pull request #204 from return42/fix-qwant
[fix] Qwant engine - implement API v3 and add engine "qwant videos"
2021-07-15 17:19:06 +02:00
Alexandre Flament ff180cf2db Merge pull request #203 from return42/drop-dogpile
[fix] drop engine dogpile
2021-07-13 15:58:37 +02:00
Alexandre Flament 4f09c7ba0c Merge pull request #201 from return42/drop-torrentz
[drop] engine torrentz: torrentz2.eu and torrentz2.is are offline
2021-07-12 08:22:49 +02:00
Alexandre Flament 961dd287a1 Merge pull request #185 from searxng/update_data_update_external_bangs.py
Update searx.data - update_external_bangs.py
2021-07-01 18:43:18 +02:00
Alexandre Flament 508195a850 Merge pull request #186 from searxng/update_data_update_wikidata_units.py
Update searx.data - update_wikidata_units.py
2021-07-01 18:41:54 +02:00
Alexandre Flament 89a27f4f96 Merge pull request #187 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2021-07-01 18:41:43 +02:00
Alexandre Flament 1446f5a582 Merge pull request #188 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2021-07-01 18:41:31 +02:00
Alexandre Flament 30e4a2a224 Merge pull request #174 from searxng/static_script
[mod] add make targets to manage the build files in the /searx/static directory
2021-06-28 10:53:32 +02:00
Alexandre Flament d29094579b [build] /static 2021-06-28 10:39:10 +02:00
Alexandre Flament 7308709b8b Merge pull request #179 from return42/brave
[enh] add Brave-Search engine (XPath)
2021-06-28 09:23:25 +02:00
Alexandre Flament b2da675e27 Merge pull request #180 from return42/unicode-url
[fix] decoding of saved preferences in the URL
2021-06-28 08:47:25 +02:00
Alexandre Flament 0606cde105 [mod] add make targets to manage the build files in the /searx/static directory
The idea is to avoid conflict when there are differents branches with changes are made on the static files.
A solution is to ask the administrators to build the files from the sources, but it requires to install the npm dependencies.
So the solution in this commit keep the sources and the build files in the same git repository.

In one branch, the modification of the source (*.less, *.js) are commited without the built files.
The built files are commited in a uniq commit, with a commit message "Static build"
In case of merge or rebase, this commit can be dropped.

New make targets:
* static.build.commit.drop:
    drop the last "Static build".
    The command checks that there are only build files in the commit.
* static.build.commit :
    call "make static.build.commit.drop"
    call "make themes.all"
    commit the files
* static.git.restore.staged:
    git restore --staged <build files>
* static.git.restore:
    git restore <build files>

Related to https://github.com/searxng/searxng/issues/137
2021-06-26 13:13:31 +02:00
Alexandre Flament 4b60c557a9 Merge pull request #177 from unixfox/patch-1
Set use_mobile_ui to false for Google engine
2021-06-26 12:19:21 +02:00
Alexandre Flament 560e503285 README.rst: remove searx logo. 2021-06-25 11:10:54 +02:00