searxng/searxng_extra/update
Markus Heiser 5fca26f0b3 [mod] engines_languages.json: add new type engine_properties
This patch adds the boilerplate code, needed to fetch properties from engines.
In the past we only fetched *languages* but some engines need *regions* to
parameterize the engine request.

To fit into our *fetch language* procedures the boilerplate is implemented in
the `searxng_extra/update/update_languages.py` and the *engine_properties* are
stored along in the `searx/data/engines_languages.json`.

This implementation is downward compatible to the `_fetch_fetch_languages()`
infrastructure we have.  If there comes the day we have all
`_fetch_fetch_languages()` implementations moved to `_fetch_engine_properties()`
implementations, we can rename the files and scripts.

The new type `engine_properties` is a dictionary with keys `languages` and
`regions`.  The values are dictionaries to map from SearXNG's language & region
to option values the engine does use::

    engine_properties = {
        'type' : 'engine_properties',  # <-- !!!
        'regions': {
            # 'ca-ES' : <engine's region name>
        },
        'languages': {
            # 'ca' : <engine's language name>
        },
    }

Similar to the `supported_languages`, in the engine the properties are available
under the name `supported_properties`.

Initial we start with languages & regions, but in a wider sense the type is
named *engine properties*.  Engines can store in whatever options they need and
may be in the future there is a need to fetch additional or complete different
properties.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-19 14:35:02 +02:00
..
__init__.py SearXNG: searxng_extra 2021-10-02 17:30:39 +02:00
update_ahmia_blacklist.py [pylint] add scripts from searxng_extra/update to pylint 2022-01-05 16:09:40 +01:00
update_currencies.py [pylint] add scripts from searxng_extra/update to pylint 2022-01-05 16:09:40 +01:00
update_engine_descriptions.py [pylint] add scripts from searxng_extra/update to pylint 2022-01-05 16:09:40 +01:00
update_external_bangs.py [fix] external bangs: don't overwrite Bangs in data trie 2022-01-12 19:37:13 +01:00
update_firefox_version.py [fix] pylint issue in py3.10 2022-03-25 08:39:40 +01:00
update_languages.py [mod] engines_languages.json: add new type engine_properties 2022-04-19 14:35:02 +02:00
update_osm_keys_tags.py [docs] add documentation for the scripts in searxng_extra/update 2022-01-05 16:09:40 +01:00
update_pygments.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
update_wikidata_units.py [docs] add documentation for the scripts in searxng_extra/update 2022-01-05 16:09:40 +01:00