summaryrefslogtreecommitdiff
path: root/searx/sxng_locales.py
AgeCommit message (Collapse)Author
2024-11-29[data] update searx.data - update_engine_traits.pyreturn42
2024-10-15[data] update searx.data - update_engine_traits.pyMarkus Heiser
Patches generated by:: make data.traits Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-29[data] update searx.data - update_engine_traits.pyMarkus Heiser
$ make data.traits Last GH action has been failed [1], the bugfixes from aa05685cc were necessary to update the data. [1] https://github.com/searxng/searxng/actions/runs/10135834050/job/28023757191 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-06-25[data] update searx.data - update_engine_traits.pyMarkus Heiser
$ make data.traits Last GH action has been failed [1], the bugfixes from - https://github.com/searxng/searxng/pull/3611 - https://github.com/searxng/searxng/pull/3612 were necessary to update the data. [1] https://github.com/searxng/searxng/actions/runs/9278028691/job/25528337485 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11[mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTIONMarkus Heiser
In the past, some files were tested with the standard profile, others with a profile in which most of the messages were switched off ... some files were not checked at all. - ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished - the distinction ``# lint: pylint`` is no longer necessary - the pylint tasks have been reduced from three to two 1. ./searx/engines -> lint engines with additional builtins 2. ./searx ./searxng_extra ./tests -> lint all other python files Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-20[mod] reduce memory footprint by not calling babel.Locale.parse at runtimeAlexandre Flament
babel.Locale.parse loads more than 60MB in RAM. The only purpose is to get: LOCALE_NAMES - searx.data.LOCALES["LOCALE_NAMES"] RTL_LOCALES - searx.data.LOCALES["RTL_LOCALES"] This commit calls babel.Locale.parse when the translations are update from weblate and stored in:: searx/data/locales.json This file can be build by:: ./manage data.locales By store these variables in searx.data when the translations are updated we save round about 65MB (usually 4 worker = 260MB of RAM saved. Suggested-by: https://github.com/searxng/searxng/discussions/2633#discussioncomment-8490494 Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-29Update searx.data - update_engine_traits.pydalf
2023-09-27Update searx.data - update_engine_traits.pyMarkus Heiser
Update searx.data - update_engine_traits.py Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-07-07[feat] engine: re-enables z-library (zlibrary-global.se)Paolo Basso
- re-enables z-library as the new domain zlibrary-global.se is now available from the open web. The announcement of the domain: https://www.reddit.com/r/zlibrary/comments/13whe08/mod_note_zlibraryglobalse_domain_is_officially/ It is an official domain, it requires to log in to the "personal" subdomain only to download files, but the search works. - changes the result template of zlibrary to paper.html, filling the appropriate fields - implements language filtering for zlibrary - implement zlibrary custom filters (engine traits) - refactor and document the zlibrary engine
2023-04-16Update searx.data - update_engine_traits.pyMarc Abonce Seguin
2023-03-24Update searx.data - update_engine_traits.pydalf
2023-03-24[mod] Archlinux Wiki: improved request API & upgrade to data_type: traits_v1Markus Heiser
re-implementation of the Archlinux Wiki: - fetch_traits(): fetch languages, wiki URLs and title arguments - add content field to the result list - add documentation Wikis from wiki.archlinux.fr, wiki.archlinux.ro, archtr.org/wiki do no longer exists (has been merged in the main wiki). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-24[mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1Markus Heiser
Partial reverse engineering of the DuckDuckGo (DDG) engines including a improved language and region handling based on the enigne.traits_v1 data. - DDG Lite - DDG Instant Answer API - DDG Images - DDG Weather docs/src/searx.engine.duckduckgo.rst: Online documentation of the DDG engines (make docs.live) searx/data/engine_traits.json Add data type "traits_v1" generated by the fetch_traits() functions from: - "duckduckgo" (WEB), - "duckduckgo images" and - "duckduckgo weather" and remove data from obsolete data type "supported_languages". searx/autocomplete.py: Reversed engineered Autocomplete from DDG. Supports DDG's languages. searx/engines/duckduckgo.py: - fetch_traits(): Fetch languages & regions from DDG. - get_ddg_lang(): Get DDG's language identifier from SearXNG's locale. DDG defines its languages by region codes. DDG-Lite does not offer a language selection to the user, only a region can be selected by the user. - Cache ``vqd`` value: The vqd value depends on the query string and is needed for the follow up pages or the images loaded by a XMLHttpRequest (DDG images). The ``vqd`` value of a search term is stored for 10min in the redis DB. - DDG Lite engine: reversed engineered request method with improved Language and region support and better ``vqd`` handling. searx/engines/duckduckgo_definitions.py: DDG Instant Answer API The *instant answers* API does not support languages, or at least we could not find out how language support should work. It seems that most of the features are based on English terms. searx/engines/duckduckgo_images.py: DDG Images Reversed engineered request method. Improved language and region handling based on cookies and the enigne.traits_v1 data. Response: add image format to the result list searx/engines/duckduckgo_weather.py: DDG Weather Improved language and region handling based on cookies and the enigne.traits_v1 data. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-24[mod] bing: add time_range support & upgrade to data_type: traits_v1Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-24[mod] replace searx.languages by searx.sxng_localesMarkus Heiser
With the language and region tags from the EngineTraitsMap the handling of SearXNG's tags of languages and regions has been normalized and is no longer a *mystery*. The "languages" became "locales" that are supported by babel and by this, the update_engine_traits.py can be simplified a lot. Other code places can be simplified as well, but these simplifications should (respectively can) only be done when none of the engines work with the deprecated EngineTraits.supported_languages interface anymore. This commit replaces searx.languages by searx.sxng_locales and fix the naming of some names from "language" to "locale" (e.g. language_codes --> sxng_locales). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>