diff options
author | Martin Fischer <martin@push-f.com> | 2021-12-28 14:51:21 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-05 11:03:44 +0100 |
commit | 31e206361fac911d84e1f19dcf3f0ce80883d625 (patch) | |
tree | 34373ba888332fdf88edfd19333837ff2d4cc622 /searx/webapp.py | |
parent | b02f762687c117baba523cefdcd16d0f94ae886a (diff) | |
download | searxng-31e206361fac911d84e1f19dcf3f0ce80883d625.tar.gz searxng-31e206361fac911d84e1f19dcf3f0ce80883d625.zip |
[enh] group engines in preference tabs
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-x | searx/webapp.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index f884c35ef..9ce7b9d5a 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -59,9 +59,11 @@ from searx.settings_defaults import OUTPUT_FORMATS from searx.settings_loader import get_default_settings_path from searx.exceptions import SearxParameterException from searx.engines import ( + DEFAULT_GROUP_NAME, categories, engines, engine_shortcuts, + group_engines_in_tab, ) from searx.webutils import ( UnicodeWriter, @@ -152,6 +154,7 @@ app = Flask(__name__, static_folder=settings['ui']['static_path'], template_fold app.jinja_env.trim_blocks = True app.jinja_env.lstrip_blocks = True app.jinja_env.add_extension('jinja2.ext.loopcontrols') # pylint: disable=no-member +app.jinja_env.filters['group_engines_in_tab'] = group_engines_in_tab # pylint: disable=no-member app.secret_key = settings['server']['secret_key'] babel = Babel(app) @@ -169,6 +172,16 @@ _category_names = ( gettext('map'), gettext('onions'), gettext('science'), + # non-tab categories + gettext('apps'), + gettext('dictionaries'), + gettext('lyrics'), + gettext('packages'), + gettext('q&a'), + gettext('repos'), + gettext('software wikis'), + gettext('web'), + gettext(DEFAULT_GROUP_NAME), ) _simple_style = (gettext('auto'), gettext('light'), gettext('dark')) |