1
0
mirror of https://github.com/searxng/searxng.git synced 2024-08-25 23:40:15 +02:00
Commit Graph

3549 Commits

Author SHA1 Message Date
Markus Heiser
a3fc1304cc
Merge pull request #569 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
2021-12-01 07:29:24 +01:00
dalf
c74b465ece Update searx.data - update_languages.py 2021-12-01 06:24:47 +00:00
dalf
56e653011f Update searx.data - update_firefox_version.py 2021-12-01 06:24:38 +00:00
dalf
b833e08fc3 Update searx.data - update_currencies.py 2021-12-01 06:24:29 +00:00
dalf
5fdf8f04b7 Update searx.data - update_ahmia_blacklist.py 2021-12-01 06:24:25 +00:00
Alexandre Flament
28b22a0f98 [mod] simple theme: smaller build
remove:
* searx/static/themes/simple/js/searxng.head.js
* searx/static/themes/simple/js/searxng.js
* searx/static/themes/simple/css/searxng-rtl.css
* searx/static/themes/simple/css/searxng.css

These files are never used.
About the js files: the .map files references the sources instead of the concated version.
2021-11-30 23:04:37 +01:00
Markus Heiser
4798acc661 [build] /static 2021-11-30 12:43:18 +01:00
Markus Heiser
7dc9cc91a8 [mod] simple theme, JS: introduce window.searxng.theme namespace
In window.searxng.theme the theme data can be passed through to JS
implementations.

Initial the window.searxng.theme namespace starts with a value for
`img_load_error`::

    // image that is displayed if load of <img src='...'> failed
    img_load_error: 'img/img_load_error.svg'

The searx/static/themes/__common__/js/image_layout.js is patched to uses the
value, if the theme defines a value for img_load_error in this namespace.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-30 12:42:52 +01:00
Markus Heiser
eff0884498 [simple] ImageLayout.watch: img_load_error.svg if img load fails
Show default image `img/img_load_error.svg` when image can't be loaded.

----
Some words about class ImageLayout:

The https://github.com/searxng/searxng/blob/master/searx/static/themes/simple/js/searxng.js is build by a grunt task ..

d0e21a01b4/searx/static/themes/simple/gruntfile.js (L91-L93)

The `/__common__/js/*.js` concats also https://github.com/searxng/searxng/blob/master/searx/static/themes/__common__/js/image_layout.js where a modified copy of the of the "Google-image-layout" (`ImageLayout`) is implemented [1][2][3].

[1] https://ptgamr.github.io/2014-09-12-google-image-layout/
[2] https://ptgamr.github.io/google-image-layout/src/google-image-layout.js
[3] https://github.com/ptgamr/google-image-layout/tree/master
----

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29 21:10:13 +01:00
Markus Heiser
f8c3acd729 [build] /static 2021-11-29 20:48:38 +01:00
Markus Heiser
fb5c1ed310 [fix] simple theme: set img background color to wallpaper's color
The *background color* of an transparent image is the color of the color of
wallpaper on which all images are shown on.

Set variable `--color-result-image-background` and `--color-base-background` to
the same value.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29 20:47:37 +01:00
Markus Heiser
c7bb6945d1 [fix] simple theme: img tile, shows duplicate information on screen
Remove global title attribute from img tag[1][2] .  In the image result, the
title is already shown from span class title::

    <span class="title">{{ result.title|striptags }}</span>

See commit: 8fbffb1409

    [fix] simple-theme templates: polish HTML <img> elements

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
[2] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title

Reported-by: @dalf https://github.com/searxng/searxng/pull/545#issuecomment-980531215
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29 20:47:37 +01:00
Markus Heiser
0afcde071c [build] /static 2021-11-29 20:37:23 +01:00
Markus Heiser
944b73511a [enh] add SVG favicon href="favicon.svg" type="image/svg+xml"
Add link::

    <link rel="icon" href="favicon.png" sizes="any">
    <link rel="icon" href="favicon.svg" type="image/svg+xml">

Modern browsers should request::

    INFO  werkzeug   : 127.0.0.1 - - [28/Nov/2021 17:03:07] "GET /static/themes/simple/img/favicon.svg HTTP/1.1" 200 -

[1] https://github.com/audreyfeldroy/favicon-cheat-sheet#svg-file
[2] https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29 20:36:31 +01:00
Markus Heiser
989f9e97f0
Merge pull request #561 from return42/fix-README
[brand] README: add SearXNG logo
2021-11-29 20:05:54 +01:00
Markus Heiser
e2e585319e [build] /static 2021-11-29 19:53:28 +01:00
Markus Heiser
9349c71c54 [mod] themes/simple/img/searxng.svg -> src/brand/searxng.svg
* move `searx/static/themes/simple/img/searxng.svg` to `src/brand/searxng.svg`

* README.rst can use it without a reference to a theme.

* the simple theme can create `searx/static/themes/simple/img/searxng.png` using
  the svg2png task

Suggested-by: @dalf https://github.com/searxng/searxng/pull/561#issuecomment-981747902
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29 19:53:28 +01:00
Alexandre Flament
3700094f3a
Merge pull request #557 from return42/fix-autocomplete
[fix] route /autocompleter: escape `<` and `>` in the simple theme
2021-11-29 16:58:15 +01:00
Markus Heiser
1f896ea509 [fix] query_in_title: add missing space in title
Suggested-by: @unixfox https://github.com/searxng/searxng/pull/485#issuecomment-981406978
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29 11:08:21 +01:00
Markus Heiser
0c8ff97d9e [fix] route /autocompleter: escape < and > in the simple theme
This is a follow up of 9a3253fc escaping `<` and `>` in all themes.  This patch
fix issue in oscar theme

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-29 07:20:08 +01:00
Markus Heiser
8154dd2a2e [build] /static 2021-11-28 20:07:49 +01:00
Alexandre Flament
59f4c792b4 [mod] simple theme: use sharp instead of convert to create .png from .svg
define a custom grunt task, since grunt-sharp is too old (it can't be installed).
in gruntfile.js, the image tasks are moved at the end the build chain.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-28 20:05:37 +01:00
Markus Heiser
8c4c4259d4 [mod] gruntfile: do some polish (no functional change)
- remove unused 'path' constant
- fix indentation
- Put all image tasks at the end, where it is easy to list which image is processed.

Suggested -by: @dalf https://github.com/searxng/searxng/pull/541#discussion_r756247157
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-28 20:04:10 +01:00
Markus Heiser
11ba7f294f
Merge pull request #554 from return42/fix-google-video
[fix] google-videos engine: ignore news articles
2021-11-27 12:59:39 +01:00
Markus Heiser
9a3253fc16 [fix] route /autocompleter: escape '<' and '>' in the response
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-27 08:39:48 +01:00
Markus Heiser
96cb7123bb
Merge pull request #553 from return42/fix-oscar
[fix] oscar theme: use SearXNG logo and wordmark
2021-11-27 00:34:22 +01:00
Markus Heiser
27c1b9f660
Merge pull request #551 from dalf/fix-results-lock
[fix] searx.results: fix pylint issue "useless-with-lock"
2021-11-27 00:28:22 +01:00
Markus Heiser
ab5097d708
Merge pull request #545 from return42/fix-523
[fix] simple-theme templates: polish HTML <img> elements
2021-11-27 00:26:19 +01:00
mrpaulblack
c443e56458 [build] /static 2021-11-26 20:52:27 +01:00
mrpaulblack
0bb4d6b296 [oscar theme] center search on index and use logo with ponthi 2021-11-26 20:52:07 +01:00
Markus Heiser
6e06618e0c [fix] google-videos engine: ignore news articles
In the video search, google also sometimes includes news.  E.g. in the DE
language when you search for `!gov paris`, google adds an article from a german
newspaper (FAZ), I assume these are sponsored link (not tagged advertisement?)

Those links do not have an image / this patch ignores *video links* wqithout an
image ID.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-26 17:11:20 +01:00
Markus Heiser
e54a06bae7 [fix] oscar theme: use SearXNG logo and wordmark
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-26 16:43:18 +01:00
Alexandre Flament
0d41f26a20 [fix] searx.results: fix pylint issue "useless-with-lock"
Replace "with threading.Lock():" by "with self._lock"
2021-11-26 08:46:43 +01:00
Alexandre Flament
da1d502cf7
Merge pull request #550 from searxng/translations_update
Update translations
2021-11-26 08:26:51 +01:00
searxng-bot
7b737e33e4 [translations] update
647aee3b - 2021-11-25 - Markus Heiser <markus.heiser@darmarit.de>
2021-11-26 07:18:23 +00:00
Markus Heiser
1ce09df9aa [fix] google video engine - rework of the HTML parser
The google video response has been changed slightly, a rework of the parser was
needed.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-26 01:14:17 +01:00
Markus Heiser
488ace1da9 [fix] google engine - suggestion
BTW: google no longer offers *spelling suggestions*

Closes: https://github.com/searxng/searxng/issues/442
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-25 19:42:03 +01:00
Markus Heiser
8fbffb1409 [fix] simple-theme templates: polish HTML <img> elements
- <img> [1] element does not have an end tag, no need for a leading `/>`
- add global attribute title[2] to result_templates/images.html (result-images-source)
- in jinja macro 'macro result_header' remove duplicate of class="image"
- in jinja macro 'macro result_header' remove alt attribute (fix [3])::

    alt="{{ result.title|striptags }}"

  the result.title is already shown in::

    <h3>{{ result_link(result.url, result.title|safe) }}</h3>

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
[2] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title
[3] https://github.com/searxng/searxng/issues/523

Closes: https://github.com/searxng/searxng/issues/523
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-25 12:07:57 +01:00
Markus Heiser
3f3097c772 [fix] templates: remove unneeded escape \' of single quotation mark
Strings like::

    'Query in the page\'s title'

are hard to read / remove escape sequence by using double quotation marks for
strings ::

    "Query in the page's title"

BTW: remove a leading dot in the simple theme [1].

[1] 80fb77476f (r756112716)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-24 17:40:03 +01:00
Alexandre Flament
42c1a938f0
Merge pull request #485 from dalf/pref_query_in_title
[mod] new preference: query_in_title
2021-11-24 13:10:27 +01:00
Markus Heiser
dae165eaa0
Merge pull request #537 from return42/moz-warnings
[simple theme] remove '-moz-border-radius' property
2021-11-23 20:25:17 +01:00
Markus Heiser
3364a15b3a [build] /static 2021-11-23 20:04:27 +01:00
Markus Heiser
28a597e43e [simple theme] remove '-webkit-border-radius' property
[1] https://github.com/searxng/searxng/pull/537#issuecomment-976582675

Suggested-by: @dalf [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23 20:02:39 +01:00
Markus Heiser
8935b1d8a2 [simple theme] remove '-moz-border-radius' property
Support for the prefixed version (-moz-border-radius) was removed in Gecko
13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10) [1].

[1] https://developer.mozilla.org/pt-BR/docs/Web/CSS/border-radius

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23 20:02:39 +01:00
Alexandre Flament
c4caa52989
fix PR #535
Use the "empty_element" CSS class.
2021-11-23 18:59:50 +01:00
Markus Heiser
02391cc892 [build] /static 2021-11-23 15:28:26 +01:00
Markus Heiser
f57a9f425d [simple template] format default string 'italic'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-23 15:28:08 +01:00
mrpaulblack
047d0ac6d6 [simple template] return a default string if there is no description 2021-11-23 14:13:36 +01:00
Markus Heiser
339838f9f5 [build] /static 2021-11-23 12:37:43 +01:00
mrpaulblack
6a367b59ce [simple theme] add animations.less for keyframe animations 2021-11-23 12:35:37 +01:00
Alexandre Flament
e612b81f41 [fix] simple theme: fix modal dialog 2021-11-23 12:35:37 +01:00
mrpaulblack
b0aebf7069 [build] /static 2021-11-21 21:40:49 +01:00
mrpaulblack
f3aff26086 [simple theme] rework select; add safesearch to search and replace / with › in article url
* rework selection UI in pref (fix based on: 78643e9f43)
* moved search filters underneath categories
* cut params from url and replace / with ›
* make h3 and url in article bigger
* add safe search select to search filter (this will not override settings and only be valid while on result page in a session)
* make search form button not overlap each other when js is disabled
* 1rem padding around preview image and thumbnail in default article template
2021-11-21 21:38:00 +01:00
Alexandre Flament
02cccdf876
Merge pull request #533 from return42/fix-532
[fix] google images: @href index 0 not found
2021-11-21 21:26:20 +01:00
Markus Heiser
d51298177a
Merge pull request #528 from return42/brand
[brand] initial - folder src/brand for searxng-wordmark
2021-11-21 11:46:24 +01:00
Markus Heiser
5b28c9109f [fix] google images: @href index 0 not found
Sometimes there is no href in the `<a ..>` tag of a *link_node* [1].

[1] https://github.com/searxng/searxng/issues/532

Reported-by: @TheEssem
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-21 09:55:59 +01:00
Markus Heiser
4330d7cf5d [mod] gruntfile.js - define grunt.template _brand & _templates
[1] https://gruntjs.com/api/grunt.template

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20 10:49:21 +01:00
Markus Heiser
c68c53acd8 [brand] initial - folder src/brand for searxng-wordmark
Folder src/brand is intended to place logo, wordmark and more in.  This commit
moves the origin (source) of searxng-wordmark.svg from the simple theme into
this folder

About the new created src/ folder:

On the long term we can move all the files from static/themes/<name>/src/* into
a src/themes/<name>/* folder.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-20 10:14:55 +01:00
Alexandre Flament
d7eb373371 [fix] npm engine: don't ignore the first result
"from" parameter start at 0
2021-11-20 08:22:48 +01:00
Alexandre Flament
bc0cf9e83e
Merge pull request #521 from dalf/simple-theme-style-pref
Simple theme: allow the user to choose auto, light, dark style
2021-11-19 17:14:35 +01:00
mrpaulblack
cf9d161d26 [build] /static 2021-11-19 16:56:07 +01:00
Alexandre Flament
ec5a82fccd [enh] simple theme: add "simple-style" preferences 2021-11-19 16:45:50 +01:00
Markus Heiser
86090e13d3 [mod] enable reddit - to have at least one in category social-media
Since digg no longer works, we do nat have a active engine in the social-media
category.  Enable reddit by default to have at least one engine back in this
category.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19 15:06:42 +01:00
Markus Heiser
4c82ac7670 [drop] engine digg - https://digg.com/api is no longer available
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19 15:00:22 +01:00
Markus Heiser
4c2df9358a [fix] enigne library genesis - remove 'enable_http: true'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-19 13:25:08 +01:00
Alexandre Flament
f6bfc8f461
Merge pull request #509 from mrpaulblack/library-of-genesis-category
[engines] move library of genesis from general to files category
2021-11-19 12:45:56 +01:00
Alexandre Flament
55737a219b
Merge pull request #518 from dalf/fix-simple-image-detail
[fix] simple theme: fix image detail layout on mobile
2021-11-19 11:19:44 +01:00
Alexandre Flament
ef2556770b [build] /static 2021-11-19 10:45:12 +01:00
Alexandre Flament
48d2dcbb20 [fix] simple theme: adjust image detail height
when on the top of the page, the image is just below the search fields.
this commit slightly aligh the top of the image detail with the bottom
of the search fields.
2021-11-19 10:43:01 +01:00
Alexandre Flament
0400b8ca5d [fix] simple theme: fix layout image detail on mobile
the width of #main_results #results.image-detail-open.only_template_images
was set to 59.25rem. On mobile, the images overflowed on right side of
the viewport, which creates a horizontal scroll.

This commit set the value to min(98%, 59.25rem) whatever the max-width is.
2021-11-19 10:32:42 +01:00
dependabot[bot]
958c7d7280
Bump ionicons from 5.5.4 to 6.0.0 in /searx/static/themes/simple
Bumps [ionicons](https://github.com/ionic-team/ionicons) from 5.5.4 to 6.0.0.
- [Release notes](https://github.com/ionic-team/ionicons/releases)
- [Commits](https://github.com/ionic-team/ionicons/compare/v5.5.4...v6.0.0)

---
updated-dependencies:
- dependency-name: ionicons
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 07:09:16 +00:00
Markus Heiser
15758f1ac2 [fix] eslint - option configFile changed to overrideConfigFile
https://github.com/sindresorhus/grunt-eslint/pull/171

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-17 20:17:47 +01:00
dependabot[bot]
d06135e48f Bump grunt-eslint from 23.0.0 to 24.0.0 in /searx/static/themes/simple
Bumps [grunt-eslint](https://github.com/sindresorhus/grunt-eslint) from 23.0.0 to 24.0.0.
- [Release notes](https://github.com/sindresorhus/grunt-eslint/releases)
- [Commits](https://github.com/sindresorhus/grunt-eslint/compare/v23.0.0...v24.0.0)

---
updated-dependencies:
- dependency-name: grunt-eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 20:17:45 +01:00
Tom
e1d60051ca
[fix] Qwant search query string
Search string: "!qwant time"
Resulting request URL: https://api.qwant.com/v3/search/web?q=q=time&count=10&offset=0&device=desktop&safesearch=1&locale=en_US
Notice the double "q="

Resulting request URL after fix: https://api.qwant.com/v3/search/web?q=time&count=10&offset=0&device=desktop&safesearch=1&locale=en_US
2021-11-17 18:13:54 +01:00
mrpaulblack
af79cce7cf [engines] move library of genesis from general to files category 2021-11-17 00:57:13 +01:00
Markus Heiser
3c05530518 [build] /static 2021-11-15 14:54:32 +01:00
Markus Heiser
b07884c958 [fix] Optimize SVG for WEB usage / CSP 'style-src self'
- Replace grunt-contrib-htmlmin by grunt-image [1].

- Activate svgo's [2] convertStyleToAttrs to make the HTML inline SVGs
  compoliant to the CSP policy [3]::

    Content-Security-Policy: style-src self;

[1] https://www.npmjs.com/package/grunt-image
[2] https://github.com/svg/svgo
[3] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src

Closes: https://github.com/searxng/searxng/issues/502

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-15 14:51:55 +01:00
Markus Heiser
5721617de4 [build] /static 2021-11-13 17:13:09 +01:00
MrPaulBlack
c79bba60a9 [theme] add border radius to engine token input 2021-11-13 17:12:28 +01:00
Alexandre Flament
dfbbc3b471 [fix] simple theme: /preferences: add tokens field
include changes to display input text field in the preferences
2021-11-13 17:12:28 +01:00
Markus Heiser
b369ff4425 [fix] delete trailing whitespace
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 15:51:08 +01:00
Markus Heiser
a364e54859 [fix] delete trailing whitespace
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 15:40:00 +01:00
Markus Heiser
6debda2404 [mod] settings.yml - polish up comments about plugins
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 15:40:00 +01:00
Markus Heiser
de7f8b757b
Merge pull request #499 from dalf/fix-autocompletion-startpage
[fix] startpage autocompletion
2021-11-13 13:54:27 +01:00
Alexandre Flament
3c3599c9e6 [fix] startpage autocompletion 2021-11-13 13:26:47 +01:00
MrPaulBlack
29e092b931 [build] /static 2021-11-13 10:42:35 +01:00
MrPaulBlack
566dfe3330 [simple theme] update to ion icons 5 and drop webfont
* update from ionicons-npm to ionicons ver.5
* drop the webfont built by grunt for icons
* built icons.html template for inlining icons with jinja2 into html
* update icon to use mostly the outline version
* add icons to categories and do not display them on mobile to save space
* remove all legacy ion icon font files from simple theme
* icons.html is added in this commit since make statc.build.restore requires git to know the file already
* cleanup error-dialog
2021-11-13 10:42:07 +01:00
Markus Heiser
9bf53ab974 [build] /static 2021-11-13 09:06:33 +01:00
Markus Heiser
04ab012e03 [simple theme] SearXNG wordmark (plain SVG)
Remove XML namespaces from Incscape [1]::

   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"

[1] https://wiki.inkscape.org/wiki/PlainSVG

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 09:05:20 +01:00
Markus Heiser
ee67a65180 [simple theme] replace old searx logo by searxng-wordmark.min.svg
Suggested-by: @dalf https://github.com/searxng/searxng/pull/473#issuecomment-962476683
Suggested-by: @MrPaulBlack https://github.com/searxng/searxng/pull/473#issuecomment-962579826
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 09:05:20 +01:00
Markus Heiser
3a981257de [simple theme] create favicon.png from src/svg/searxng-wordmark.svg
new bash function convert_if_newer() / usage::

    convert_if_newer <origfile> <outfile> [<options>, ...]
    convert_if_newer "path/to/origin.svg" "path/to/converted.png" -transparent white -resize 64x64

Run's ImageMagik' convert comand to generate <outfile> from <origfile>, if
<origfile> is newer than <outfile>.  The command line is to convert is::

    convert <origfile> [<options>, ...] <outfile>

PNG 'searx/static/themes/simple/img/favicon.png' has been created by::

  $ make themes.simple
  CONVERT   searx/static/themes/simple/src/svg/searxng-wordmark.svg -transparent white -resize 64x64 searx/static/themes/simple/img/favicon.png
  ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 09:05:20 +01:00
Markus Heiser
bf52353a5c [enh] minify searxng-wordmark.svg (HTMLMinifier)
Command::

  ./node_modules/.bin/html-minifier \
      --remove-comments \
      --collapse-whitespace \
      src/svg/searxng-wordmark.svg \
      -o ../../../templates/__common__/searxng-wordmark.min.svg

- html-minifier: https://github.com/kangax/html-minifier
  - onilne: https://kangax.github.io/html-minifier
  - grunt: https://www.npmjs.com/package/grunt-contrib-htmlmin
  - grunt-contrib-htmlmin: https://github.com/gruntjs/grunt-contrib-htmlmin
  - npm: https://www.npmjs.com/package/html-minifier

To test, rebuild your node environment::

  make node.env

Alternatives:

- pretty-data: https://github.com/vkiryukhin/pretty-data
  - grunt: https://www.npmjs.com/package/grunt-xmlmin
  - grunt-xmlming: https://github.com/dtrunk90/grunt-xmlmin
  - npm: https://www.npmjs.com/package/grunt-xmlmin

- minify-xml: https://github.com/kristian/minify-xml
  - no grunt package available
  - npm: https://www.npmjs.com/package/minify-xml

src/svg/searxng-wordmark.svg':
'../../../templates/__common__/searxng-wordmark.min.svg'

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 09:05:20 +01:00
Markus Heiser
edb081638b [simple theme] SearXNG wordmark (SVG)
Related-to:

- https://github.com/searxng/searxng/pull/430#issuecomment-951967239
- https://github.com/searxng/searxng/pull/378

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-13 09:05:20 +01:00
MrPaulBlack
303cea3437 [build] /static 2021-11-13 00:52:34 +01:00
MrPaulBlack
1becb5e138 [simple theme] minor css fixes
* remove hover effect from vim help modal
* remove bold font weight from active item in prefenreces tab bar
* remove margin from answer box to unify with rest of result page
2021-11-13 00:51:26 +01:00
MrPaulBlack
9badec0260 [build] /static 2021-11-11 22:28:09 +01:00
MrPaulBlack
a80b5dc110 [fix] scaling of result page on small screens by @ZetaTom
* thanks to https://github.com/ZetaTom for the fix!
* set the width of the input#q element to 100% of the 1fr space of the grid layout
* change the viewport meta tag to th recommended value (see: https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag#viewport_basics)
* add a new @ultra-small-phone width of 20rem; when a device is smaller than that the search logo does not get displayed on the result page anymore
2021-11-11 22:26:26 +01:00
Alexandre Flament
80fb77476f [mod] new preference: query_in_title
* disable by default
* settings.yml: ui.query_in_title
* in /preferences: privacy tab

when enabled, the result page's title contains the user query.

previously:
* oscar theme: the query was always included
* simple theme: the query was included with the GET method
2021-11-08 21:40:53 +01:00
Alexandre Flament
67ab4d4165 [build] /static 2021-11-06 21:14:12 +01:00
Alexandre Flament
ddc2346a06 [enh] simple theme: mobile layout: allow access to the preferences
when there is no query, reduce the width of the query field,
to display the preference button on the right.
2021-11-06 21:13:41 +01:00
Alexandre Flament
558e0c3241 [build] /static 2021-11-05 12:45:15 +01:00
Alexandre Flament
c00e54d61b [fix] simple theme: image detail: click on the URL to the HTML page works
Before this commit, the default click event on an image result is prevented,
this include clicks inside the detail.

This commit makes sure the click happends outside the detail to prevent the default event.
2021-11-05 12:42:44 +01:00
Alexandre Flament
4d051c43f3 [fix] simple theme: various about the hotkeys help
* dark mode: #555 border (same as infoboxes and other borders)
* remove a call to console.log
* center the dialog without using the style attribute.
2021-11-05 12:42:44 +01:00
Alexandre Flament
d1c09c84e2 [fix] simple theme: disable hotkeys when they are not enabled in the preferences 2021-11-05 12:42:44 +01:00
Alexandre Flament
ba342db55e
Merge pull request #480 from dalf/searxng-simple-theme
SearXNG brand: remove searx from searx*.js file names.
2021-11-05 12:42:30 +01:00
Alexandre Flament
57421c4b20
Merge pull request #479 from dalf/simple-fix-open-new-tab
[fix] simple theme: fix open in a new tab preference
2021-11-05 12:39:34 +01:00
Alexandre Flament
6ab78f1a6a [build] /static 2021-11-05 09:52:50 +01:00
Alexandre Flament
680d70865f [mod] SearXNG: remove "searx" from the searx*.js file names. 2021-11-05 09:51:27 +01:00
Alexandre Flament
3167d645e8 [fix] simple theme: fix open in a new tab preference 2021-11-05 09:36:19 +01:00
searxng-bot
f5ac9d3493 [translations] update
01459a65 - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
99f3e56c - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
e6bf731c - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
a7cfd6f3 - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
ab1d2718 - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
0960dffc - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
5ef8ba13 - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
444a915a - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
98f35b9f - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
44ee48df - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
343c8133 - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
d8356eaa - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
5adaa438 - 2021-10-31 - Markus Heiser <markus.heiser@darmarit.de>
2021-11-05 07:16:58 +00:00
Markus Heiser
aa08c48af8 [build] /static 2021-11-04 00:07:49 +01:00
Markus Heiser
7ecd0583fe [simple theme] add .rounded-corners to selectable_url
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-04 00:05:04 +01:00
MrPaulBlack
e05bcd4311 [simple theme] result layout suggestions 2021-11-04 00:04:57 +01:00
Markus Heiser
4887c25e7f [simple theme] simplify and justify #answers & #corrections
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-03 23:59:50 +01:00
Markus Heiser
ca971bd5e5 [simple theme] CSS remove box-shadow effects
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-03 23:51:07 +01:00
Alexandre Flament
8d6c119593 [build] /static 2021-11-03 09:26:20 +01:00
Alexandre Flament
7179af32f2 [mod] simple theme: dark mode: various fixes 2021-11-03 09:25:33 +01:00
Alexandre Flament
2dcd9a68d6 [mod] simple theme: adjust button colors in dark version.
buttons:
* previous & next in the result page
* save, restore, & back in the preferences
* back to top

<select> input in Chrom* browsers:
* fix the white text with a white background issue
2021-11-03 09:25:33 +01:00
Markus Heiser
49db7b20d4
Merge pull request #469 from return42/css-answer-box
[theme] simple - improve rendering of the "Answers" box
2021-11-03 08:14:09 +00:00
Markus Heiser
67d3dc01a2 [build] /static 2021-11-02 13:59:45 +01:00
Markus Heiser
7996619691 [theme] simple - improve rendering of the "Answers" box
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-02 13:59:26 +01:00
MrPaulBlack
41494d9f47 [fix] make reddit only in social media category avail.
fix https://github.com/searxng/searxng/issues/470
2021-11-01 20:37:17 +01:00
Markus Heiser
07f849cd56
Merge pull request #468 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2021-11-01 06:49:09 +00:00
Markus Heiser
853a144bb4
Merge pull request #467 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2021-11-01 06:48:43 +00:00
Markus Heiser
82a0dfab61
Merge pull request #466 from searxng/update_data_update_wikidata_units.py
Update searx.data - update_wikidata_units.py
2021-11-01 06:48:15 +00:00
dalf
f3dfdad1d1 Update searx.data - update_ahmia_blacklist.py 2021-11-01 06:24:06 +00:00
dalf
2be4c35f76 Update searx.data - update_firefox_version.py 2021-11-01 06:23:59 +00:00
dalf
073d3edc0c Update searx.data - update_wikidata_units.py 2021-11-01 06:23:58 +00:00
dalf
3d9be86519 Update searx.data - update_currencies.py 2021-11-01 06:23:54 +00:00
Alexandre Flament
6782830a4a [build] /static 2021-10-30 22:34:05 +02:00
Alexandre Flament
540042d0ca [mod] simple theme: infobox: center the image 2021-10-30 22:33:36 +02:00
Alexandre Flament
60d595ea52 [mod] simple theme: use :root instead of html to define CSS variables
This allows to use the CSS variables in inline svg.
2021-10-30 22:33:36 +02:00
Alexandre Flament
d0a3164514 [fix] simple theme: /preferences: dark theme version for select widgets
It is not possible to use CSS variable in a SVG when this is in a background.
This commit adds two .svg files, less converts them into data URL.
The two files are indentical except the fill color.
2021-10-30 22:33:34 +02:00
Alexandre Flament
67b0b68b40 [fix] simple theme: /preferences: dark theme version for the response time bar charts 2021-10-30 18:03:37 +02:00
Alexandre Flament
9f0b47f525 [fix] simple theme: cookie table doesn't overflow the expected width 2021-10-30 18:03:37 +02:00
Alexandre Flament
46fde2e98e
Merge pull request #454 from searxng/translations_update
Update translations
2021-10-30 18:00:42 +02:00
Alexandre Flament
7bfaf42e4b [build] /static 2021-10-29 20:24:30 +02:00
Alexandre Flament
0650e73b12 [mod] simple theme: SearXNG logo 2021-10-29 20:24:04 +02:00
MrPaulBlack
f86a658c1c [build] /static 2021-10-29 19:27:38 +02:00
MrPaulBlack
9ddcd62464 [simple theme] selection ui with border
* remove vim arrow
* add 1rem padding to results
* add 0.2rem left border to vim selected article
* set column gap to 1.2rem and make search bar in line with results
* put 10px border-radius selected article
* result article: 0.125rem margin on tablet and esktop; 1rem margin on phone
2021-10-29 19:27:38 +02:00
Igor Rzegocki
13c355c4c4 healthcheck endpoint 2021-10-29 10:18:17 +00:00
searxng-bot
37a966d5c0 [translations] update 2021-10-29 07:17:27 +00:00
Alexandre Flament
861f046090 [build] /static 2021-10-28 20:54:17 +02:00
Alexandre Flament
e2d312f6ae [mod] simple theme: adjust margins
* index page: margin top is 24% of the view port.
  avoid to scroll a small screen,
  center the content in the middle of the screen

* link to preferences at the same height same the input fields

* increase the category tab heighs

* increase the margin bottom of the query field

* in the results, change the h3 margin top and bottom to 0.4rem (6px)

* move the back to top button slightly on the right when the results are only images
2021-10-28 20:53:52 +02:00
Alexandre Flament
a93bd19101 [build] /static 2021-10-28 08:37:38 +02:00
Alexandre Flament
fd374d6322 [enh] simple theme: image detail
When an image is selected, the detail with the full size image is displayed
on the right side of the screen (or full screen on tablet and phone).

When Javascript is disabled, the thumbnail is a linked to the full size image,
as it was before.

When the image proxy is enabled, the full size image is also proxied,
in consequence this commit increases the bandwidth usage of instances.

The detail can be closed by the close button or the Esc key.
It is possible to go to the next and previous images using the j and k keys
or the button on the top right of the screen.
2021-10-28 08:28:21 +02:00
Alexandre Flament
2624034cd6 [mod] settings_defaults.py: default values for the brand section 2021-10-27 06:31:16 +00:00
Markus Heiser
84447b87e1 [build] /static 2021-10-27 06:17:37 +00:00
MrPaulBlack
1723726361 [simple theme] make url clickable and cleanup result article header
* url in article head is clickable
* url is bigger now 0.96em font
* url is now left floating on tablet and phone
* there is a 8px top and bottom margin on h3 result heading
2021-10-27 06:17:37 +00:00
MrPaulBlack
8918fb3eb0 [build] /static 2021-10-27 05:47:25 +00:00
MrPaulBlack
bcc313bcf8 [simple theme] add logo to search form on result page
* rework search form as grid layout
* remove various paddings and margins
* add logo and link to index to search form
* make categories bigger on phone
2021-10-27 05:47:25 +00:00
Alexandre Flament
18299abc6f
Merge pull request #437 from dalf/fix-433
[mod] microsoft academic: increase timeout to 6 seconds
2021-10-26 12:54:13 +02:00
Alexandre Flament
64b29ad838 [mod] microsoft academic: increase timeout to 6 seconds
also avoid a crash when there is no result

close #433
2021-10-26 12:26:43 +02:00
Alexandre Flament
828088fa5a [mod] update_languages: min_engines_per_country=7
a (language,country) tuple is included if 7 engines have it, was 10 before.

close #432
2021-10-26 12:13:23 +02:00
Alexandre Flament
60db344cc0 [enh] reduce the available language list
close #406

settings['search']['languages'] contains the languages codes and 'all'
2021-10-26 10:27:05 +02:00
Alexandre Flament
cab98ed6c7 [build] /static 2021-10-21 08:26:42 +00:00
Alexandre Flament
ff5ded2baf [mod] upgrade grunt-contrib-concat: ~2.0.0 2021-10-21 08:26:42 +00:00
Markus Heiser
713814547a [fix] yahoo engine - don't lump all search suggestions together
Closes: https://github.com/searxng/searxng/issues/421
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-21 07:51:05 +00:00
MrPaulBlack
9ff0a91fca [build] /static 2021-10-18 21:57:56 +02:00
MrPaulBlack
6204ef665f [simple theme] define device width with less vars in defenition.less 2021-10-18 21:57:32 +02:00
MrPaulBlack
32fb2bdf85 [build] /static 2021-10-17 11:01:02 +00:00
MrPaulBlack
5e6e964c54 [simple theme] center results on tablet 2021-10-17 11:01:02 +00:00
Markus Heiser
f63ffbb22b [fix] engine - yahoo: rewrite and fix issues
Languages are supported by mapping the language to a domain.  If domain is not
found in :py:obj:`lang2domain` URL ``<lang>.search.yahoo.com`` is used.

BTW: fix issue reported at https://github.com/searx/searx/issues/3020

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-16 20:05:26 +00:00
Markus Heiser
38a157b56f [pylint] engines: yahoo fix several issues reported from pylint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-16 20:05:26 +00:00
searxng-bot
c067c18235 [translations] update
4da16339 - 2021-10-15 - Markus Heiser <markus.heiser@darmarit.de>
2021-10-15 20:39:33 +00:00
Markus Heiser
9730371199 [fix] typos reported from weblate translators
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-15 19:20:11 +00:00
searxng-bot
dd04551e14 [translations] update
f8a46518 - 2021-10-15 - Markus Heiser <markus.heiser@darmarit.de>
2021-10-15 18:43:10 +00:00
dependabot[bot]
1f39b99c03 Bump eslint from 7.32.0 to 8.0.1 in /searx/static/themes/simple
Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.0.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v8.0.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-15 07:16:16 +00:00
MrPaulBlack
00b0394e19 [fix] language param for qwant 2021-10-14 16:11:44 +00:00
Alexandre Flament
ee5e9f9e1d
Merge pull request #380 from dalf/fix-339
[fix] interface language zh_CN and zh_TW don't work
2021-10-12 21:50:05 +02:00
Alexandre Flament
4759f65b69 [fix] interface language zh_CN and zh_TW don't work
before this commit, when the user picks "Chinese, China" or "Chinese, Taiwan",
the locale fallbacks to English.

This commit fixes this issue (the translations branch must be updated)

close #339
2021-10-12 21:06:20 +02:00
Alexandre Flament
a1d1aec6e2 [mod] locale: use hyphen everywhere except for Babel 2021-10-12 21:06:20 +02:00
Alexandre Flament
988910d451 [fix] templates: lang attribute of html uses hyphen
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-lang
https://www.w3.org/TR/REC-xml/#sec-lang-tag
2021-10-12 21:06:20 +02:00
Marc Abonce Seguin
66b7be0965 [fix] fix match_language issue to make zh-TW match to zh-Hant-TW
pybabel separates locales with underscores but we use hyphens
everywhere babel doesn't directly touch
2021-10-12 21:06:20 +02:00
Alexandre Flament
f9c6393502 [enh] verify that Tor proxy works every time searx starts
based on @MarcAbonce commit on searx
2021-10-12 21:01:02 +02:00
Noémi Ványi
4cc1ee8565 [fix] qwant engine - only get results from categories
Reported-by: https://github.com/searx/searx/issues/3014
Cherry-picked: https://github.com/searx/searx/commit/3bcca43
2021-10-12 18:42:50 +00:00
Paolo Basso
64df011e2f [mod] engines - add zlibrary engine 2021-10-11 14:58:44 +00:00
Alexandre Flament
3fad483b7a SearXNG: partial update: reference /etc/searxng/settings.yml 2021-10-11 12:28:55 +00:00
Alexandre Flament
861925c50f SearXNG: load /etc/searxng/settings.yml
fall back to /etc/searx/setting.yml
2021-10-11 12:28:55 +00:00
Alexandre Flament
7f72844ca6
Merge pull request #355 from MrPaulBlack/simple-theme-css-vars
[simple theme] dark mode and some css cleanup
2021-10-10 09:41:46 +02:00
Alexandre Flament
f5755ba6b9
Merge pull request #319 from dalf/mod-plugins
plugins: refactor initialization
2021-10-10 09:16:00 +02:00
MrPaulBlack
d8c9839625 [build] /static 2021-10-09 16:03:58 +02:00
MrPaulBlack
bc2c8e6ba9 [simple theme] add a dark theme
* add a new color theme for a dark mode
* make the device auto switch between dark and light theme
2021-10-09 16:00:56 +02:00
MrPaulBlack
3daa024c04 [simple theme] new color theme and result on mobile and tablet
* clean up vars in defenition
* results look now the same on mobile and desktop
* reworked results on mobile
* new color theme with more vibrant colors
2021-10-09 16:00:56 +02:00
MrPaulBlack
09324f3492 [template] move result url to top of article 2021-10-09 16:00:56 +02:00
MrPaulBlack
740fca00cc Redo Color Theme and css cleanup
* remove vars and add elements to base and btn vars
* change default border radius to 10px and padding to 0.7em
* put border radius and padding on search input form, infoxbox and buttons
* remove unused .help class in #categories_container
* remove active background from tabs to straemline design
* redo search form: 10px padding
* 2rem margin on search results on desktop
* fix modal pacement of engine reliability in prefs
* use darker accent colors
* streamline autocomplete with more padding and a hover effect
2021-10-09 16:00:56 +02:00
MrPaulBlack
7c2a518d12 [theme] replace all hardcoded colors by css vars and drop ununsed vars 2021-10-09 16:00:55 +02:00
MrPaulBlack
452b266387 [theme] convert less vars to css vars in simple theme 2021-10-09 16:00:55 +02:00
dependabot[bot]
94de9ee61a
Bump grunt-contrib-jshint in /searx/static/themes/oscar
Bumps [grunt-contrib-jshint](https://github.com/gruntjs/grunt-contrib-jshint) from 3.0.0 to 3.1.1.
- [Release notes](https://github.com/gruntjs/grunt-contrib-jshint/releases)
- [Changelog](https://github.com/gruntjs/grunt-contrib-jshint/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt-contrib-jshint/commits/v3.1.1)

---
updated-dependencies:
- dependency-name: grunt-contrib-jshint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-08 07:46:52 +00:00
Alexandre Flament
6b643e961b
Merge pull request #397 from searxng/dependabot/npm_and_yarn/searx/static/themes/simple/master/grunt-contrib-jshint-3.1.1
Bump grunt-contrib-jshint from 3.0.0 to 3.1.1 in /searx/static/themes/simple
2021-10-08 09:45:40 +02:00
searxng-bot
91206a5682 [translations] update
b2709671 - 2021-10-04 - Markus Heiser <markus.heiser@darmarit.de>
2021-10-08 07:16:49 +00:00
dependabot[bot]
a88ee63aca
Bump grunt-contrib-jshint in /searx/static/themes/simple
Bumps [grunt-contrib-jshint](https://github.com/gruntjs/grunt-contrib-jshint) from 3.0.0 to 3.1.1.
- [Release notes](https://github.com/gruntjs/grunt-contrib-jshint/releases)
- [Changelog](https://github.com/gruntjs/grunt-contrib-jshint/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt-contrib-jshint/commits/v3.1.1)

---
updated-dependencies:
- dependency-name: grunt-contrib-jshint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-08 07:05:58 +00:00
Markus Heiser
5731b6b700 [mod] searx.plugins.prepare_package_resources() - use generators
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-07 18:41:56 +02:00
Markus Heiser
aa5a5147b2 [fix] searx.plugins.initialize() - don't miss module & module-name
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-07 18:41:41 +02:00
Markus Heiser
3abbe6d25b [fix] engine torznab - categories, before join convert int to str
BTW add init() function and replace SearxEngineAPIException by ValueError.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-07 15:27:55 +00:00
Markus Heiser
9fb77065bd [fix] engine torznab - marginal issues reported from linters
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-07 15:27:55 +00:00
Paolo Basso
d803df8d89 [mod] engines - add torznab WebAPI 2021-10-07 15:27:55 +00:00
Alexandre Flament
7246d62770
Merge pull request #386 from return42/fix-384
[mod] set 'engine.supported_languages' from the origin python module
2021-10-07 09:50:43 +02:00
Markus Heiser
19e41c137e [mod] set 'engine.supported_languages' from the origin python module
The key of the dictionary 'searx.data.ENGINES_LANGUAGES' is the *engine name*
configured in settings.xml.  When multiple engines are configured to use the
same origin engine (e.g. `engine: google`)::

    - name: google
      engine: google
      use_mobile_ui: false
      ...

    - name: google italian
      engine: google
      use_mobile_ui: false
      language: it
      ...

    - name: google mobile ui
      engine: google
      shortcut: gomui
      use_mobile_ui: true

There exists no entry for ENGINES_LANGUAGES[engine.name] (e.g. `name: google
mobile ui` or `name: google italian`).  This issue can be solved by recreate the
ENGINES_LANGUAGES::

    make data.languages

But this is nothing an SearXNG admin would like to do when just configuring
additional engines, since this just doubles entries in ENGINES_LANGUAGES and
BTW: `make data.languages` has various external requirements which might be not
installed or not available, on a production host.

With this patch, if engine.name fails, ENGINES_LANGUAGES[engine.engine] is used
to get the engine.supported_languages (e.g. `google` for the engine named
`google mobile`).

For an engine, when there is `language: ...` in the YAML settings, the engine
supports only one language, in this case engine.supported_languages should
contains this value defined in settings.yml (e.g. `it` for the engine named
`google italian`).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Closes: https://github.com/searxng/searxng/issues/384
2021-10-07 08:45:02 +02:00
Alexandre Flament
2b4fef7118 plugins: refactor initialization
add a new function "init" call when the app starts.
The function can:
* return False to disable the plugin.
* modify the Flask app.
2021-10-06 19:18:19 +02:00