mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00

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>
75 lines
2 KiB
ReStructuredText
75 lines
2 KiB
ReStructuredText
.. _configured engines:
|
|
|
|
==================
|
|
Configured Engines
|
|
==================
|
|
|
|
.. sidebar:: Further reading ..
|
|
|
|
- :ref:`engines-dev`
|
|
- :ref:`settings engine`
|
|
|
|
Explanation of the :ref:`general engine configuration` shown in the table
|
|
:ref:`configured engines`.
|
|
|
|
.. jinja:: searx
|
|
|
|
SearXNG supports {{engines | length}} search engines (of which {{enabled_engine_count}} are enabled by default).
|
|
|
|
{% for category, engines in categories_as_tabs.items() %}
|
|
|
|
{{category}} search engines
|
|
---------------------------------------
|
|
|
|
{% for group, engines in engines | group_engines_in_tab %}
|
|
|
|
{% if loop.length > 1 %}
|
|
{{group}}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
{% endif %}
|
|
|
|
.. flat-table::
|
|
:header-rows: 2
|
|
:stub-columns: 1
|
|
|
|
* - :cspan:`5` Engines configured by default (in :ref:`settings.yml <engine settings>`)
|
|
- :cspan:`3` :ref:`Supported features <engine file>`
|
|
|
|
* - Name
|
|
- Shortcut
|
|
- Module
|
|
- Disabled
|
|
- Timeout
|
|
- Weight
|
|
- Paging
|
|
- Language, Region
|
|
- Safe search
|
|
- Time range
|
|
|
|
{% for mod in engines %}
|
|
|
|
* - `{{mod.name}} <{{mod.about and mod.about.website}}>`_
|
|
- ``!{{mod.shortcut}}``
|
|
- {%- if 'searx.engines.' + mod.__name__ in documented_modules %}
|
|
:py:mod:`~searx.engines.{{mod.__name__}}`
|
|
{%- else %}
|
|
:origin:`{{mod.__name__}} <searx/engines/{{mod.__name__}}.py>`
|
|
{%- endif %}
|
|
- {{(mod.disabled and "y") or ""}}
|
|
{%- if mod.about and mod.about.language %}
|
|
({{mod.about.language | upper}})
|
|
{%- endif %}
|
|
- {{mod.timeout}}
|
|
- {{mod.weight or 1 }}
|
|
{% if mod.engine_type == 'online' %}
|
|
- {{(mod.paging and "y") or ""}}
|
|
- {{(mod.language_support and "y") or ""}}
|
|
- {{(mod.safesearch and "y") or ""}}
|
|
- {{(mod.time_range_support and "y") or ""}}
|
|
{% else %}
|
|
- :cspan:`3` not applicable ({{mod.engine_type}})
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|