Commit Graph

4537 Commits

Author SHA1 Message Date
Alexandre Flament 1e45dbbae9 [build] /static 2022-05-07 19:43:20 +02:00
Alexandre Flament 9b3efa6d8a theme: remove __common__ 2022-05-07 19:40:48 +02:00
Markus Heiser 4326009d00 [format.python] based on bugfix in 9ed626130 2022-05-07 18:23:10 +02:00
Markus Heiser 8175290867 [build] /static 2022-05-07 17:58:53 +02:00
Markus Heiser 444b1e70db [mod] add setting: search.autocomplete_min
Minimun characters to type before autocompleter starts.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-05-07 17:58:30 +02:00
Markus Heiser ed2a4c8087 [mod] client_settings: pass settings from server to JS client
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-05-07 17:58:30 +02:00
Markus Heiser 3f18761adb
Revert "[build] /static" 2022-05-07 17:56:30 +02:00
Markus Heiser 0f18bfc8a5 [build] /static 2022-05-07 17:36:58 +02:00
Alexandre FLAMENT 550f70b1aa Add support for the Silesian language 2022-05-06 09:40:45 +00:00
searxng-bot 12a584c5dd [translations] update from Weblate
7d941719 - 2022-05-05 - gkkulik <gregorykkulik@gmail.com>
c3fa2774 - 2022-05-04 - Markus Heiser <markus.heiser@darmarit.de>
0c527178 - 2022-05-05 - realdep <islekege@gmail.com>
3540a89f - 2022-05-06 - AHOHNMYC <lqwh2h2cwa@protonmail.com>
c517f467 - 2022-05-06 - iFvt;/s:.Io8yejcE! <6dbjomtr@anonaddy.me>
f9b9f666 - 2022-05-06 - Markus Heiser <markus.heiser@darmarit.de>
2b3dfa75 - 2022-05-06 - Markus Heiser <markus.heiser@darmarit.de>
bacd0922 - 2022-05-05 - gkkulik <gregorykkulik@gmail.com>
2022-05-06 07:18:36 +00:00
Paul Braeuning 31521f3a46
Merge pull request #1153 from return42/drop-oscar
[theme] peel out oscar from SearXNG development
2022-05-03 18:47:35 +02:00
Markus Heiser 8a79eb4d7b
Merge pull request #1158 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
2022-05-01 09:51:56 +02:00
Markus Heiser 6bd6e09e14
Merge pull request #1159 from searxng/update_data_update_engine_descriptions.py
Update searx.data - update_engine_descriptions.py
2022-05-01 09:51:21 +02:00
Markus Heiser 9c7e9bf1d9
Merge pull request #1157 from searxng/update_data_update_wikidata_units.py
Update searx.data - update_wikidata_units.py
2022-05-01 09:50:28 +02:00
Markus Heiser 9e6000407a
Merge pull request #1156 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2022-05-01 09:49:55 +02:00
dalf 6f0a717dce Update searx.data - update_engine_descriptions.py 2022-05-01 06:33:42 +00:00
dalf bdfbc0ec02 Update searx.data - update_currencies.py 2022-05-01 06:26:53 +00:00
dalf 6cb08a568a Update searx.data - update_wikidata_units.py 2022-05-01 06:26:44 +00:00
dalf 10023344a5 Update searx.data - update_ahmia_blacklist.py 2022-05-01 06:26:33 +00:00
dalf e36d7067a9 Update searx.data - update_firefox_version.py 2022-05-01 06:26:31 +00:00
Markus Heiser c3bb6c7059 [upd] searx/translations/messages.pot
generated by::

  ./manage pyenv.cmd pybabel extract \
      -F babel.cfg \
      -o "searx/translations/messages.pot"\
      "searx/"

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-30 13:20:27 +02:00
Markus Heiser ad1aca6823 [theme] delete static/themes/oscar and templates/oscar
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

 templates/oscar#	gelöscht:       searx/static/themes/oscar/fonts/glyphicons-halflings-regular.ttf
2022-04-30 13:20:27 +02:00
Markus Heiser e8541b6006 [theme] peel out oscar from SearXNG development
This is the first step of removing oscar theme

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-30 13:20:27 +02:00
Markus Heiser fa681580bf
Merge pull request #1150 from searxng/dependabot/pip/master/pygments-2.12.0
Bump pygments from 2.11.2 to 2.12.0

After each update of the pygments version, we (or github action) should [1]

1. update less files:

    ./manage pyenv.cmd searxng_extra/update/update_pygments.py

    update: static/themes/oscar/src/generated/pygments-logicodev.less
    update: static/themes/oscar/src/generated/pygments-pointhi.less
    update: static/themes/simple/src/generated/pygments.less

2. rebuild the static files of each themes:

    make static.build.commit

[1] https://github.com/searxng/searxng/pull/2#issuecomment-826958666

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-30 07:25:35 +02:00
Markus Heiser 0275f0f5ad [upd] ./manage pyenv.cmd searxng_extra/update/update_pygments.py
After each update of the pygments version, we (or github action) should [1]

1. update less files:

    ./manage pyenv.cmd searxng_extra/update/update_pygments.py

    update: static/themes/oscar/src/generated/pygments-logicodev.less
    update: static/themes/oscar/src/generated/pygments-pointhi.less
    update: static/themes/simple/src/generated/pygments.less

2. rebuild the static files of each themes:

    make static.build.commit

[1] https://github.com/searxng/searxng/pull/2#issuecomment-826958666

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-30 07:12:39 +02:00
Markus Heiser fcc177b6ed
Merge pull request #1151 from searxng/translations_update
Update translations
2022-04-30 07:03:22 +02:00
searxng-bot 4b77fc6acf [translations] update from Weblate
07ad7224 - 2022-04-29 - Alexandre Flament <alex@al-f.net>
2022-04-29 08:09:27 +00:00
Léon Tiekötter 02026bcc76
[fix] library genesis engine: xpath and url
Changed the xpath to use the official download mirror.

Changed the URL to libgen.fun as this is the official instance. (https://en.wikipedia.org/wiki/Library_Genesis)
2022-04-27 13:11:34 +02:00
Allen 624b58764a
[enh] Add pagination to Brave
Also added ```&spellcheck=1``` because now it is disabled by default, not returning any ```suggestion_xpath```.
2022-04-23 14:06:53 +02:00
capric98 8c7e6cc983 [fix] FutureWarning from lxml
Just in case if content is None, the original code will skip extract_text(), and
just append the None value to 'content'. So just add allow_none=True, and this
will return None without raising a ValueError in extract_text().
2022-04-22 16:09:36 +02:00
Markus Heiser 62982c8812 [fix] add back missing languages & regions (followup of PR #1071)
In PR #1071 the language catalog of dailymotion has been cleaned up, before
there had been over 7000 "languages" in the catalog.

As a side effect of this clean-up the language & region catalog in SearXNG has
been reduced [1].

This patch reduce the ``min_engines_per_lang`` from 13 to 12 to get the missed
languages back in language & region catalog of SearXNG.

[1] 3bb62823ec (diff-f3f00db0f87f95b882624a192e0aac21525638af0b18c9514e765fcf1991678d)

Requested-by: @tiekoetter in a Matrix chat
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-22 12:09:42 +02:00
dependabot[bot] 1974a85461
Bump grunt-contrib-uglify in /searx/static/themes/simple
Bumps [grunt-contrib-uglify](https://github.com/gruntjs/grunt-contrib-uglify) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/gruntjs/grunt-contrib-uglify/releases)
- [Changelog](https://github.com/gruntjs/grunt-contrib-uglify/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt-contrib-uglify/compare/v5.1.0...v5.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 09:28:01 +00:00
Markus Heiser 50bac93363
Merge pull request #1094 from searxng/dependabot/npm_and_yarn/searx/static/themes/simple/master/grunt-1.5.2
Bump grunt from 1.4.1 to 1.5.2 in /searx/static/themes/simple
2022-04-22 11:25:12 +02:00
Markus Heiser cf644b413e [test.pyright] suppress unneeded error & warning messages
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-22 11:16:41 +02:00
searxng-bot 9fd5d3b2ac [translations] update from Weblate
9398019a - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
2768987d - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
dc9e7f98 - 2022-04-21 - Markus Heiser <markus.heiser@darmarit.de>
b223bd62 - 2022-04-17 - Egor Ermakov <eg.ermakov2016@gmail.com>
715e7dac - 2022-04-18 - Mihai <miihairadu@gmail.com>
5c53a0ec - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
5906fd34 - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
691702ed - 2022-04-19 - Markus Heiser <markus.heiser@darmarit.de>
cc8bb018 - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
ebfab76a - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
a8ce22fa - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
e9b6e3c6 - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
6266ea2e - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
1729fbd8 - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
0d0f5293 - 2022-04-18 - Mihai <miihairadu@gmail.com>
1b022583 - 2022-04-18 - Markus Heiser <markus.heiser@darmarit.de>
f2a71d93 - 2022-04-18 - A. B <gamemc@virgilio.it>
30206782 - 2022-04-15 - Mico Hautaluoma <m@mha.fi>
10f54679 - 2022-04-17 - smallaxe80 <smallaxe1980@gmail.com>
2022-04-22 07:18:46 +00:00
Markus Heiser 4ab189315b [build] /static 2022-04-19 09:37:58 +02:00
Markus Heiser 2bcd610eeb [fix] add missing result.length and result.author to simple theme
Closes: https://github.com/searxng/searxng/issues/1027
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-19 09:37:41 +02:00
Alexandre Flament e22dc2ba36
Merge pull request #1099 from dalf/update_engine_descriptions
Update engine descriptions
2022-04-17 11:37:36 +02:00
Alexandre Flament bbf13a4657
Merge pull request #1101 from allendema/pass-cookies-from-settings
[enh] Allow passing headers/cookies from settings.yml
2022-04-17 11:37:07 +02:00
Allen dae8a08089
[fix[ Update only cookies/headers 2022-04-17 11:29:23 +02:00
Allen 67fb6fba84
[lint] Remove whitespace
From GH GUI
2022-04-17 10:42:25 +02:00
Allen f039873e1a
[mod] Make a default domain for ebay
Which can be changed.
2022-04-17 10:37:12 +02:00
Allen 15862ebc35
[mod] Pass desired ebay domain in settings
https://www.ebay.de
https://www.ebay.com
htttps://www.ebay.es

etc
2022-04-16 19:10:35 +02:00
Allen 155333f625
[enh] Allow passing headers/cookies from settings.yml
Example:

   - engine: xpath
   - search_url: example.org
   - headers: {'example_header': 'example_header'}
   - cookies: {'safesearch': 'off'}
2022-04-16 17:42:04 +02:00
Alexandre Flament 7bf9e12db9 Update searx.data - update_engine_descriptions.py 2022-04-16 13:17:39 +02:00
Alexandre Flament c474616642
Merge pull request #1071 from return42/fix-lang-dailymotion
[fix] dailymotion engine: filter by language & country
2022-04-16 11:54:49 +02:00
Alexandre Flament 4224607c62 searx.utils.html_to_text: replace <br/> by a space 2022-04-16 09:45:57 +02:00
Alexandre Flament 1a82e79b50 dailymotion: send valid value for the language parameter 2022-04-16 09:27:34 +02:00
Markus Heiser 3bb62823ec [fix] dailymotion engine: filter by language & country
- fix the issue of fetching more the 7000 *languages*
- improve the request function and filter by language & country
- implement time_range_support & safesearch
- add more fields to the response from dailymotion (allow_embed, length)
- better clean up of HTML tags in the 'content' field.

This is more or less a complete rework based on the '/videos' API from [1].
This patch cleans up the language list in SearXNG that has been polluted by the
ISO-639-3 2 and 3 letter codes from dailymotion languages which have never been
used.

[1] https://developers.dailymotion.com/tools/

Closes: https://github.com/searxng/searxng/issues/1065
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-16 09:27:34 +02:00
Vojtěch Fošnár ccd8305465
Merge branch 'searxng:master' into master 2022-04-15 16:10:49 +02:00
searxng-bot 9109ad706d [translations] update from Weblate
10e2e02d - 2022-04-14 - Markus Heiser <markus.heiser@darmarit.de>
723fc2b4 - 2022-04-14 - Markus Heiser <markus.heiser@darmarit.de>
8c3ef0ce - 2022-04-12 - Linerly <linerly@protonmail.com>
19b08ebf - 2022-04-10 - A. B <gamemc@virgilio.it>
5838445a - 2022-04-10 - BriLHR <brianlimapp@gmail.com>
a9541b96 - 2022-04-10 - Markus Heiser <markus.heiser@darmarit.de>
8f9c7cee - 2022-04-10 - Michal Kuncl <michal.kuncl@gmail.com>
54ea2973 - 2022-04-11 - Taufik Hidayat <tfkhdyt@pm.me>
2022-04-15 07:18:31 +00:00
dependabot[bot] e314cfe667
Bump grunt from 1.4.1 to 1.5.2 in /searx/static/themes/simple
Bumps [grunt](https://github.com/gruntjs/grunt) from 1.4.1 to 1.5.2.
- [Release notes](https://github.com/gruntjs/grunt/releases)
- [Changelog](https://github.com/gruntjs/grunt/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt/compare/v1.4.1...v1.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 07:11:47 +00:00
Vojtěch Fošnár de4af2fefd [enh] add seznam autocomplete 2022-04-14 03:02:05 +02:00
Jabster28 9eb1b04f48
change "Wolfram|Alpha" to "Wolfram Alpha" in search results 2022-04-12 10:37:33 +01:00
Alexandre Flament 27f8fa6fe0
Merge pull request #1048 from Linerly/patch-1
Improve the about page
2022-04-09 20:30:49 +02:00
Alexandre Flament 592cea0e5e
Merge pull request #1030 from austinhuang0131/master
(feat) add jisho.org
2022-04-09 18:57:20 +02:00
Alexandre Flament 74c7aee9ec jisho : code refactoring 2022-04-09 18:01:57 +02:00
Alexandre Flament e764427153
Merge branch 'master' into switch-md-parser 2022-04-09 15:24:11 +02:00
Markus Heiser 5e7f469911
Merge pull request #1051 from return42/fix-region-name
[fix] add missing territory (country) name
2022-04-09 14:54:43 +02:00
Paul Braeuning 02d64772f7
Merge pull request #1066 from unixfox/fix-icons-oscar
Revert "[fix] return correct favicon path"
2022-04-08 10:25:40 +02:00
Paul Braeuning 604d177551
Merge pull request #1064 from capric98/pretty-url
fix: %2F in path will be converted to " › " in searx/webapp.py
2022-04-08 10:08:51 +02:00
searxng-bot 01bbd1d0bd [translations] update from Weblate
45fc8afe - 2022-04-08 - Markus Heiser <markus.heiser@darmarit.de>
b187bba2 - 2022-04-08 - A. B <gamemc@virgilio.it>
9d380d66 - 2022-04-07 - A. B <gamemc@virgilio.it>
03029129 - 2022-04-07 - A. B <gamemc@virgilio.it>
be15e572 - 2022-04-06 - Linerly <linerly@protonmail.com>
71fb0c50 - 2022-04-03 - Markus Heiser <markus.heiser@darmarit.de>
2022-04-08 07:19:02 +00:00
Émilien Devos cad3d93fa2 Revert "[fix] return correct favicon path"
This fixes https://github.com/searxng/searxng/issues/1057
This reverts commit f99d109ceb.
2022-04-07 17:56:28 +00:00
HZH c7de5c043c
fix: %2F in path will be converted to " › " 2022-04-07 23:15:58 +08:00
Markus Heiser 9215281232 [mod] replace Markdown parser mistletoe by markdown-it-py
There are several reasons why we should prefer markdown-it-py over mistletoe:

- Get identical rendering results in SearXNG's `/info` pages and the SearXNG's
  project documentation which is build by Sphinx-doc.

  In the Sphinx-doc we use the MyST parser to render Markdown and the MyST
  parser itself is built on top of the markdown-it-py package.

- markdown-it-py has a typographer that supports *replacements*
  and *smartquotes* (e.g. em-dash, copyright, ellipsis, ...) [1]

- markdown-it-py is much more flexible compared to mistletoe [2]

- markdown-it-py is the fastest CommonMark compliant parser in python [3]

[1] https://markdown-it-py.readthedocs.io/en/latest/using.html#typographic-components
[2] https://markdown-it-py.readthedocs.io/en/latest/plugins.html
[3] https://markdown-it-py.readthedocs.io/en/latest/other.html#performance

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06 15:49:50 +02:00
mrpaulblack 170f0081c9 [build] /static 2022-04-06 15:07:42 +02:00
mrpaulblack 169f8d9988 [simple theme] add netloc to image result articles 2022-04-06 15:07:05 +02:00
Linerly 22309f398b
Fix spelling and punctuation 2022-04-06 12:36:17 +00:00
Markus Heiser 19ebd0e1ac [mod] review of the "Search Syntax" page (en)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06 14:13:22 +02:00
Markus Heiser 655db9b003 [mod] review of the "About SearXNG" page (en)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06 13:05:20 +02:00
Markus Heiser effcde3d0e [fix] add missing territory (country) name
Related-to: https://github.com/searxng/searxng/pull/1029#issuecomment-1086824911
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-05 16:48:25 +02:00
HZH 57a3252ff1
Unquote path on result page. 2022-04-05 02:37:18 +08:00
Linerly 036b46493b
Improve the about page 2022-04-02 20:51:11 +00:00
Alexandre Flament 765504ceca
Merge pull request #1031 from dalf/fix-bing-_fetch_supported_languages
Fix bing  fetch supported languages
2022-04-02 08:23:58 +02:00
Austin Huang 19fa0095a0
(fix) satisfy the linter, and btw reduce timeout 2022-04-01 09:23:24 -04:00
Austin Huang a399248f56
update jisho.py according to suggestions 2022-04-01 09:18:19 -04:00
dependabot[bot] b40d57df82 Bump grunt-contrib-uglify in /searx/static/themes/oscar
Bumps [grunt-contrib-uglify](https://github.com/gruntjs/grunt-contrib-uglify) from 5.0.1 to 5.1.0.
- [Release notes](https://github.com/gruntjs/grunt-contrib-uglify/releases)
- [Changelog](https://github.com/gruntjs/grunt-contrib-uglify/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt-contrib-uglify/compare/v5.0.1...v5.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 11:18:35 +02:00
dependabot[bot] c199eadaf9 Bump grunt-contrib-uglify in /searx/static/themes/simple
Bumps [grunt-contrib-uglify](https://github.com/gruntjs/grunt-contrib-uglify) from 5.0.1 to 5.1.0.
- [Release notes](https://github.com/gruntjs/grunt-contrib-uglify/releases)
- [Changelog](https://github.com/gruntjs/grunt-contrib-uglify/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt-contrib-uglify/compare/v5.0.1...v5.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 11:18:29 +02:00
searxng-bot 556e137f8e [translations] update from Weblate
74fb5882 - 2022-04-01 - Markus Heiser <markus.heiser@darmarit.de>
303aa210 - 2022-03-30 - dryragtax hamham uk <dryragtax@hamham.uk>
3eef1150 - 2022-03-30 - Markus Heiser <markus.heiser@darmarit.de>
fce33e06 - 2022-03-30 - Markus Heiser <markus.heiser@darmarit.de>
236dc6cb - 2022-03-31 - Joan Montané <joan@montane.cat>
666e5849 - 2022-03-28 - Markus Heiser <markus.heiser@darmarit.de>
3a6ee1c5 - 2022-03-28 - Markus Heiser <markus.heiser@darmarit.de>
42a5f993 - 2022-03-27 - Linerly <linerly@protonmail.com>
2022-04-01 07:18:22 +00:00
Markus Heiser 099840f4d6
Merge pull request #1035 from searxng/update_data_update_wikidata_units.py
Update searx.data - update_wikidata_units.py
2022-04-01 09:02:19 +02:00
Markus Heiser b853ab717e
Merge pull request #1034 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2022-04-01 09:01:48 +02:00
Markus Heiser c2de356497
Merge pull request #1033 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
2022-04-01 09:00:51 +02:00
dalf 086517d269 Update searx.data - update_wikidata_units.py 2022-04-01 06:27:23 +00:00
dalf d245ca97ca Update searx.data - update_ahmia_blacklist.py 2022-04-01 06:27:22 +00:00
dalf 084d9ab4e4 Update searx.data - update_currencies.py 2022-04-01 06:27:18 +00:00
dalf 4d55523247 Update searx.data - update_firefox_version.py 2022-04-01 06:27:13 +00:00
Alexandre FLAMENT 7d31b2c0af Update languages 2022-03-31 20:04:46 +00:00
Alexandre FLAMENT f00cdb5e51 bing engine: _fetch_supported_languages: don't use the language code as a country
ref #1029
2022-03-31 20:03:34 +00:00
Austin Huang 934ae4e086
(feat) add jisho.org
Closes #1016
2022-03-31 14:45:39 -04:00
Alexandre Flament d1334beb4f
Merge pull request #1023 from austinhuang0131/master
[fix] return correct plugin path
2022-03-29 21:27:16 +02:00
Austin Huang 96b8aac826
Extra null safety
Co-Authored-By: Alexandre Flament <alex.andre@al-f.net>
2022-03-29 15:17:36 -04:00
Austin Huang 6353b850b0
[fix] merge fake "plugins" endpoint back to "static"
https: //matrix.to/#/!vxScbLNEAmRvOraXBn:matrix.org/$0zqTtH3s-eVKlMwiAgiEJdetOkRx27EIRs-C0o8FzSg?via=libera.chat&via=matrix.org&via=tchncs.de
Co-Authored-By: Alexandre Flament <alex.andre@al-f.net>
2022-03-29 13:02:21 -04:00
Austin Huang f99d109ceb
[fix] return correct favicon path 2022-03-28 19:27:20 -04:00
Paul Braeuning b94fdd0df0
Merge pull request #1024 from MontyQI/answer-box
Fix answer box bug
2022-03-28 21:53:09 +02:00
Alexandre Flament 0379856712
Merge pull request #967 from return42/language-filter
[mod] add flags to the languages filter
2022-03-28 21:36:20 +02:00
Monty a5b013be4f [build] /static 2022-03-28 21:29:46 +02:00
Monty c09ce4d0f2 Fix answer box bug
Fix bug of too long words.
2022-03-28 21:29:13 +02:00
Austin Huang e09d2ad4a7
[fix] return correct plugin path
closes #1021
2022-03-28 15:24:01 -04:00
Alexandre Flament dec04c0ed6
Merge pull request #999 from return42/fix-doc-settings2
[docs] document settings.yml: search.languages
2022-03-26 17:09:07 +01:00
Alexandre Flament b44a29a5a2
Merge pull request #1004 from MontyQI/search_url
Search_url only if method is POST
2022-03-26 17:08:50 +01:00
Monty d4d42b423c Search_url only if method is POST
Shows search_url only if method is set to POST.
2022-03-26 13:52:38 +01:00
Markus Heiser a521d4985a [docs] document settings.yml: search.languages
Requested-by: @dalf https://github.com/searxng/searxng/pull/996#discussion_r830858139
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-26 13:32:42 +01:00
Markus Heiser ef8af285a2
Merge pull request #994 from return42/add-limiter-redis-doc
[doc] add some documentation about the limiter plugin (and redis)
2022-03-25 17:08:32 +01:00
mrpaulblack fb5169c839 [build] /static 2022-03-25 13:11:38 +01:00
mrpaulblack d8d42c8541 [fix] revert changes from #997
* in #997 there was a bug introduced: #1002
-> for now we just revert the change to make the image detail modal usable again
2022-03-25 13:08:17 +01:00
Markus Heiser 37493b0a1e [doc] add some documentation about the limiter plugin (and redis)
Requested-by: https://github.com/searxng/searxng/discussions/993#discussioncomment-2396914
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-25 11:26:10 +01:00
searxng-bot 1e3c0e4e3f [translations] update from Weblate
539bbc2a - 2022-03-25 - Markus Heiser <markus.heiser@darmarit.de>
b6819712 - 2022-03-25 - Markus Heiser <markus.heiser@darmarit.de>
8ae195a0 - 2022-03-25 - Markus Heiser <markus.heiser@darmarit.de>
3ae1423b - 2022-03-20 - Linerly <linerly@protonmail.com>
45dcd109 - 2022-03-21 - Colin Xu <xuzhonglinx@gmail.com>
8ade7993 - 2022-03-21 - Colin Xu <xuzhonglinx@gmail.com>
b815082a - 2022-03-20 - Markus Heiser <markus.heiser@darmarit.de>
cf6bffeb - 2022-03-20 - Markus Heiser <markus.heiser@darmarit.de>
b8132699 - 2022-03-23 - AHOHNMYC <lqwh2h2cwa@protonmail.com>
58736d0d - 2022-03-21 - Markus Heiser <markus.heiser@darmarit.de>
cffd9679 - 2022-03-21 - Markus Heiser <markus.heiser@darmarit.de>
94fe1122 - 2022-03-24 - Alexandre Flament <alex@al-f.net>
cdf14e88 - 2022-03-21 - Markus Heiser <markus.heiser@darmarit.de>
ab6bf599 - 2022-03-20 - Marc Abonce Seguin <marc-abonce@mailbox.org>
0c2a39e0 - 2022-03-20 - Markus Heiser <markus.heiser@darmarit.de>
2022-03-25 07:17:42 +00:00
Markus Heiser cfd08055ca
Merge pull request #963 from MontyQI/mobile-bar
Mobile bar google-like
2022-03-25 07:59:18 +01:00
Markus Heiser 7653e8bf16
Merge pull request #995 from return42/fix-932
[interim fix] static files can't be delivered by HTTP.
2022-03-25 06:56:11 +01:00
mrpaulblack 4ba9f98209 [build] /static 2022-03-24 22:25:14 +01:00
Monty 47dcf876ff [simple theme] refactor search form
* update search input form params; inspiried by whoogle
* remove autofocus from result page input form (JS impl. as well as input param)
-> autofocus on landing page still works only on desktop and tablet with JS impl.
* update landing page margins on mobile
* rework border and radius for search form to 0.8rem and outline
* remove positioning from autocomplete JS lib and use CSS impl.
* match search box and autocomplete width
* rework search form to a google like design on mobile
* fix settings icon display withg RTL on mobile on result page when search input is empty
2022-03-24 22:22:45 +01:00
Markus Heiser b14ed494fb
Merge pull request #996 from return42/fix-settings-doc
[docs] improve settings.yml documentation (admin/engines/settings)
2022-03-21 08:52:44 +01:00
Markus Heiser 32a35b4654 [docs] improve settings.yml documentation (admin/engines/settings)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-21 08:48:06 +01:00
Markus Heiser 11b2724b29 [build] /static 2022-03-20 19:32:59 +01:00
Markus Heiser 022479d4c2 [fix] Text can't be selected when using simple theme with JS enabled
Closes: https://github.com/searxng/searxng/issues/794
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-20 19:32:40 +01:00
Markus Heiser 2486cdc2dc [build] /static 2022-03-20 18:12:42 +01:00
Alexandre Flament 6eae697c73 simple theme: upgrade some of dependencies
* less-plugin-clean-css: no updated version.
  @wikipedia/less-plugin-clean-css might be an alternative.

* stylelint & stylelint-config-standard
  the new versions require configuration and source code changes
2022-03-20 18:10:24 +01:00
Markus Heiser fd5fcdedce [interim fix] static files can't be delivered by HTTP.
Since PR 932 [1][2] static files can't be delivered by HTTP server any longer.

This patch makes the hash paramter in the URL of static files:

    /static/themes/simple/css/searxng.min.css?5fde34a74bc438c7b56ec8c6501e131cc9914bd8

optional.  By default the hash parameter is disabled.

HINT:

  Instances that do not deliver static files by their HTTP server and have a
  long expire time [3] should enable this option.

----

This is only a interim solution, on the long run:

    make static.build.commit

creates files including the file name:

    css/searxng-5fde34a74bc438c7b56ec8c6501e131cc9914bd8.min.css

and a mapping.json with this content[4]

[1] https://github.com/searxng/searxng/issues/964
[2] https://github.com/searxng/searxng/pull/932#issuecomment-1067039518
[3] 5583336440
[4] https://github.com/searxng/searxng/pull/932#issuecomment-1067216426

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-20 16:28:14 +01:00
Alexandre Flament b25f118d64
Merge pull request #990 from dalf/searxng_base_url
settings.yml: allow to base_url with the SEARXNG_BASE_URL env variable
2022-03-20 09:15:15 +01:00
Markus Heiser 3201aa1b3f
Merge pull request #859 from return42/fix-814
[mod] add i18n infrastructure for SearXNG message files (searxng.msg)
2022-03-20 08:31:07 +01:00
Markus Heiser bc30309939
Merge pull request #992 from return42/fix-987
[fix] settings.yml: ui.results_on_new_tab
2022-03-19 23:14:03 +01:00
Markus Heiser e4a2bfba38 [fix] settings.yml: ui.results_on_new_tab
Closes: https://github.com/searxng/searxng/issues/987
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-19 23:06:21 +01:00
Alexandre Flament 2366345429 [build] /static 2022-03-19 20:51:51 +01:00
Alexandre Flament 84340f56ec simple theme: JS version: the reset button clear the text
The <input type="reset"> introduced in the PR 894, restores the default value.
It works in the index page, but it doesn't work in the /search page:
the reset button restore the initial query.

This PR:
* fix the JS version: the reset button clear the text
* keep the clear button in the / page
* hide the clear button in the /search page
2022-03-19 20:49:37 +01:00
Alexandre Flament 8d83787318 settings.yml: allow to base_url with the SEARXNG_BASE_URL env variable
Related to https://github.com/searxng/searxng-docker/pull/12
2022-03-19 20:20:13 +01:00
Markus Heiser 076c6889d3 [fix] simple theme: open preferences with general tab
BTW: fix also the category tab to open with category 'general'

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-19 19:55:54 +01:00
mrpaulblack f428dea87c [build] /static 2022-03-19 18:02:33 +01:00
mrpaulblack 3620d006a4 [fix] naming of id for prefs in css 2022-03-19 18:02:10 +01:00
Markus Heiser 2e4557f3f3 [fix] languages: show country name even if there is only one country
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-19 16:45:14 +01:00
Markus Heiser a25e3767d4 [fix] don't show flags for languages without region identifier
SearXNG shows two different things:

region:
  "de-CH" is the equivalent of "Schweiz (de)" in DDG.

languages:
  "en" doesn't say anything about the location. It is up the engines to do their
  best to select English results without a region.

Suggested-by: @dalf https://github.com/searxng/searxng/pull/967#issuecomment-1072979693
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-19 15:09:13 +01:00
Markus Heiser 2841abaf55 [mod] add flags to the languages filter
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-19 15:09:13 +01:00
Markus Heiser 7625da9fa0
Merge pull request #986 from dalf/fix-startpage-fetch_supported_languages
fix startpage: update XPath in _fetch_supported_languages
2022-03-19 14:49:22 +01:00
Alexandre Flament 378b29be2f fix startpage: update XPath in _fetch_supported_languages 2022-03-19 14:16:37 +01:00
Alexandre Flament b692035120
Merge pull request #894 from dalf/simple-aria-1
[enh] simple: basic ARIA fixes
2022-03-19 12:00:03 +01:00
searxng-bot 06ff1ad967 [translations] update from Weblate
5ef4a876 - 2022-03-16 - Joseph Ko <eaglclaws@gmail.com>
4f81930f - 2022-03-16 - Markus Heiser <markus.heiser@darmarit.de>
7d2abf90 - 2022-03-17 - Markus Heiser <markus.heiser@darmarit.de>
87d5542e - 2022-03-16 - Markus Heiser <markus.heiser@darmarit.de>
d39c1e67 - 2022-03-16 - Joseph Ko <eaglclaws@gmail.com>
7b0c3b03 - 2022-03-16 - Joseph Ko <eaglclaws@gmail.com>
fc37b695 - 2022-03-16 - Joseph Ko <eaglclaws@gmail.com>
7df01eea - 2022-03-16 - Joseph Ko <eaglclaws@gmail.com>
56af42c2 - 2022-03-13 - Markus Heiser <markus.heiser@darmarit.de>
4b17697d - 2022-03-14 - Joseph Ko <eaglclaws@gmail.com>
f5523f9d - 2022-03-12 - Markus Heiser <markus.heiser@darmarit.de>
04998001 - 2022-03-12 - Nik Drešar <nik.dresar@gmail.com>
e6f4d878 - 2022-03-13 - AHOHNMYC <lqwh2h2cwa@protonmail.com>
ede86266 - 2022-03-11 - Matheus Henrique <niletcode@gmail.com>
362b7f2e - 2022-03-12 - Markus Heiser <markus.heiser@darmarit.de>
da14280c - 2022-03-13 - Markus Heiser <markus.heiser@darmarit.de>
d68537d2 - 2022-03-12 - PLefebvreBJO <contact@plefebvrebjo.com>
da27e825 - 2022-03-12 - Markus Heiser <markus.heiser@darmarit.de>
1d00cc00 - 2022-03-12 - Markus Heiser <markus.heiser@darmarit.de>
2022-03-18 07:17:25 +00:00
Alexandre Flament 26d47fe587
Merge pull request #975 from return42/fix-723
[fix] remove unmaintained searx/templates/simple/simple.spec.txt
2022-03-17 19:41:23 +01:00
Markus Heiser 3922612775 [fix] remove unmaintained searx/templates/simple/simple.spec.txt
Files hasn't been updated since it initial commit in 2017

Closes: https://github.com/searxng/searxng/issues/723
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-17 11:38:00 +01:00
Alexandre Flament dbe3eaabc9 Info: code refactoring & bug fixes 2022-03-16 22:26:36 +01:00
mrpaulblack a1776ff57d [build] /static 2022-03-16 21:01:42 +01:00
mrpaulblack 6a8e168e25 [simple theme] use default font and font-size in info page 2022-03-16 21:01:22 +01:00
Markus Heiser 9622dbbc6b [upd] searx/translations/messages.pot
generated by::

  ./manage pyenv.cmd pybabel extract \
      -F babel.cfg \
      -o "searx/translations/messages.pot"\
      "searx/"

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-16 09:55:53 +01:00
Markus Heiser 784bf9ed15 [mod] move category and names of constants to searx/searxng.msg
Closes: https://github.com/searxng/searxng/issues/814
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-16 09:55:53 +01:00
Markus Heiser b9cf3c82a1 [mod] add i18n infrastructure for SearXNG message files (searxng.msg)
With this patch ``searxng.msg`` files can be added to SearXNG.  In
``searxng.msg`` files messages can be defined which are not captured by babel's
gettext, like the generic names of the categories or messages that are stored in
constants.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-16 09:55:53 +01:00
Markus Heiser cd92a7eacd
Merge pull request #930 from return42/merge-user-doc2
Integrate the user documentation into the application
2022-03-13 23:12:46 +01:00
Alexandre Flament 1157462ff9 Various change on PR 930 2022-03-13 22:22:02 +01:00
Markus Heiser 59100e8525 [fix] add module for backward compatibility
cache_property has been added in py3.8 [1]

To support cache_property in py3.7 the implementation from 3.8 has been
copied to compat.py.  This code can be cleanup with EOL of py3.7.

[1] https://docs.python.org/3/library/functools.html#functools.cached_property

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-12 15:45:28 +01:00
Markus Heiser 8d83e4aeff [build] /static 2022-03-12 11:36:31 +01:00
Markus Heiser 3633dc5611 [simple] add CSS for /info pages
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-12 11:36:31 +01:00
Markus Heiser b1912607ae [mod] replace /help by /info pages and include pages in project docs
This patch implements a bolierplate to share content from info-pages of the
SearXNG instance (URL /info) with the project documentation (path /docs/user).

The info pages are using Markdown (CommonMark), to include them in the project
documentation (reST) the myst-parser [1] is used in the Sphinx-doc build chain.

If base_url is known (defined in settings.yml) links to the instance are also
inserted into the project documentation::

    searxng_extra/docs_prebuild

[1] https://www.sphinx-doc.org/en/master/usage/markdown.html

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-12 11:36:31 +01:00
searxng-bot e475828ed2 [translations] update from Weblate
7f5432c9 - 2022-03-11 - Matheus Henrique <niletcode@gmail.com>
1d7a266c - 2022-03-07 - Markus Heiser <markus.heiser@darmarit.de>
54256fcf - 2022-03-08 - Dmitry Zakharchenko <dmitz@disroot.org>
5240149c - 2022-03-08 - Dmitry Zakharchenko <dmitz@disroot.org>
db511b5a - 2022-03-07 - Deleted User <noreply+256@weblate.org>
114f4399 - 2022-03-04 - Markus Heiser <markus.heiser@darmarit.de>
2022-03-11 07:17:00 +00:00
Alexandre Flament d597f36e07 [fix] simple: the clear button works without javascript
related to #928
2022-03-08 19:37:21 +00:00
Alexandre Flament a250ddadb9 [enh] simple: basic ARIA fixes 2022-03-08 19:37:21 +00:00
Markus Heiser 53b5a804e2 [fix] engine mediathekviewweb: replace http links by https
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-07 19:49:16 +01:00
Martin Fischer 579334a7d8 [help] move about.md to searx/help/en/ 2022-03-07 08:29:00 +01:00
Alexandre Flament 740e3bc90f
Merge pull request #932 from dalf/static-file-hash
static files: add a hash as a query
2022-03-05 12:03:44 +01:00
Markus Heiser 20f4538e13 [fix] engine: Semantic Scholar (Science) // rework & fix
Closes: https://github.com/searxng/searxng/issues/939
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-05 11:53:41 +01:00
Alexandre Flament 1c7d8815fb [mod] URL for the static file contains the sha1
* allow to cache the static file forever
* avoid bugs when the static files are updated but not reloaded
2022-03-05 10:50:48 +00:00
Alexandre FLAMENT 041446d12a [build] /static 2022-03-04 08:28:58 +00:00
Alexandre FLAMENT 8ffbaa086a [simple] switch to the tablet layout at 79.75em
The previous value was 80em (1280px).
Some desktop screens have this resolution,
and tablet layout takes too much space in this configuration

This PR switch to the table layout for screen width strictly below 1280px.

Close https://github.com/searxng/searxng/issues/874
2022-03-04 08:26:02 +00:00
searxng-bot ebcf78eaa5 [translations] update from Weblate
82b357ae - 2022-03-02 - Markus Heiser <markus.heiser@darmarit.de>
5aa11c25 - 2022-03-02 - Markus Heiser <markus.heiser@darmarit.de>
c188070f - 2022-02-25 - OctopusET <sumoon@seoulsaram.org>
9b93e452 - 2022-02-26 - Markus Heiser <markus.heiser@darmarit.de>
2a286e9a - 2022-02-25 - OctopusET <sumoon@seoulsaram.org>
2022-03-04 07:17:06 +00:00
Alexandre FLAMENT 28bccda78a [build] /static 2022-03-02 18:56:37 +00:00
Alexandre Flament 3d9e48b84e [simple] checkboxes can get the focusable
Do note that checkboxes in the engine tab are displayed reversed.
See: 3408d061aa/searx/templates/simple/preferences.html (L313)
A checkbox for an engine is checked when the engine is disabled.
2022-03-02 18:56:08 +00:00
Markus Heiser 0ddcc12474
Merge pull request #934 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2022-03-01 07:54:58 +01:00
Markus Heiser 69f84d941f
Merge pull request #935 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2022-03-01 07:53:33 +01:00
Markus Heiser 5508155252
Merge pull request #936 from searxng/update_data_update_wikidata_units.py
Update searx.data - update_wikidata_units.py
2022-03-01 07:52:54 +01:00
dalf f4c6eba227 Update searx.data - update_currencies.py 2022-03-01 06:25:18 +00:00
dalf 6946c4566f Update searx.data - update_wikidata_units.py 2022-03-01 06:24:57 +00:00
dalf 49bc3971ae Update searx.data - update_firefox_version.py 2022-03-01 06:24:55 +00:00
dalf 6add9dd6d3 Update searx.data - update_ahmia_blacklist.py 2022-03-01 06:24:53 +00:00
Alexandre Flament 2e1d4fac5d [build] /static 2022-02-27 19:49:44 +01:00
Alexandre Flament 56bb1443c4 [fix] simple: display "Click on the magnifier..." only the mouse over the categories 2022-02-27 19:48:21 +01:00
Alexandre Flament e435806505 [fix] simple: detect touch screen using media query
related to https://github.com/searxng/searxng/issues/928
2022-02-27 19:26:52 +01:00
mrpaulblack e2a5dddf8e [build] /static 2022-02-26 22:32:28 +01:00
mrpaulblack 21e3c40516 [simple theme] replace Image_layout.js with flexbox CS impl.
* drop image_layout.js from simple theme
* move image_layout.js to oscar theme and delete common js dir (since its empty now)
* align top position of image detail modal with bottom position of search header
* use flexbox to display images; row height can be set via @results-image-row-height in defenitions.less
* display span title underneath each image with a max width of 12rem
* increase margin and padding around image article on desktop and tablet
* make article height smaller on phone layout (height of 6rem) to display more content on current view
* remove content from result, if the title and content matches
* use a group that cotains the flex image article, if images are mixed with other categories
* fix pylint issues in webapp.py
* use the default.html result template in unit tests (thanks @return42)
2022-02-26 22:31:47 +01:00
Paul Braeuning 3408d061aa
Merge pull request #924 from MontyQI/search-filters
Search filters changes
2022-02-26 10:16:06 +01:00
Monty 6d03fa002f [build] /static 2022-02-26 10:07:07 +01:00
Monty b850178d26 Search filters changes
Better search filters view on mobile.
2022-02-26 10:05:23 +01:00
searxng-bot 338304078b [translations] update from Weblate
3ecf1edf - 2022-02-21 - Linerly <linerly@protonmail.com>
f6c9465b - 2022-02-23 - Markus Heiser <markus.heiser@darmarit.de>
988c0c74 - 2022-02-22 - Alexandre Flament <alex@al-f.net>
60fbd734 - 2022-02-22 - Markus Heiser <markus.heiser@darmarit.de>
2022-02-25 07:16:36 +00:00
Markus Heiser 8d937179ab
Merge pull request #913 from return42/add-artwork
[mod] add artwork to mixcloud & soundcloud engines
2022-02-21 22:24:40 +01:00
Markus Heiser 96ac99b1f6 [build] /static 2022-02-21 22:16:24 +01:00
Markus Heiser b08b81b434 [mod] bandcamp & genius: in result set img_src instead thumbnail
Suggested-by: @dalf https://github.com/searxng/searxng/pull/900#issuecomment-1046009057
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-21 22:12:07 +01:00
Markus Heiser bded1ee280 [fix] genius: add player an avoid exceptional programming
Add player:

- The players are just playing 30sec from the title.  Some of the player will be
  blocked because of a cross-origin request and some players will link to apple
  when you press the play button.

Avoid exceptions and (and BTW improve results)

-  ERROR   searx.engines.genius          : list index out of range

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-21 22:12:07 +01:00
Léon Tiekötter de5062c10a
[mod] version formatting
Change SearXNG version formatting to YYYY.MM.DD-commit_hash
2022-02-21 21:18:37 +01:00
Alexandre Flament 8230603f48
Merge pull request #916 from dalf/pref_infinite_scroll2
Convert the infinite_scroll plugin as a preference (second version)
2022-02-21 12:49:04 +01:00
Alexandre Flament 1832ec742a [build] /static 2022-02-20 22:58:51 +01:00
Alexandre Flament 56e34947a6 [mod] infinite_scroll as preference
* oscar theme: code from searx/plugins/infinite_scroll.py
* simple theme: new implementation

Co-authored-by: Markus Heiser <markus.heiser@darmarIT.de>
2022-02-20 22:58:51 +01:00
Markus Heiser 5ec9eb8030 [mod] switch default theme from oscar to simple
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-20 18:36:41 +01:00
Markus Heiser 36aee70c24
Merge pull request #910 from tiekoetter/fix-909
[fix] google images engine: Fix 'scrap_img_by_id' function
2022-02-20 18:29:50 +01:00
Markus Heiser 2921d3cd17 [mod] add artwork to mixcloud & soundcloud engines
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-19 21:59:12 +01:00
Markus Heiser efd81f9266 [build] /static 2022-02-19 15:13:09 +01:00
Markus Heiser 16d05ca285 [mod] simple theme: define a '.show-content-button'
With LESS function '.show-content-button' all the *Show-Media* links becomes
bottons.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-19 15:12:50 +01:00
Markus Heiser c2d9c93b3b [fix] image_proxy: allow HTTP redirects
Without redirects the load of various images will fail when image_proxy is
enabled [1].

[1] https://github.com/searxng/searxng/pull/910#issuecomment-1045966577
Suggested-by: @dalf [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-19 14:34:02 +01:00
Markus Heiser 4a28b593c2 [fix] google images engine: Fix 'scrap_img_by_id' function
The 'scrap_img_by_id' function didn't return any longer anything useful.  This
fix allows the google images engine to present the full source image instead of
only the thumbnail.

The function scrap_img_by_id() is rpelaced by a fully rewrite to parse image
URLs by a regular expression. The new function parse_urls_img_from_js(dom)
returns a mapping of data-id to image URL.

Closes: https://github.com/searxng/searxng/issues/909
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-19 14:33:56 +01:00
Alexandre Flament ace5401632
Merge pull request #900 from return42/fix-883
[fix] bandcamp: fix itemtype (album|track) and exceptions
2022-02-19 13:42:53 +01:00
Markus Heiser e9a227c606
Merge pull request #893 from return42/mvw-video
[mod] mediathekviewweb engine: add data_src and use videos template
2022-02-19 00:55:46 +01:00
Markus Heiser 943a7fdcb5 [mod] mediathekviewweb engine: add iframe_src and use videos template
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-19 00:50:54 +01:00
Markus Heiser fa3cd7a696 [build] /static 2022-02-18 22:46:51 +01:00
Markus Heiser 05c105b837 [fix] bandcamp: fix itemtype (album|track) and exceptions
BTW: polish implementation and show tracklist for albums

Closes: https://github.com/searxng/searxng/issues/883
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 22:44:43 +01:00
Alexandre Flament 29182eb1c9
Merge pull request #899 from dalf/limiter_update
[limiter] update
2022-02-18 22:17:26 +01:00
Alexandre Flament bf2a2ed48f
Merge pull request #882 from return42/fix-873
[fix] replace embedded HTML by data_src
2022-02-18 20:55:40 +01:00
Markus Heiser 761885682d [build] /static 2022-02-18 19:00:51 +01:00
Markus Heiser 8acf540f0e [mod] simple theme: set height of embedded content (iframe)
This commit sets appropriate height of the (embedded) player from:

- soundcloud
- mixcloud
- deezer

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 19:00:51 +01:00
Markus Heiser 7352c6bc79 [mod] templates: rename field for <iframe> URL to iframe_src
Rename result field data_src to iframe_src

Suggested-by: @dalf https://github.com/searxng/searxng/pull/882#issuecomment-1037997402
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 19:00:49 +01:00
Markus Heiser f5e8cfade2 [fix] simple theme: support browsers which do not have aspect-ratio
Suggested-by: @dalf https://github.com/searxng/searxng/pull/882#discussion_r805187303
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 19:00:02 +01:00
Markus Heiser 50ee7bcac6 [oscar] add scrolling="no" to iframes in HTML templates
Suggested-by: @dalf https://github.com/searxng/searxng/pull/882#discussion_r805180787
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 19:00:02 +01:00
Markus Heiser 795e8af61d [fix] hostname_replace.py: don't stop replace URL in fields
This is a rewrite of the hostname_replace.py that:

- don't stop to replace URL in fields ('data_src', 'audio_src') if there isn't a
  'parsed_url',
- adds a comment about keep or remove a result from the result list
- adds a loop over ['data_src', 'audio_src'] instead of doubling code lines

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 18:59:58 +01:00
searxng-bot 1084f5f42c [translations] update from Weblate
8daeaf72 - 2022-02-16 - mezysinc <mezysinc@mailsac.com>
f373b0a4 - 2022-02-13 - temp <temp@mykolab.com>
273ae271 - 2022-02-16 - Márton Farkas <farkasmrton@gmail.com>
956496a3 - 2022-02-12 - Alexandre Flament <alex@al-f.net>
acf6d3ae - 2022-02-15 - Markus Heiser <markus.heiser@darmarit.de>
aec5670e - 2022-02-11 - Markus Heiser <markus.heiser@darmarit.de>
2022-02-18 07:17:24 +00:00
Alexandre Flament d1b7debac6 [limiter] update 2022-02-17 20:27:02 +01:00
Markus Heiser ae8b174e93 [fix] replace peer.tube by peertube.biz
More peertube instances are listed at [1]

[1] https://instances.joinpeertube.org/instances

Closes: https://github.com/searxng/searxng/issues/881
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-13 22:48:09 +01:00
Markus Heiser 98cab4cf75 [mod] result_templates/default.html replace embedded HTML by data_src audio_src
Embedded HTML breaks SearXNG architecture.  To modularize, HTML is generated in
the templates (oscar & simple) and result parameter 'embedded' is replaced by
'data_src' (and 'audio_src'), an URL for embedded content (<iframe>).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-13 14:20:47 +01:00
Markus Heiser b9a2e8b387 [mod] hostname_replace: replace hostnames in result's data_src param
To test you need to redirect embeded videos (e.g.) from youtube to a invidios
instance.  Search for videos using engine `!youtube lebowski`.  The result URLs
and the embeded videos should link to the invidios instance.

Here is an example of such a `hostname_replace` configuration::

    hostname_replace:

      # youtube --> Invidious

      '(.*\.)?youtube-nocookie\.com': 'invidio.xamh.de'
      '(.*\.)?youtube\.com$': 'invidio.xamh.de'
      '(.*\.)?invidious\.snopyta\.org$': 'invidio.xamh.de'
      '(.*\.)?vid\.puffyan\.us': 'invidio.xamh.de'
      '(.*\.)?invidious\.kavin\.rocks$': 'invidio.xamh.de'
      '(.*\.)?inv\.riverside\.rocks$': 'invidio.xamh.de'

Closes: https://github.com/searxng/searxng/issues/873
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-13 14:20:47 +01:00
Markus Heiser 46e131fdad [mod] result_templates/videos.html: replace embedded HTML by data_src
Embedded HTML breaks SearXNG architecture.  To modularize, HTML is generated in
the templates (oscar & simple) and result parameter 'embedded' is replaced by
'data_src', an URL for embedded content (<iframe>).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-13 14:20:47 +01:00
Alexandre Flament a4942213a1
Merge pull request #892 from dalf/limiter-update
plugin limiter: check only /image_proxy and /search
2022-02-12 18:17:05 +01:00
Alexandre Flament b99ccd7c02 plugin limiter: check only /image_proxy and /search
also adjust the number of req/time
2022-02-12 15:57:07 +01:00
Markus Heiser 9cd9dfd26e
Merge pull request #887 from unixfox/patch-5
Update the XPath for fetching the Google results
2022-02-12 15:11:27 +01:00
Alexandre Flament 782c81ec17
Merge pull request #884 from return42/disable-deezer
[mod] disable deezer engine by default
2022-02-11 22:39:18 +01:00
searxng-bot eee41a2857 [translations] update from Weblate
085368cc - 2022-02-08 - akynr <ak.red@web.de>
9b531712 - 2022-02-09 - Justas Zabulionis <justas.zabulionis@gmail.com>
6e13d297 - 2022-02-06 - Markus Heiser <markus.heiser@darmarit.de>
b1ac1da2 - 2022-02-06 - Markus Heiser <markus.heiser@darmarit.de>
de117bfe - 2022-02-10 - Tamas Veres <zsumba1985@gmail.com>
7392a5b0 - 2022-02-10 - Markus Heiser <markus.heiser@darmarit.de>
a28a60d9 - 2022-02-07 - Markus Heiser <markus.heiser@darmarit.de>
2022-02-11 07:16:09 +00:00
Émilien Devos 7d3e8118b0
Update the XPath for fetching the Google results 2022-02-09 14:34:14 +01:00
Markus Heiser f2e16904a5 [mod] disable deezer engine by default
To play content from deezer a account is needed, the majority of the SearXNG
won't have.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-07 22:58:05 +01:00
Markus Heiser 906a0a99cd [fix] openstreatmap: load thumbnail from uploads.wikimedia.org
Openstreatmap images are now loaded from uploads.wikimedia.org instead of
commons.wikimedia.org to prevent redirects.

With `image_proxy` enabled images from commons.wikimedia.org cant be loaded
since they are redirected.  We already discussed this issue [875] and
@tiekoetter fixed this issue in PR [878].

Related-to:
- [875] https://github.com/searxng/searxng/issues/875
- [878] https://github.com/searxng/searxng/pull/878
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-07 13:05:52 +01:00
Markus Heiser a967e59590 [pylint] searx/engines/wikidata.py (no functional change)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-07 10:15:32 +01:00
Léon Tiekötter 1c151ae92b
[fix] wikidata: URL decoding and file extension handling
Add '.png' to the second img_src_name if it has the extension '.svg'.
Use urllib.parse.unquote for URL decoding.
2022-02-07 00:21:02 +01:00
Markus Heiser a13c5d70c7 [fix] wikidata engine: select image with higher (not lower) priority
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-06 23:35:55 +01:00
Léon Tiekötter a50f32bcfc
wikidata: load thumbnail instead of full image 2022-02-06 23:25:50 +01:00
Léon Tiekötter 560a14e77b
[fix] wikidata info box images
Wikidata info box images are now loaded from uploads.wikimedia.org instead of commons.wikimedia.org to prevent redirects

Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-06 22:16:06 +01:00
Alexandre Flament 10e6881ca8
Merge pull request #867 from return42/fix-base_url_rand
[fix] invidious engine: store random base_url in param
2022-02-05 09:03:20 +01:00
Alexandre Flament bf987bb608
Merge pull request #848 from not-my-profile/help-route
Introduce `/help` route
2022-02-05 08:52:19 +01:00
Martin Fischer 91527fbd6b [enh] avoid /about redirect in template links 2022-02-05 04:53:21 +01:00
Markus Heiser 24e2acf88e
Merge pull request #839 from dalf/docs_searx_utils
[mod] add documentation about searx.utils
2022-02-04 21:28:27 +00:00
Martin Fischer 07936060d1 preferences: Set autocomplete=off for form
Otherwise you can change the value of a select,
refresh the page and the preferences stay changed,
leaving the wrong impression that they were saved.
2022-02-04 21:11:29 +01:00
Markus Heiser b35ef9789b [pylint] engines/invidious.py
Fix remarks from pylint and remove usless comments

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-04 15:42:06 +01:00
Markus Heiser e2ec6b4211 [fix] invidious engine: store random base_url in param
Two different threads ( = two different user queries) can call the request
function in a row and then the response function.  The namespace will be same
since this is the same engine.

To keep exactly the same value ``base_url`` must be stored in params and then
retrieve using ``resp.search_params["base_url"]``.

Suggested-by: @dalf https://github.com/searxng/searxng/pull/862#discussion_r799324861
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-04 15:42:06 +01:00
Markus Heiser ae804ddf40
Merge pull request #862 from return42/fix-858
[fix] solidtorrents engine - JSON API no longer exists
2022-02-04 14:38:36 +00:00
Markus Heiser ddc2102a07 [fix] solidtorrents engine: store random bas_url in param
Two different threads ( = two different user queries) can call the request
function in a row and then the response function.  The namespace will be same
since this is the same engine.

To keep exactly the same value ``base_url`` must be stored in params and then
retrieve using ``resp.search_params["base_url"]``.

Suggested-by: @dalf https://github.com/searxng/searxng/pull/862#discussion_r799324861
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-04 14:55:21 +01:00
Markus Heiser d6061b7c8a [mod] solidtorrents engine: add metadata & torrentfile
BTW: define min_len in eval_xpath_list of 'stats' list

Suggested-by: @dalf https://github.com/searxng/searxng/pull/862#pullrequestreview-872910744
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-04 14:53:42 +01:00
Markus Heiser f9c4868142 [fix] solidtorrents engine: use get_torrent_size from searx.utils
Suggested-by: @dalf https://github.com/searxng/searxng/pull/862#pullrequestreview-872858489
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-04 14:53:42 +01:00
Markus Heiser d92b3d96fd [fix] solidtorrents engine: JSON API no longer exists
The API endpoint, we where using does not exist anymore.  This patch is a
rewrite that parses the HTML page.

Related: https://github.com/paulgoio/searxng/issues/17
Closes: https://github.com/searxng/searxng/issues/858

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-04 14:53:37 +01:00
Markus Heiser de32d543bc
Merge pull request #863 from searxng/dependabot/pip/master/black-22.1.0
Bump black from 21.12b0 to 22.1.0
2022-02-04 08:52:22 +00:00
Markus Heiser 2e5d562da3
Merge pull request #865 from searxng/dependabot/npm_and_yarn/searx/static/themes/simple/master/sharp-0.30.0
Bump sharp from 0.29.3 to 0.30.0 in /searx/static/themes/simple
2022-02-04 08:52:04 +00:00
Markus Heiser 964902e779 [fix] issue reported by pylint 22.1.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-04 09:45:35 +01:00
searxng-bot cc99386523 [translations] update from Weblate
bf218121 - 2022-01-31 - Markus Heiser <markus.heiser@darmarit.de>
ba9e50fd - 2022-01-30 - Genghis Khan <genghiskhan@gmx.ca>
258505ba - 2022-01-29 - Markus Heiser <markus.heiser@darmarit.de>
dacbf882 - 2022-01-31 - Markus Mikkonen <markus.mikkonen@outlook.com>
968e7f6b - 2022-02-02 - Marco Ciampa <ciampix@posteo.net>
2022-02-04 07:14:12 +00:00
dependabot[bot] 6eee2d8771
Bump sharp from 0.29.3 to 0.30.0 in /searx/static/themes/simple
Bumps [sharp](https://github.com/lovell/sharp) from 0.29.3 to 0.30.0.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md)
- [Commits](https://github.com/lovell/sharp/compare/v0.29.3...v0.30.0)

---
updated-dependencies:
- dependency-name: sharp
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 07:10:14 +00:00
Alexandre Flament 9fae80facb
Merge pull request #618 from dalf/limiter
[enh] limiter plugin
2022-02-02 09:24:34 +01:00
Alexandre Flament f79b0fce06 [enh] limiter plugin
can replace filtron:
* rate limite the number of request per IP and per (IP, User-Agent)
* block some bots

use Redis
data stored in Redis never contains the IP addresses, only HMAC using the secret_key

Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-02 09:15:59 +01:00
Markus Heiser 07f7289e23
Merge pull request #849 from return42/fix-787
[fix] engines description - currency_convert.py
2022-02-01 07:19:05 +00:00
Markus Heiser 50a56532c4 [pylint] engines/currency_convert.py
Fix remarks from pylint

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-01 08:02:42 +01:00
Markus Heiser 314ea2dc61
Merge pull request #852 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2022-02-01 06:52:57 +00:00
Markus Heiser 4d0bd47ff0
Merge pull request #853 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2022-02-01 06:52:19 +00:00
Markus Heiser 20cbabff96
Merge pull request #851 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
2022-02-01 06:48:54 +00:00
dalf f4f90aa3a4 Update searx.data - update_firefox_version.py 2022-02-01 06:23:16 +00:00
dalf 7b402e1aa0 Update searx.data - update_ahmia_blacklist.py 2022-02-01 06:23:01 +00:00
dalf 1c47f4b6e0 Update searx.data - update_currencies.py 2022-02-01 06:23:00 +00:00
dalf e78dc45d1e Update searx.data - update_wikidata_units.py 2022-02-01 06:22:58 +00:00
Martin Fischer 14338e2c3b [enh] generate navigation for help pages 2022-02-01 06:29:22 +01:00
Martin Fischer c53c295573 [enh] make searx.user_help use an explicit TOC
When we have multiple help pages we want them
to be displayed in a specific order.
2022-02-01 06:29:22 +01:00
Martin Fischer 0f7bcd17b2 [build] /static 2022-02-01 06:29:19 +01:00
Martin Fischer 5012d06e72 [simple] allow .tabs to be used for help pages 2022-02-01 06:28:26 +01:00
Martin Fischer fb9eedbf40 [enh] introduce /help route
Translation will be implemented in the future.
For now the "en" in /help/en/<pagename> is hardcoded.
2022-02-01 06:28:26 +01:00
Martin Fischer b93711b45d [help] remove link from about.md title
Now that about.html extends page_with_header.html
it already has a link to the start page and removing
the link makes it easier to extract the page title
from the Markdown for the following commit.
2022-02-01 06:28:26 +01:00
Martin Fischer 08bb3a5f3a [pyright:basic] searx.user_help 2022-02-01 06:28:26 +01:00
Martin Fischer e931590312 [build] /static 2022-02-01 06:22:44 +01:00
Martin Fischer b6200563ba [simple] improve margin of #linkto_preferences
Co-authored-by: Paul Braeuning <paul@paulgo.io>
2022-02-01 06:22:29 +01:00
Markus Heiser 15320b5eec [fix] engines description - currency_convert.py
Currency engine has DuckDuckGo metadata

In the engine selector of the preferences window, the currency search engine has
the same metadata and wikidata url as duckduckgo, I'd assume there should be a
difference of some sort there clarifying what source the currency uses or, if
it's a duckduckgo service, at least clarifying that it's a currency service by
duck duck go.

Closes: https://github.com/searxng/searxng/issues/787
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-31 23:17:28 +01:00
Martin Fischer 743353dd09 [simple] add aria-label to preferences link 2022-01-31 12:00:11 +01:00
Martin Fischer e7c0f4e877 [simple] link preferences on /about and /stats
We want to link the preferences from every page
(except of course the preferences page).
2022-01-31 11:57:24 +01:00
Martin Fischer c82b9c68d2
Merge pull request #843 from not-my-profile/simple-page-with-header 2022-01-31 11:14:48 +01:00
Markus Heiser 60e7fee47a
Merge pull request #475 from return42/tineye
[enh] engine - add Tineye reverse image search
2022-01-31 08:51:35 +01:00
Alexandre Flament 2d5929cc59 [mod] searx.utils: more typing 2022-01-30 22:14:12 +01:00
Alexandre Flament ebd3013a1a [mod] tineye engine: minor changes
* remove "disable: false" in settings.yml
* use the json() method from httpx.Response (faster character encoding detection)
2022-01-30 20:49:22 +01:00
Léon Tiekötter a6673a1a94 [fix] 1x engine
1x changed the XML result layout.
2022-01-30 19:48:40 +01:00
Martin Fischer 79dbbd4d99 [build] /static 2022-01-30 17:29:21 +01:00
Martin Fischer 6f0ec7e58f [simple] introduce page_with_header.html template
Previously the preferences & stats templates contained the markup:

<a href="{{ url_for('index') }}"><h1><span>SearXNG</span></h1></a>

There are many things wrong with this:

1. the markup was duplicated

2. the CSS needed to be changed whenever a new page wanted to use this
   header (since the CSS used page-specific selectors)

3. h1 should be reserved for the actual page title
   (e.g. Preferences or Engine stats)

4. the image was set via CSS which also set:

       span { visibility: hidden; }

   which however removes the alternative text from the accessibility
   tree (meaning screen readers will ignore it).

This commit fixes all these problems.
2022-01-30 17:29:21 +01:00
Markus Heiser a6b879f19c [mod] tineye engine: set engine_type to 'online_url_search'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-30 16:30:52 +01:00
Markus Heiser e92d40c854 [enh] implement a OnlineUrlSearchProcessor
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-30 16:05:08 +01:00
Alexandre Flament 0eacc46ee3 [mod] add documentation about searx.utils
This module is a toolbox for the engines.
Is should be documented.

In addition, searx/utils.py is checked by pylint.
2022-01-29 22:49:42 +01:00
Alexandre Flament 068155df88 [build] /static 2022-01-29 14:44:05 +01:00
Alexandre Flament dc4caa5a39 [fix] simple theme: /preferences: cookies table is LTR
close #827
2022-01-29 14:42:12 +01:00
Martin Fischer 6a366c9807
Merge pull request #838 from dalf/remove_deprecated_code
[mod] remove deprecate code
2022-01-29 10:13:56 +01:00
Alexandre Flament f3f61df6a0 [mod] remove deprecate code
remove code to support Python 3.5 and Python 3.6
2022-01-29 08:54:12 +01:00
Alexandre Flament 116802852d [fix] ina engine
based on a45408e8e2
2022-01-28 22:33:41 +01:00
Markus Heiser b7f74fbe42 [mod] tineye - add some documentation
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-28 09:06:44 +01:00
Allen 880555e263 [enh] engine - add Tineye reverse image search
Other optional parameter ..

`&sort=crawl_date`
    can be appended to search_string to sort results by date.

`&domain=example.org`
    can be implemented to search_string to get results from just one domain.

Public instances could get relatively fast timed-out for 3600s.

--

Merged from @allendema's commit [1] and slightly modfied / see [2].

Related-to: [1] 455b2b4460
Related-to: [2] https://github.com/searx/searx/pull/3040
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-28 09:06:44 +01:00
searxng-bot 43a262497b [translations] update from Weblate
80b99072 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
32354577 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
38737f21 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
f1658c80 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
3172618b - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
5063d261 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
69df6ff6 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
51bd2e18 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
f6dea2a9 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
d6230142 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
4d07658c - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
e3798ef7 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
bc99fe05 - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
2811901d - 2022-01-26 - Markus Heiser <markus.heiser@darmarit.de>
2022-01-28 07:16:43 +00:00
Alexandre Flament 4f82ab36a9
Merge pull request #817 from not-my-profile/pyright-01
Pyright 01
2022-01-27 23:18:41 +01:00
Léon Tiekötter 0cbf73a1f4
Allow 'using_tor_proxy' to be set for each engine individually
Check 'using_tor_proxy' for each engine individually instead of checking globally

[fix] searx.network: update _rdns test to the last httpx version

Co-authored-by: Alexandre Flament <alex@al-f.net>
2022-01-27 22:37:02 +01:00
Martin Fischer 506169f312 [pyright] remove no longer needed assertion
The pyright bug[1] for which the assertion was added has been fixed.

[1]: https://github.com/microsoft/pyright/issues/2930
2022-01-27 22:17:16 +01:00
Martin Fischer b767752d0c [pyright:basic] searx.webapp 2022-01-27 22:17:16 +01:00
Martin Fischer 640c404844 [pyright:strict] searx.search.checker.background 2022-01-27 22:07:12 +01:00
Martin Fischer 7f89adc5f3 [pyright:strict] searx.shared.shared_abstract 2022-01-27 22:07:12 +01:00
Paul Braeuning 2c6bd2adf6
Merge pull request #825 from MontyQI/ui-changes
Simple theme uppercase buttons
2022-01-26 18:09:11 +01:00
Monty f59afc8dd2 Uppercase buttons 2022-01-26 16:54:15 +01:00
Markus Heiser ccffab3a43
Merge pull request #813 from MarcAbonce/change-wolfram-category
Move WolframAlpha away from Science category
2022-01-26 14:10:19 +01:00
Markus Heiser e5f266065c
Merge pull request #824 from dalf/fix-simple-pref-checker
[fix] simple theme: don't crash when the checker is enabled
2022-01-25 23:01:31 +01:00
Alexandre Flament dfb9ca527d [fix] simple theme: don't crash when the checker is enabled
The macro "checkbox" in macros.html uses the macro "icon_small"
from icons.html

The commit imports icon_small in macros.html to fix the issue.
It works because the macros in macros.html are imported with the Jinja2 context.

See https://jinja.palletsprojects.com/en/3.0.x/templates/#import-visibility

close #819
2022-01-25 22:03:21 +01:00
Markus Heiser 10c9b9775d [mod] improve setup of invidious engine
- My experience is, that a timeout of 5 sec is not need, I got fast response
  less than a second.

- https://invidious.tube/ redirects to http://ww25.invidious.tube/
  - in SearXNG defaults the http protocol is unsafe and raise an error
  - https://ww25.invidious.tube has SSL_ERROR_UNSAFE_NEGOTIATION

Related-to: https://github.com/searxng/searxng/issues/821
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-25 19:02:11 +01:00
Alexandre Flament 81453a0eba
Merge pull request #811 from return42/enh-788
[mod] configuration to overwrite engine description
2022-01-25 06:55:12 +01:00
Alexandre Flament 576eab04d2
Merge pull request #802 from MontyQI/Icon-update
Changed preferences icon to settings icon in gruntfile
2022-01-24 22:05:55 +01:00
Marc Abonce Seguin 1311745f24 move WolframAlpha away from Science category 2022-01-23 23:24:02 -06:00
Markus Heiser e0b284e427 [mod] configuration to overwrite engine description
Engine description can be configured, this is needed e.g. by custom search
engines.  Here is an example of a command engine with a description in the about
section::

    - name: locate
      engine: command
      command: ['locate', '{{QUERY}}']
      disabled: true
      categories: files
      about:
        description: local files
        website: 'https://www.man7.org/linux/man-pages/man1/locate.1.html'
      delimiter:
          chars: ' '
          keys: ['line']

Closes: https://github.com/searxng/searxng/issues/788
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-23 20:55:14 +01:00
Alexandre Flament 61853aa0fb
Merge pull request #799 from return42/brave-complete
Add autocompleter from Brave
2022-01-23 19:23:06 +01:00
Markus Heiser e9588b70a6 [fix] brave autocompleter: charset_normalizer issues
Use httpx.Response.json() to avoid charset_normalizer issues:

DEBUG   charset_normalizer            : override steps (5) and chunk_size (512) as content does not fit (153 byte(s) given) parameters.
INFO    charset_normalizer            : ascii passed initial chaos probing. Mean measured chaos is 0.000000 %
DEBUG   charset_normalizer            : ascii should target any language(s) of ['Latin Based']
INFO    charset_normalizer            : ascii is most likely the one. Stopping the process.

[1] https://www.python-httpx.org/api/#response

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-23 17:22:13 +01:00
Markus Heiser 9c5bac4c43 [pylint] searx/autocomplete.py
Fix remarks from pylint, BTW set SPDX-License-Identifier.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-23 09:12:03 +01:00
Martin Fischer 105c5a6a98 [help] stop rendering documentation with Jinja2
To facilitate translation of the user documentation we move
the templating logic outside of the user documentation.
2022-01-23 08:01:55 +01:00
Martin Fischer 284ac8bfd8 [help] convert about.html to Markdown
To facilitate translation the new user documentation shall be written in
Markdown (which is more human-friendly than HTML and reStructuredText).
2022-01-23 08:01:55 +01:00
Martin Fischer 05149db4c1 [help] render user documentation once on startup
Currently we have two kinds of user documentation:

* the about page[1] which is written in HTML and part of the web
  application and can therefore link instance-specific pages
  (like e.g. the preferences) via Jinja variables

* the Sphinx documentation[2] which is written in reStructuredText
  and cannot link instance-specific pages since it doesn't know
  which instance the user is using

The plan is to integrate the user documentation currently in Sphinx
into the application, so that it can also link instance specific pages.
We also want to enable the user documentation to be translated.

This commit implements the first step in this endeavor (see #722).

[1]: searx/templates/__common__/about.html
[2]: docs/user/ (currently served at https://docs.searxng.org/user/)
2022-01-23 08:01:55 +01:00
Alexandre Flament 382f4f8fb0
Merge pull request #801 from dalf/fix-checker
[fix] checker: fix image fetch
2022-01-22 19:29:29 +01:00
Monty 80530befdc [build] /static 2022-01-22 17:23:43 +01:00
Monty 91ca5d1613 Changed preferences icon to settings icon in gruntfile 2022-01-22 17:14:19 +01:00
Alexandre Flament 5439dd5fb1 [fix] checker: fix image fetch
Since https://github.com/searxng/searxng/pull/354
the searx.network.stream(...) returns a tuple

This commits update the checker code according to
this function signature change.
2022-01-22 16:11:42 +01:00
Alexandre Flament f01ddd1932
Merge pull request #775 from return42/redis-4.1.1
Revert "[hotfix] interim fix to get docker-build of CI without issues"
2022-01-22 15:56:15 +01:00
Allen b8c98c4c0d [enh] Add autocompleter from Brave
Raw response example: https://search.brave.com/api/suggest?q=how%20to:%20with%20j

Headers are needed in order to get a 200 response, thus Searx user-agent is used.

Other URL param could be  '&rich=false' or  '&rich=true'.

Cherry-pick: 71786bf9cb
2022-01-21 14:39:10 +01:00
searxng-bot 9b3122a84e [translations] update from Weblate
f3f70b7d - 2022-01-20 - Genghis Khan <genghiskhan@gmx.ca>
c66d23fb - 2022-01-15 - Linerly <linerly@protonmail.com>
c2b9f7f7 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
159ec416 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
8184a23b - 2022-01-17 - lucky13820 <hello@ryanyao.design>
c4b476d4 - 2022-01-18 - Go2SheeP <allen.ccccnm@gmail.com>
eaf18ed5 - 2022-01-17 - Markus Heiser <markus.heiser@darmarit.de>
e7fec156 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
99368a91 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
a8b23af9 - 2022-01-19 - Markus Heiser <markus.heiser@darmarit.de>
7af1ba21 - 2022-01-17 - Genghis Khan <genghiskhan@gmx.ca>
0af5a3ee - 2022-01-15 - Alexandre Flament <alex@al-f.net>
a448183b - 2022-01-14 - Markus Heiser <markus.heiser@darmarit.de>
ea4f95cf - 2022-01-19 - Markus Heiser <markus.heiser@darmarit.de>
2f3e7ac9 - 2022-01-17 - Iosevka <iosevka@protonmail.com>
c28ae5a8 - 2022-01-17 - Markus Heiser <markus.heiser@darmarit.de>
b664bd3b - 2022-01-17 - Pham Nguyen <akizminet@gmail.com>
2022-01-21 07:16:40 +00:00
Martin Fischer 96a1f79c6d
Merge pull request #773 from not-my-profile/typing
More typing
2022-01-18 16:28:32 +01:00
Markus Heiser 1a0760c10a [fix] googel engine - "some results are invalids: invalid content"
Fix google issues listet in the `/stats?engine=google` and message::

    some results are invalids: invalid content

The log is::

    DEBUG   searx                         : result: invalid content: {'url': 'https://de.wikipedia.org/wiki/Foo', 'title': 'Foo - Wikipedia', 'content': None, 'engine': 'google'}
    WARNING searx.engines.google          : ErrorContext('searx/search/processors/abstract.py', 111, 'result_container.extend(self.engine_name, search_results)', None, 'some results are invalids: invalid content', ()) True

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-18 13:23:35 +01:00
Markus Heiser f0102a95c9 [fix] google engine: remove adds and fix mobile_ui selector
1. Fix issue reported in comment [1]
2. Fix XPath selector for the response of google's mobile UI, reported in
   comment [2]

[1] https://github.com/searxng/searxng/pull/777#issuecomment-1015121322
[2] https://github.com/searxng/searxng/pull/777#issuecomment-1015236238

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-18 11:05:45 +01:00
Alexandre Flament b972df255a
Merge pull request #776 from mrpaulblack/simple-ltr-vars
[simple theme] dont hardcode border radius
2022-01-18 07:56:03 +01:00
Émilien Devos 6670063e0d
Update XPath for Google engine 2022-01-17 21:49:57 +00:00
mrpaulblack 6c1a64d4b3 [build] /static 2022-01-17 22:35:22 +01:00
mrpaulblack 7a0f5e6b19 [simple theme] dynamic border radius in CSS 2022-01-17 22:35:02 +01:00
Markus Heiser e85744c254 Revert "[hotfix] interim fix to get docker-build of CI without issues"
This reverts interim fix from commit 50c4b58db and adds requirement
`redis==4.1.1`.

The interim fix was needed by Alpine images (Docker) [1] and has been fixed in
commit [2] merged with the patch series from [3].  In redis-py version 4.1.1
this pach has been released on PyPi [4].

[1] https://github.com/redis/redis-py/issues/1869
[2] https://github.com/redis/redis-py/commit/1fc1233f
[3] https://github.com/redis/redis-py/pull/1854
[4] https://github.com/redis/redis-py/issues/1880

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-17 18:03:29 +01:00
Martin Fischer 96655cbd4e [typing] add type hints to webapp.py 2022-01-17 11:42:48 +01:00
Martin Fischer 193b0efd12 [typing] add results.UnresponsiveEngine 2022-01-17 11:42:48 +01:00
Martin Fischer 0c6a09cae3 [refactor] remove never used parameter 2022-01-17 11:42:48 +01:00
Martin Fischer def62c3a47 [typing] add type hints for dictionaries 2022-01-17 11:42:48 +01:00
Martin Fischer 6d43cf7952 [typing] add optional attrs to Plugin 2022-01-17 11:42:48 +01:00
Martin Fischer fdf562bc32 [typing] add results.Timing 2022-01-17 11:42:48 +01:00
Martin Fischer 1ed618222f [typing] add ExtendedRequest
webapp.py monkey-patches the Flask request global.
This commit adds a type cast so that e.g. Pyright[1]
doesn't show "Cannot access member" errors everywhere.

[1]: https://github.com/microsoft/pyright
2022-01-17 11:18:17 +01:00
Alexandre Flament 0c036ae294
Merge pull request #750 from dalf/simple-rtl
Simple theme: implement RTL
2022-01-16 20:29:34 +01:00
Alexandre Flament e07417848f
Merge pull request #695 from return42/fix-sp
[fix] startpage engine / modified API
2022-01-16 20:27:36 +01:00
Alexandre Flament 468619abcb [build] /static 2022-01-16 18:52:46 +01:00
Alexandre Flament d000288ad0 [enh] simple theme: RTL support
* mirror all inline SVGs so that direction SVGs display correctly on RTL
* set the bold list element in info box to RTL so the colon gets displayed on the right side
* set correct .ltr function for the left border on the search button in #q
* move text to the right in autocomplete
* move search form in lign with result article on RTL
* add the correct padding for img thumbnails in categories like music on RTL
* apply RTL to result table for map results
* align text in tables part of /preferences on RTL
* move burger menu on index page to the left on RTL
* fix positioning of drop down arrow on select boxes on RTL
* align result URL on the right (written LTR)
* align vim hotkeys help on the left since it is not translated
* image detail:
  * labels (author, format, URL, etc...) are written on the right,
    values are on the left.
  * URL are written LTR and overflow on the right
2022-01-16 18:51:11 +01:00
Alexandre Flament 2084d7b1ed [mod] simple theme: change stylelint configuration
* disable declaration-empty-line-before
  https://stylelint.io/user-guide/rules/list/declaration-empty-line-before/
  this change allows to mix CSS declarations and LESS mixins without empty lines:

  #something {
    display: flex;
    .ltr-left(60rem); // no mandatory empty line before this one
  }

* disable no-invalid-position-at-import-rule
  https://stylelint.io/user-guide/rules/list/no-invalid-position-at-import-rule/

  this change allows to declare some mixins and then import another .less file:
  for example:

  .ltr-left(@offset) {
    left: @offset;
  }
  @import "style.less";
2022-01-16 18:50:19 +01:00
Alexandre Flament f9271d595f [fix] startpage: workaround to use the startpage network
workaround for the issue #762
2022-01-15 22:56:34 +01:00
Alexandre Flament 32874dbf7f
Merge pull request #742 from return42/mysql
[mod] engine mysql_server: make port configurable
2022-01-15 21:35:34 +01:00
Martin Fischer 599d882d0a
Merge pull request #754 from return42/fix-751
[theme] /preferences: rename "Method" to "HTTP Method"
2022-01-14 18:42:49 +01:00
Markus Heiser 580815a9a5 [fix] stop less grunt runner on missing files
The less grunt runner silently ignore missing files and continue with the build[1]::

    Running "less:production" (less) task
    >> Destination css/searxng.min.css not written because no source files were found.
    >> 1 stylesheet created.
    >> 1 sourcemap created.

Add filter function that calls grunt.fail() if the scr file does not exists.

[1] https://github.com/searxng/searxng/pull/750#discussion_r784357031
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 13:16:24 +01:00
Markus Heiser 08b38a8bfd [fix] simple theme: description of HTTP method
Suggested-by: @not-my-profile https://github.com/searxng/searxng/pull/754#issuecomment-1012921096
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 10:07:09 +01:00
Markus Heiser e45dfb334b [theme] /preferences: rename "Method" to "HTTP Method"
Closes: https://github.com/searxng/searxng/issues/751
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 08:29:04 +01:00
searxng-bot ce018d013b [translations] update from Weblate
0ca15e28 - 2022-01-11 - Allan Nordhøy <epost@anotheragency.no>
dd494ce7 - 2022-01-11 - Markus Heiser <markus.heiser@darmarit.de>
7e4e914a - 2022-01-10 - k2s <martin.minka@gmail.com>
b4915a2f - 2022-01-10 - Markus Heiser <markus.heiser@darmarit.de>
832d5cf9 - 2022-01-13 - Genghis Khan <genghiskhan@gmx.ca>
546ad69a - 2022-01-08 - Alexandre Flament <alex@al-f.net>
f14bd241 - 2022-01-09 - Markus Heiser <markus.heiser@darmarit.de>
2815009a - 2022-01-07 - Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 07:17:46 +00:00
Martin Fischer d9709df740 [fix] make BooleanChoices only set cookies that vary from the default
The bug was inadvertently introduced by the refactor in
180d4d068b.

Fixes #746.
2022-01-13 19:43:49 +01:00
Alexandre Flament 687bdef410
Merge pull request #740 from return42/fix-bang
[fix] get_bang_url: handle ambiguous !!bangs without error
2022-01-12 22:00:18 +01:00
Markus Heiser a7c3c352d8 [upd] searx/data/external_bangs.json
Updated external bangs by::

    ./manage pyenv.cmd ./searxng_extra/update/update_external_bangs.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-12 19:37:13 +01:00
Markus Heiser 7cdd31440e [fix] external bangs: don't overwrite Bangs in data trie
Bangs with a `*` suffix (e.g. `!!d*`) overwrite Bangs with the same
prefix (e.g. `!!d`) [1].  This can be avoid when a non printable character is
used to tag a LEAF_KEY.

[1] https://github.com/searxng/searxng/pull/740#issuecomment-1010411888

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-12 19:37:13 +01:00
Markus Heiser 50c4b58db6 [hotfix] interim fix to get docker-build of CI without issues
There is an issue with redis v4.1.0 [1] / for the interim lets remove this
python dependency.

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-12 09:31:12 +01:00
Martin Fischer cd8ce22f86 [themes] add comma before "but" in new sentence
Closes #739.
2022-01-12 08:26:23 +01:00
Markus Heiser bf593af423 [mod] engine mysql_server: make port configurable
Cherry piked from https://github.com/searx/searx/commit/82ac634070

Suggested-by: https://github.com/searx/searx/issues/3117
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-11 23:47:40 +01:00
Markus Heiser 977e9a4330
Merge pull request #686 from return42/lib_redis
Add redis DB and connector
2022-01-11 19:55:14 +01:00
Markus Heiser 6d7e86eece [fix] get_bang_url: handle ambiguous !!bangs without error
An ambiguous bang like `!!d` raises an exception in function get_bang_url().  A
bang is only unique when the bang_definition from get_bang_definition_and_ac() is
a string / for a ambiguous bang the returned bang_definition is a dictionary.

Reported-by: user prg at #searxng:matrix.org on 2022/01/11
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-11 09:58:10 +01:00
Markus Heiser 3457408285 [build] /static 2022-01-10 17:42:13 +01:00
Markus Heiser 85159ad307 [fix] autocomple.js: register li.onmousedown instead li.onclick
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 17:30:57 +01:00
Markus Heiser 6420322cd1
Merge pull request #729 from k2s/fix-tokens
fix(security): filtered_engines were not correctly evaluating validate_token()
2022-01-10 11:51:45 +01:00
Markus Heiser df238e944c [mod] starpage engine: add comment about Startpage's FFox add-on
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser 21e884f369 [fix] startpage engine: fetch CAPTCHA & issues related to PR-695
In case of CAPTCHA raise a SearxEngineCaptchaException and suspend for 7 days.
When get_sc_code() fails raise a SearxEngineResponseException and suspend for 7
days.

[1] https://github.com/searxng/searxng/pull/695

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser 2f4e567e90 [fix] Get an actual `sc` argument from startpage's home page.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser 1cbcddb3f7 [pylint] Startpage engine
Fix remarks from pylint

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser f1f5e69c42 [fix] startpage engine - avoid captcha
Startpage has introduced new anti-scraping measures that make SearXNG instances
run into captchas:

1. some arguments has been removed and a new `sc` has been added.
2. search path changed from `do/search` to `sp/search`
3. POST request is no longer needed

Closes: https://github.com/searxng/searxng/issues/692
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:12 +01:00
Martin Fischer 576e19dad1 [fix] add default for "about" engine property
Fixes #732.
2022-01-10 08:40:06 +01:00
Martin Minka b76a815827 [fix] filtered_engines were not correctly evaluating validate_token() 2022-01-09 15:53:58 +01:00
Markus Heiser dca83944b5 [fix] redis: don't create a new connection at each client() call
Suggested-by: @dalf https://github.com/searxng/searxng/pull/686#pullrequestreview-844942973
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 17:33:40 +01:00
Markus Heiser 4fc5e5299c [fix] ccengine engine - avoid unwanted redirects
api.openverse.engineering is a little picky and wants to have a trailing slash
in the path:

    /v1/images? -->/ v1/images/?

otherwise it redirects, here is the debug log:

    DEBUG   searx.network.openverse       : HTTP Request: GET https://api.openverse.engineering/v1/images?&page=1&page_size=20&format=json&q=foo "HTTP/2 301 Moved Permanently" (text/html; charset=utf-8)
    DEBUG   searx.network.openverse       : HTTP Request: GET https://api.openverse.engineering/v1/images/?&page=1&page_size=20&format=json&q=foo "HTTP/2 200 OK" (application/json)
    WARNING searx.engines.openverse       : ErrorContext('searx/search/processors/online.py', 105, 'count_error(', None, '1 redirects, maximum: 0', ('200', 'OK', 'api.openverse.engineering')) True

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 14:14:31 +01:00
Markus Heiser 1461d6a07e [upd] engine_descriptions.json
Updated by:

    ./manage pyenv.cmd python3 \
        ./searxng_extra/update/update_engine_descriptions.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 13:59:03 +01:00
Léon Tiekötter 37baf46ece [fix] Rename ccengine engine to openverse
The CC engine was merged with WordPress and renamed to Openverse

Source: https://wordpress.org/news/2021/05/welcome-to-openverse/
2022-01-07 13:06:05 +01:00
Léon Tiekötter 4be6deb0a1 [fix] ccengine engine
Change domain to api.openverse.engineering
2022-01-07 13:01:37 +01:00
Markus Heiser ced656606f
Merge pull request #709 from return42/drop-etools
[fix] drop etools engine module
2022-01-07 11:18:47 +01:00
Markus Heiser 5dd3442f83 [fix] drop etools engine module
The implementation of the etools engine is poor.  No date-range support, no
language support and it is broken by a CAPTCHA.

etools is a metasearch engine, the major search engines it supports (google,
bing, wikipedia, Yahoo) are already available in SeaarXNG.

While etools does support several engines we currently don't support directly,
support for them should be added directly to SearXNG if there is demand.

In practice: in SearXNG the worse etools results will be mixed with good results
from other engines we have (as long as there is no captcha).

At best case, what we win with etools is in e.g. results from de.ask.com in a
query from a german request .. in all other cases worse results are bubble up in
SearXNG's result list.

[1] https://github.com/searxng/searxng/issues/696#issuecomment-1005855499

Closes: https://github.com/searxng/searxng/issues/696
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 10:41:09 +01:00
Martin Fischer e12525a1fa
Merge pull request #708 from not-my-profile/pref-refactor
Refactor `preferences`
2022-01-07 09:45:23 +01:00
Markus Heiser 2eb95f1532
Merge pull request #718 from searxng/dependabot/pip/master/pygments-2.11.2
Bump pygments from 2.11.0 to 2.11.2
2022-01-07 08:40:55 +01:00
Markus Heiser c956ed6c43 [build] /static 2022-01-07 08:36:32 +01:00
Markus Heiser d8db85638e make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 08:35:14 +01:00
searxng-bot 651342d71a [translations] update from Weblate
7781625e - 2022-01-06 - Linerly <linerly@protonmail.com>
dcab2ef1 - 2022-01-06 - Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 07:17:58 +00:00
Léon Tiekötter 3ab826de22 Drop microsoft academic engine
Microsoft academic was discontinued on 2021-12-31.

Source: https://www.microsoft.com/en-us/research/project/academic/articles/microsoft-academic-to-expand-horizons-with-community-driven-approach/
2022-01-07 01:35:13 +01:00
Martin Fischer 180d4d068b [refactor] refactor SwitchableSetting
The previous implementation used two hash sets and a list.
... that's not necessary ... a single hash map suffices.

And it's also less error prone ... because the previous data structure
allowed a setting to be enabled and disabled at the same time.
2022-01-06 18:56:02 +01:00
Martin Fischer 56fbf22108 [refactor] stop SwitchableSetting from subclassing Setting
Previously the default_value was abused for the cookie name.
Having SwitchableSetting subclass Setting doesn't even make sense
in the first place since none of the Setting methods apply.
2022-01-06 18:13:13 +01:00
Martin Fischer 1196abcfce
Merge pull request #706 from not-my-profile/remove-broken-quest-op
[fix] remove broken ? search operator
2022-01-06 17:44:34 +01:00
Martin Fischer a0486cf827 [fix] prevent leaflet.{css,js} from polluting git grep results
Fixes #704.
2022-01-06 14:33:19 +01:00
Martin Fischer 83f8a8fc6d [refactor] remove pointless tuple 2022-01-06 14:21:15 +01:00
Martin Fischer bb06758a7b [refactor] add type hints & remove Setting._post_init
Previously the Setting classes used a horrible _post_init
hack that prevented proper type checking.
2022-01-06 14:21:14 +01:00
Martin Fischer 61935c72ef [fix] remove broken ? search operator
The ? search operator has been broken for some time and
currently only raises the question why it's still there.

## Context ##

The query "Paris !images" searches for "Paris" in the "images" category.

Once upon a time Searx supported "Paris ?images" to search for "Paris"
in the currently enabled categories and the "images" category.

The feature makes sense ... the ? syntax does not.
We will hopefully introduce a +!images syntax in the future.

Fixes #702.
2022-01-06 14:10:58 +01:00
Alexandre Flament 03189d60f4
Merge pull request #697 from searxng/remove-nl-be
Delete searx/translations/nl_BE
2022-01-06 09:26:12 +01:00
Alexandre Flament aedd6279b3
Merge pull request #634 from not-my-profile/powered-by
Introduce `categories_as_tabs` & group engines in tabs
2022-01-06 09:22:02 +01:00
Alexandre Flament 40684f6b5e
Delete searx/translations/nl_BE
See https://github.com/searxng/searxng/issues/540
2022-01-05 20:36:24 +01:00
Markus Heiser 0ebad8220f
Merge pull request #688 from dalf/settings_enable_stats
[enh] settings.yml: implement general.enable_metrics
2022-01-05 18:53:49 +00:00
Alexandre Flament 9004e84b6e
Merge pull request #596 from dalf/upgrade-httpx
Upgrade httpx
2022-01-05 19:13:48 +01:00
Alexandre Flament d3ecadd3f8
Merge pull request #679 from dalf/brand-searxng
searxng.org: update setup.py & settings.yml
2022-01-05 19:07:53 +01:00
Alexandre Flament 2134703b4b [enh] settings.yml: implement general.enable_metrics
* allow not to record metrics (response time, etc...)
* this commit doesn't change the UI. If the metrics are disabled
  /stats and /stats/errors will return empty response.
  in /preferences, the columns response time and reliability will be empty.
2022-01-05 19:03:04 +01:00
Alexandre Flament e64c3deab7 [mod] upgrade httpx 0.21.2
httpx 0.21.2 and httpcore 0.14.4 fix multiple issues:
* https://github.com/encode/httpx/releases/tag/0.21.2
* https://github.com/encode/httpcore/releases/tag/0.14.4

so most of the workarounds in searx.network have been removed.
2022-01-05 18:46:00 +01:00
Martin Fischer a4c2cfb837 [enh] change categories_as_tabs from a list to a dict
The tab icon names are currently hard coded in the templates.
This commit lets us introduce an icon property in the future, e.g:

categories_as_tabs:
  general:
    icon: search-outline
2022-01-05 11:03:44 +01:00
Martin Fischer b38036d519 [fix] stop setting superfluous cookies for "non tab categories" 2022-01-05 11:03:44 +01:00
Martin Fischer 3dd534e5c0 [refactor] make group_engines_in_tab more readable 2022-01-05 11:03:44 +01:00
Martin Fischer d01e8aa8cc [mod] introduce searx.engines.Engine for type hinting 2022-01-05 11:03:44 +01:00
Martin Fischer 3f76c9c96c [enh] enable English dictionaries by default
These dictionaries are no longer part of the general category,
so they're no longer queried by default -> we can enable them
by default without degrading general query performance.
2022-01-05 11:03:44 +01:00
Martin Fischer abe53946d4 [enh] display help text for "Other" engines tab in preferences 2022-01-05 11:03:44 +01:00
Martin Fischer 6f07d51b62 [mod] improve variable name 2022-01-05 11:03:44 +01:00
Martin Fischer 1e195f5b95 [mod] move group_engines_in_tab to searx.webutils 2022-01-05 11:03:44 +01:00
Martin Fischer 5d74bf3820 [enh] move dictionaries, Erowid & IMDb out of general category
The general category is the category that is searched by default.
From a privacy standpoint it doesn't make sense to send all general
queries to specialized search engines that cannot deal with those
queries anyway.
2022-01-05 11:03:44 +01:00
Martin Fischer ab90e2ac49 [enh] show categories not in any tab category in "Other" preferences tab
Previously we didn't have a good place to put search engines that don't
fit into any of the tab categories. This commit automatically puts
search engines that don't belong to any tab category in an "other"
category, that is only displayed in the user preferences (and not above
search results).
2022-01-05 11:03:44 +01:00
Martin Fischer 4ac6b5d32d [build] /static 2022-01-05 11:03:44 +01:00
Martin Fischer a12cb6a807 [simple] improve styling of subcategory table headers in preferences 2022-01-05 11:03:44 +01:00
Martin Fischer 20a5e43e35 [enh] display language of engines in preferences 2022-01-05 11:03:44 +01:00
Martin Fischer 31e206361f [enh] group engines in preference tabs 2022-01-05 11:03:44 +01:00
Martin Fischer b02f762687 [enh] add more categories 2022-01-05 11:00:11 +01:00
Markus Heiser d7b4306444 [fix] links in comments - https://docs.searxng.org/
fixed links from https://searxng.github.io/searxng/ to https://docs.searxng.org/
2022-01-04 16:04:49 +01:00
Markus Heiser a6cfab93fa [enh] add redis connector searx/shared/redisdb.py
Add a redis connector, the default DB connector is a socket at::

    unix:///usr/local/searxng-redis/run/redis.sock?db=0

To set up a redis instance simply use::

    $ ./manage redis.build
    $ sudo -H ./manage redis.install

A hint for developers:

To get access rights to this instance, your developer account needs to be added
to the *searxng-redis* group::

    $ sudo -H ./manage redis.addgrp "${USER}"
    # don't forget to logout & login to get member of group

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-03 20:56:39 +01:00
Alexandre Flament 41ae5aea2b [fix] disabling all engines in a category makes the bang search in general
with this commit, there is no result
2022-01-03 20:23:46 +01:00
Martin Fischer 8e9ad1ccc2 [enh] introduce categories_as_tabs
Previously all categories were displayed as search engine tabs.
This commit changes that so that only the categories listed under
categories_as_tabs in settings.yml are displayed.

This lets us introduce more categories without cluttering up the UI.
Categories not displayed as tabs  can still be searched with !bangs.
2022-01-03 07:01:49 +01:00
Martin Fischer df34b1ddcf [enh] settings.yml: allow granular overwrites for about 2022-01-03 07:01:49 +01:00
Martin Fischer 8a0810cedc [fix] bang syntax for categories with spaces 2022-01-03 07:01:49 +01:00
Alexandre Flament 458b7fb72d
Merge pull request #610 from return42/img-load-error
[fix] simple theme: hide the image if img load fails
2022-01-02 22:34:15 +01:00
Alexandre Flament d83aa2b0d2
Merge pull request #613 from return42/pylint-bing-images
[pylint] Bing (Images) engine
2022-01-02 22:00:55 +01:00
Alexandre Flament 76cbfbbdda reference docs.searxng.org 2022-01-02 21:18:29 +01:00
Markus Heiser 3cdf2d6570 Update searx.data - update_languages.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-01 18:37:35 +01:00
Markus Heiser 21d7c8b367
Merge pull request #676 from return42/fix-bing-lang
Fix issues on running update_languages.py
2022-01-01 18:12:47 +01:00
Markus Heiser 61ce0c2244 [fix] bing engines: fetch_supported_languages
The Request to and the Response from https://www.bing.com/account/general has
been changed.

[1] https://github.com/searxng/searxng/pull/672#discussion_r777104919

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-01 17:31:38 +01:00
Alexandre Flament 6b49f32d3e
Merge pull request #670 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2022-01-01 12:16:50 +01:00
Markus Heiser 3dcba2f67c
Merge pull request #671 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2022-01-01 12:08:26 +01:00
Markus Heiser 877293c470
Merge pull request #673 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
2022-01-01 12:08:02 +01:00
dalf 127da09fc9 Update searx.data - update_wikidata_units.py 2022-01-01 06:25:06 +00:00
dalf 291483af53 Update searx.data - update_currencies.py 2022-01-01 06:25:02 +00:00
dalf a0016250ec Update searx.data - update_ahmia_blacklist.py 2022-01-01 06:24:59 +00:00
dalf 184242d36b Update searx.data - update_firefox_version.py 2022-01-01 06:24:49 +00:00
Markus Heiser 021b4a0a02
Merge pull request #667 from searxng/dependabot/pip/master/pygments-2.11.0
Bump pygments from 2.10.0 to 2.11.0
2021-12-31 09:29:29 +01:00
Markus Heiser efbcaaab3b [build] /static 2021-12-31 09:14:38 +01:00
Markus Heiser 391e4b57c9 make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-31 09:12:22 +01:00
searxng-bot db4885f7d4 [translations] update from Weblate
055a6080 - 2021-12-28 - Markus Heiser <markus.heiser@darmarit.de>
d028dfd7 - 2021-12-26 - Gert-dev <gert+github@disroot.org>
d2f3b998 - 2021-12-24 - Markus Heiser <markus.heiser@darmarit.de>
1b882f56 - 2021-12-29 - VaiTon <eyadlorenzo@gmail.com>
f8e524a3 - 2021-12-27 - Markus Heiser <markus.heiser@darmarit.de>
70eafa9c - 2021-12-26 - Frederik From <frederikfrom@pm.me>
7eb20cec - 2021-12-28 - Markus Heiser <markus.heiser@darmarit.de>
3cb754a4 - 2021-12-25 - Markus Heiser <markus.heiser@darmarit.de>
2021-12-31 07:17:50 +00:00
Markus Heiser f087d01e24 [build] /static 2021-12-29 14:33:54 +01:00
Markus Heiser f75199b1ec [fix] simple theme: hide the image if img load fails
Add event listener to query selector::

    '#urls img.image'

From the user point of view, I think it is better to hide the image:
img_load_error.svg is helplful in the image category because it still allows to
select the image. IMO, in the news category, the fact there is a missing image
won't help to choose the links. From a developer point of view, the place holder
is signal that may be the engine needs to be updated (at least give a look). The
browser console should show the same information too, but it requires some
additional steps. [1]

[1] https://github.com/searxng/searxng/pull/610#issuecomment-997640132

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-29 14:30:16 +01:00
Markus Heiser 7966fd3bbd
Merge pull request #663 from dalf/mod_secret_key
changes about the secret_key
2021-12-29 13:33:27 +01:00
Markus Heiser 8f3a7feb47 [mod] implement is_hmac_of() in webutils / close to new_hmac()
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>, Alexandre Flament
2021-12-28 23:04:06 +01:00
Markus Heiser dc4f1f705d [pylint] Bing (Images) engine
Fix remarks from pylint and remove obsolete try/except block

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-28 14:43:39 +01:00
Markus Heiser 6d7a38a912 [pylint] Bing (Videos) engine
Fix remarks from pylint and remove obsolete try/except block

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-28 14:33:05 +01:00
Alexandre Flament 7d4834ac4d [mod] webutils.py: remove dead code
secret_key can't be bytes (see settings_default.py)
2021-12-28 10:14:38 +01:00
Alexandre Flament d784870209 [fix] use hmac.compare_digest instead of ==
see https://docs.python.org/3/library/hmac.html#hmac.HMAC.hexdigest
2021-12-28 08:36:31 +01:00
Markus Heiser d84226bf63 [fix] issues reported by pylint
Fix pylint issues from commit (3d96a983)

    [format.python] initial formatting of the python code

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 10:16:20 +01:00
Markus Heiser 3d96a9839a [format.python] initial formatting of the python code
This patch was generated by black [1]::

    make format.python

[1] https://github.com/psf/black

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 09:26:22 +01:00
Markus Heiser fcdc2c2cd2 [format.python] disable py code formatting for some hunks of code
Disable the python code formatting from python-black, where the readability of
code suffers by formatting.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 09:16:03 +01:00
searxng-bot 568a4df297 [translations] update from Weblate
14044898 - 2021-12-19 - Linerly <linerly@protonmail.com>
2db5cc5d - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
7273ced4 - 2021-12-22 - Markus Heiser <markus.heiser@darmarit.de>
bac8f580 - 2021-12-19 - Stephan Wijman <s.wijman@mailarena.net>
472c882a - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
bc2c60a4 - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
11f37c00 - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
10417e8a - 2021-12-22 - Mico Hautaluoma <m@mha.fi>
12d49b4b - 2021-12-22 - Markus Heiser <markus.heiser@darmarit.de>
a1bfd8f6 - 2021-12-23 - Markus Heiser <markus.heiser@darmarit.de>
fa94d205 - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
6a121417 - 2021-12-21 - YFdyh000 <yfdyh000@gmail.com>
bc9b6947 - 2021-12-18 - Shahed Hosseini <sajjadhusseini92@gmail.com>
2021-12-24 07:18:11 +00:00
Martin Fischer 19339067c6 [del] remove geektimes (redirects to habrahabr) 2021-12-22 13:20:56 +01:00
Martin Fischer fb037e7a83 [del] remove whaleslide (website is down)
Closes #639.
2021-12-22 13:19:27 +01:00
Martin Fischer e28c6bda35 [doc] introduce about.language and sort engines by it 2021-12-21 09:58:51 +01:00
Markus Heiser c5d604f06f [upd] engine_descriptions.json
Updated by:

    ./manage pyenv.cmd python3 \
        ./searxng_extra/update/update_engine_descriptions.py

Include documentation of new added engines:

- superuser
- stackoverflow
- askubuntu
- indb
- ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-20 14:39:10 +01:00
Markus Heiser 6fb6e8c22a
Merge pull request #621 from not-my-profile/engines-table
[doc] Improve engines table
2021-12-20 14:02:29 +01:00
Martin Fischer 1fb1cca519 [doc] fix about.website for hoogle 2021-12-20 12:12:09 +01:00
Markus Heiser 7a215e07e7
Merge pull request #611 from return42/fix-bing
[fix] bing engine: fix paging support, show inital page.
2021-12-20 10:08:52 +01:00
Martin Fischer 06beffdf31 [doc] add about.website for wiby 2021-12-20 07:59:51 +01:00
Alexandre Flament b5d4cac7e1
Merge pull request #615 from return42/pylint-reddit
[pylint] Reddit engine
2021-12-19 11:32:32 +01:00
mrpaulblack c6b76aa429 [build] /static 2021-12-18 21:25:22 +01:00
mrpaulblack 414f1039d2 [fix] theme: build `img_load_error.svg` as svg 2021-12-18 21:24:59 +01:00
Markus Heiser 2af50c2588 [pylint] Reddit engine
Add Reddit engine to pylint process

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-18 17:59:47 +01:00
Markus Heiser 6b85607274 [fix] bing engine: fix paging support, show inital page.
Follow up queries for the pages needed to be fixed.

- Split search-term in one for initial query and one for following queries.
- Set some headers in HTTP requests, bing needs for paging support.
- IMO //div[@class="sa_cc"] does no longer match in a bing response.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-18 13:50:38 +01:00
Markus Heiser b2177e5916 [pylint] Bing (Web) engine
Fix remarks from pylint and improved code-style.  In preparation for a bug-fix
of the Bing (Web) engine I add this engine to the pylint-list.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-18 13:40:36 +01:00
Alexandre Flament 4da1e0026c
Merge pull request #609 from return42/fix-bing-news
[fix] engine bing-news: replace the http:// by https://
2021-12-18 00:01:40 +01:00
Markus Heiser f41734a543 [fix] engine bing-news: replace the http:// by https://
BTW: add bing_news to the pylint process

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-17 13:25:50 +01:00
Alexandre Flament f6b1264b5f
Merge pull request #584 from return42/drop-css-vendor
[mod] simple-theme: remove vendor CSS
2021-12-17 12:14:19 +01:00
searxng-bot 3cf9065478 [translations] update
1a891c16 - 2021-12-15 - Markus Heiser <markus.heiser@darmarit.de>
33bd07e7 - 2021-12-14 - Alexandre Flament <alex@al-f.net>
7ba24343 - 2021-12-12 - Markus Heiser <markus.heiser@darmarit.de>
80d54b89 - 2021-12-15 - FilGiov <quota679@gmail.com>
af9e007c - 2021-12-15 - Markus Heiser <markus.heiser@darmarit.de>
9d4e645c - 2021-12-15 - Markus Heiser <markus.heiser@darmarit.de>
21dec08c - 2021-12-15 - Shahed Hosseini <sajjadhusseini92@gmail.com>
2021-12-17 07:17:56 +00:00
Alexandre Flament 6bb6f7ffc1
Merge pull request #602 from return42/fix-600
[fix] move engines gpodder and AZlyrics into category music
2021-12-16 18:18:16 +01:00
Markus Heiser 07f2a9ee3c [fix] engine: MediathekViewWeb (mvw) disable by default
The MediathekViewWeb delivers only content for the german speaking area.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 19:03:35 +01:00
Markus Heiser 84836a5000 [build] /static 2021-12-15 14:47:43 +01:00
Markus Heiser c020b90056 [mod] simple theme: remove vendor prefix of `width: max-content`
Remove no longer needed workarounds like `width: 1000px;`
and vendor prefix of max-content [1].

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/max-content#browser_compatibility

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 14:43:15 +01:00
Markus Heiser 459f33a18e [mod] simple-theme: remove vendor CSS
flexbox
  Browser support for flexbox is excellent, and the majority of browsers do not
  need a prefix at this point. Safari was the last of the major browsers to
  remove prefixes, with the release of Safari 9 in 2015. [1]

user-select:
  Vendor prefix of user-select is not needed, see 'Browser compatibility' [2].

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Backwards_Compatibility_of_Flexbox#status_in_browsers
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#browser_compatibility

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 14:43:15 +01:00
Markus Heiser 715f578cda [build] /static 2021-12-15 10:45:25 +01:00
Markus Heiser c416464949 [fix] lazy loading of <img> tags
Images should include dimension attributes.  Without `width` and `height`
specified, image dimensions are 0×0 pixels at first.  ...  In this case the
browser determines that all of them are visible to the user and decides to load
everything [1].

In CSS the `width` is set to a value and the `height` is unsed to scale the image
proportional in both dimensions.

[1] https://web.dev/browser-level-image-lazy-loading/#images-should-include-dimension-attributes
[2] https://caniuse.com/loading-lazy-attr

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 10:39:55 +01:00
Markus Heiser 709482088e [fix] move engines gpodder and AZlyrics into category music
Closes: https://github.com/searxng/searxng/issues/600
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 09:43:56 +01:00
Markus Heiser f287787c44 [simple theme] activate - SearXNG JavaScript Style Guide
Add the 'SearXNG JavaScript Style Guide' as one quality gate in the build chain
of the simple theme::

    make themes.simple
    make themes.simple.test

In the github CI the `themes.all` target enforce a `themes.simple`.

BTW: Remove 'jshint' left overs from 0ee316f3d

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 07:50:53 +01:00
Markus Heiser 34f5e9c7a3 [fix] eslint --fix
automatically fix some of the problems reported by eslint rules::

    $ ./manage nvm.bash
    nvm-env$ npm --prefix searx/static/themes/simple run eslint-fix

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 07:31:58 +01:00
Markus Heiser 32cf24a272 [mod] eslint: add gruntfile.js to the files to lint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 07:26:41 +01:00
Markus Heiser 06730588a6 [mod] SearXNG JavaScript Style Guide (eslint:recommended)
The SearXNG JavaScript Style Guide is a set of eslint rules [1] based on the
eslint:recommended [2] rules.

    "extends": "eslint:recommended"

The additional rules adopted from the JavaScript Standard Style [3][4].

[1] https://eslint.org/docs/rules/
[2] https://github.com/kunalgolani/eslint-config/tree/master/packages/recommended
[3] https://standardjs.com/rules.html#javascript-standard-style
[4] https://github.com/standard/eslint-config-standard/blob/master/.eslintrc.json

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 06:50:26 +01:00
Markus Heiser 9fc27088ef
Merge pull request #583 from return42/fix-combo-with
[fix] simple theme: remove width  45% from language and time filters
2021-12-12 17:02:31 +01:00
Markus Heiser 8cc7c880ae
Merge pull request #587 from dalf/fix-gigablast
[fix] gigablast engine
2021-12-12 15:58:13 +01:00
searxng-bot b994471233 [translations] update
030f3e59 - 2021-12-11 - Linerly <linerly@protonmail.com>
cedb4f9d - 2021-12-11 - Alexandre Flament <alex@al-f.net>
8522e4cf - 2021-12-11 - Alexandre Flament <alex@al-f.net>
2021-12-11 18:11:41 +00:00
searxng-bot 5bf16d56f4 [translations] update
10790ace - 2021-12-05 - Alexandre Flament <alex@al-f.net>
0026bde6 - 2021-12-07 - Naveen <naveen.translator@protonmail.com>
e066d8cf - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
174b9f9c - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
0817e645 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
6272320f - 2021-12-08 - Alexandre Flament <alex@al-f.net>
e1281900 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
882ced80 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
59e8c950 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
cfd72d00 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
8f3d6058 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
b293c351 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
840e1a98 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
9f045c63 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
e24a23e0 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
bf58a870 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
6b5e4993 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
dc9ab819 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
b8b1423b - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
fbfe865c - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
afa65a98 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
dded218c - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
79659920 - 2021-12-05 - Markus Heiser <markus.heiser@darmarit.de>
5a4100dc - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
57fb7a91 - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
33eb893d - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
2673c748 - 2021-12-03 - Alexandre Flament <alex@al-f.net>
2021-12-10 07:17:45 +00:00
Alexandre Flament 2a262df0bb
Merge pull request #582 from return42/fix-autocomplete-csp
[fix] simple theme: make autocomplete-js CSP compliant
2021-12-08 20:28:35 +01:00
Markus Heiser b5c9cc4ff3
Merge pull request #586 from dalf/remove-yggtorrent
[del] remove yggtorrent
2021-12-07 07:00:47 +01:00
Alexandre Flament 1a6207574e [fix] gigablast engine
fetch extra params after 3000 seconds
2021-12-06 22:55:15 +01:00
Alexandre Flament fbc2a6ab4b [del] remove yggtorrent
yggtorrent is behind cloudflare now
close #580
2021-12-06 21:59:51 +01:00
Alexandre Flament 037cb7dd3d [fix] imdb: don't crash when there is no result 2021-12-06 21:49:18 +01:00
Markus Heiser 5f902bbb0f [fix] simple theme: remove width 45% from language and time filters
All three filters (`language`, `time_range` and `safesearch`) are rendered in
one line.  A size of 45% for `language` and `time_range` left only 10% for the
`safesearch` filter.  Solution: drop with from `language` and `time_range`.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-05 14:22:55 +01:00
Markus Heiser d6d6585b26 [build] /static 2021-12-05 11:51:36 +01:00
Markus Heiser 2b26285a73 [fix] simple theme: make autocomplete-js CSP compliant
The CSP issue is, that the `_Position` function in the autocomplete-js set the
style attributes by `setAttribute("style", ...)`.  Using `setAttribute` to set
the style attribute invokes the HTML parser and CSP is triggered [1].

This patch overwrite the `_Position` function of autocomplete-js.

BTW: remove trailing whitespace

[1] https://stackoverflow.com/a/57633533

Closes: https://github.com/searxng/searxng/issues/352
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-05 11:48:23 +01:00
Markus Heiser f5a4906e3e [build] /static 2021-12-04 11:31:04 +01:00
Markus Heiser 7d6a15a612 [fix] simple theme: make LESS sources available on non build hosts
Include the LESS source files directly in the `.map` files [1].

Drawback: `.map` files grow up in size, but this should not bother, because the
files are only loaded in debug mode.

[1] https://github.com/gruntjs/grunt-contrib-less#outputsourcefiles
[2] https://github.com/searxng/searxng/pull/575#issuecomment-984058868

Suggested-by: @dalf [2]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-04 11:22:40 +01:00
Alexandre Flament b0774c7e37
Merge pull request #578 from searxng/translations_update
Update translations
2021-12-03 09:02:46 +01:00
searxng-bot d65e841c55 [translations] update
b4860945 - 2021-12-03 - Alexandre Flament <alex@al-f.net>
df96994b - 2021-11-30 - Alexandre Flament <alex@al-f.net>
007ea84d - 2021-12-03 - Alexandre Flament <alex@al-f.net>
6ff99312 - 2021-12-02 - Ati Art <atiartstudio.home@gmail.com>
2021-12-03 07:17:47 +00:00
Markus Heiser d26a746d7d [build] /static 2021-12-01 21:12:06 +01:00
Markus Heiser f54460a805 [fix] simple theme: make JS sources available on non build hosts
Include the source files directly in the `.map` files [1] for two reasons:

1. In the simple theme, modules from `./node_modules` are only available on
   developer's build host (a `make node.env` is needed to get the sources).  By
   example; in the `searxng.min.js.map` file, the `autocomplete.js` is linked at
   URL:

      ../node_modules/autocomplete-js/dist/autocomplete.js

2. Later, when client sources has been moved out of the `./static` URL [2] to
   the `<repo-roo>/src` folder, all JS sources are no longer available.

Drawback: `.map` files grow up in size, but this should not bother, because the
files are only loaded in debug mode.

[1] https://github.com/gruntjs/grunt-contrib-uglify#sourcemapincludesources
[2] https://github.com/searxng/searxng/issues/141

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-01 21:09:26 +01:00
Alexandre Flament ae49b5224c
Merge pull request #566 from dalf/simple-theme-smaller-build
[mod] simple theme: smaller build
2021-12-01 20:30:58 +01:00
Markus Heiser 82125862c6 [fix] simple theme: remove static files no longer needed
remove:

    searx/static/themes/simple/js/searxng.js
    searx/static/themes/simple/js/searxng.head.js
    searx/static/themes/simple/css/searxng-rtl.css
    searx/static/themes/simple/css/searxng.css

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-01 10:38:41 +01:00
Markus Heiser e62733fcf3
Merge pull request #571 from searxng/update_data_update_languages.py
Update searx.data - update_languages.py
2021-12-01 07:30:41 +01:00
Markus Heiser 24d04f2854
Merge pull request #570 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2021-12-01 07:29:56 +01:00
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
Markus Heiser de0249ddae [fix] don't mix loaded modules with imported modules (sys.modules)
The utils.load_module() function is used to load a python file (aka module) and
return the module's namespace.  SearXNG uses this function to load *engines and
answerers* from arbitrary locations with arbitrary modifications.  These are not
real python modules and it is not intended to mix this *engines and answerers*
with the python modules registered in sys.modules.

Closes: https://github.com/searxng/searxng/issues/312
Suggested-by: @dalf in https://github.com/searxng/searxng/issues/312
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-06 18:45:00 +02:00
Markus Heiser feb2d4dda5
Merge pull request #377 from return42/engine-imdb
[mod] engines - add IMDB / Internet Movie Database
2021-10-05 08:14:01 +00:00
Alexandre Flament 8a897b86f1 [mod] engines - IMDB: add thumbnails 2021-10-05 09:10:02 +02:00
Alexandre Flament 47eb836c65
Merge pull request #375 from dalf/searxng_extra
SearXNG: searx_extra
2021-10-03 19:09:07 +02:00
Alexandre Flament 715c445e9b [build] /static 2021-10-03 19:04:18 +02:00
Paul Alcock 823d44ed0a [mod] engines - add IMDB / Internet Movie Database
Merged from @Guilvareux's commit [1] and slightly modfied / see [2].

[1] https://github.com/searx/searx/pull/2980/commits/f2f90071
[2] https://github.com/searx/searx/pull/2980
2021-10-03 11:44:25 +02:00
Alexandre Flament 1bb82a6b54 SearXNG: searxng_extra 2021-10-02 17:30:39 +02:00
Alexandre Flament 430babca25 SearXNG: environment variables 2021-10-02 16:54:11 +02:00
Alexandre Flament e39a03cc61
Merge pull request #367 from dalf/searxng-github
SearXNG: .github, searxng-docker
2021-10-02 07:57:49 +02:00
Markus Heiser fda5609a17
Merge pull request #360 from return42/ddg-lite
Implement a DuckDuckGo Lite engine
2021-10-02 05:16:29 +00:00
Markus Heiser 97419a770d [upd] make data.languages
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-01 20:01:41 +02:00
Markus Heiser a5b7ed9550 [mod] engine duckduckgo - update supported_languages_url
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-01 20:01:41 +02:00