mirror of
https://github.com/searxng/searxng.git
synced 2024-11-05 17:09:31 +00:00
Merge pull request #629 from not-my-profile/about-language
[doc] introduce about.language and sort engines by it
This commit is contained in:
commit
06435e08ef
8 changed files with 19 additions and 1 deletions
|
@ -43,6 +43,9 @@ Explanation of the :ref:`general engine configuration` shown in the table
|
|||
- ``!{{mod.shortcut}}``
|
||||
- {{mod.__name__}}
|
||||
- {{(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' %}
|
||||
|
|
|
@ -50,7 +50,11 @@ jinja_contexts = {
|
|||
},
|
||||
}
|
||||
jinja_filters = {
|
||||
'sort_engines': lambda engines: sorted(engines, key=lambda engine: (engine[1].disabled, engine[0]))
|
||||
'sort_engines':
|
||||
lambda engines: sorted(
|
||||
engines,
|
||||
key=lambda engine: (engine[1].disabled, engine[1].about.get('language', ''), engine[0])
|
||||
)
|
||||
}
|
||||
|
||||
# usage:: lorem :patch:`f373169` ipsum
|
||||
|
|
|
@ -16,6 +16,7 @@ about = {
|
|||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": 'HTML',
|
||||
"language": 'de',
|
||||
}
|
||||
|
||||
categories = ['general']
|
||||
|
|
|
@ -18,6 +18,7 @@ about = {
|
|||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": 'HTML',
|
||||
"language": 'fr',
|
||||
}
|
||||
|
||||
# engine dependent config
|
||||
|
|
|
@ -14,6 +14,7 @@ about = {
|
|||
"use_official_api": True,
|
||||
"require_api_key": False,
|
||||
"results": 'JSON',
|
||||
"language": "de",
|
||||
}
|
||||
|
||||
categories = ['videos']
|
||||
|
|
|
@ -22,6 +22,7 @@ about = {
|
|||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": "HTML",
|
||||
"language": "cz",
|
||||
}
|
||||
|
||||
base_url = 'https://search.seznam.cz/'
|
||||
|
|
|
@ -18,6 +18,7 @@ about = {
|
|||
"use_official_api": False,
|
||||
"require_api_key": False,
|
||||
"results": 'HTML',
|
||||
"language": 'pl',
|
||||
}
|
||||
|
||||
categories = ['general']
|
||||
|
|
|
@ -352,6 +352,9 @@ engines:
|
|||
use_official_api: false
|
||||
require_api_key: false
|
||||
results: HTML
|
||||
# We don't set language: de here because media.ccc.de is not just
|
||||
# for a German audience. It contains many English videos and many
|
||||
# German videos have English subtitles.
|
||||
|
||||
- name: ccengine
|
||||
engine: ccengine
|
||||
|
@ -1573,6 +1576,7 @@ engines:
|
|||
use_official_api: false
|
||||
require_api_key: false
|
||||
results: HTML
|
||||
language: ko
|
||||
|
||||
- name: rubygems
|
||||
shortcut: rbg
|
||||
|
@ -1649,6 +1653,7 @@ engines:
|
|||
use_official_api: false
|
||||
require_api_key: false
|
||||
results: HTML
|
||||
language: de
|
||||
|
||||
- name: słownik języka polskiego
|
||||
engine: sjp
|
||||
|
@ -1676,6 +1681,7 @@ engines:
|
|||
use_official_api: false
|
||||
require_api_key: false
|
||||
results: HTML
|
||||
language: fr
|
||||
|
||||
- name: brave
|
||||
shortcut: brave
|
||||
|
|
Loading…
Reference in a new issue