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

Previously engines were defined in modules, which where then stapled with logger, supported_languages & language_aliases via monkey patching in searx/engines/__init__.py. Monkey patching is obviously a bad practice since it confuses humans as well as static type checkers. But there were more problems: * there were no type hints for the method input and output types * the request method did not even make a clear distinction between input and output (abusing a single "params" dictionary for both) This commit introduces a new class-based architecture for engines, in a backwards-compatiable manner: allowing old-style module engines to be used along witn new-style class-based engines.
77 lines
2.1 KiB
ReStructuredText
77 lines
2.1 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
|
|
- Safe search
|
|
- Time range
|
|
|
|
{% for mod in engines %}
|
|
|
|
{% set mod_name = mod['__name__'] or mod.__module__ %}
|
|
|
|
* - `{{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 %}
|