Compare commits

..

419 commits

Author SHA1 Message Date
7182190057 Merge pull request 'master' (#2) from Icycoide/searxng:master into master
Reviewed-on: #2
2025-05-31 13:31:47 +02:00
benpiano800
37d851fb23 [mod] UI footer: correct capitalization of "SearXNG" in base.html 2025-05-30 09:33:57 +02:00
dependabot[bot]
1b424b8d54 [upd] pypi: Bump the minor group with 2 updates
Bumps the minor group with 2 updates: [selenium](https://github.com/SeleniumHQ/Selenium) and [typer-slim](https://github.com/fastapi/typer).


Updates `selenium` from 4.32.0 to 4.33.0
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.32.0...selenium-4.33.0)

Updates `typer-slim` from 0.15.4 to 0.16.0
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.15.4...0.16.0)

---
updated-dependencies:
- dependency-name: selenium
  dependency-version: 4.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: typer-slim
  dependency-version: 0.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 09:23:11 +02:00
dependabot[bot]
b991688fcb [upd] web-client (simple): Bump the minor group
Bumps the minor group in /client/simple with 2 updates: [globals](https://github.com/sindresorhus/globals) and [stylelint](https://github.com/stylelint/stylelint).


Updates `globals` from 16.1.0 to 16.2.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.1.0...v16.2.0)

Updates `stylelint` from 16.19.1 to 16.20.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.19.1...16.20.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 16.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: stylelint
  dependency-version: 16.20.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 09:16:49 +02:00
searxng-bot
44471bef35 [l10n] update translations from Weblate
0f55f2438 - 2025-05-29 - sandijs <sandijs@noreply.codeberg.org>
109f7dcb8 - 2025-05-26 - ngf <ngf@noreply.codeberg.org>
d2ba9b3d0 - 2025-05-26 - artnay <artnay@noreply.codeberg.org>
33c6f23bf - 2025-05-26 - realkendrick_fr <realkendrick_fr@noreply.codeberg.org>
2025-05-30 09:13:36 +02:00
dependabot[bot]
0b4c47a123 [upd] web-client (simple): Bump the minor group
Bumps the minor group in /client/simple with 4 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [eslint](https://github.com/eslint/eslint), [sharp](https://github.com/lovell/sharp) and [webpack](https://github.com/webpack/webpack).


Updates `@eslint/js` from 9.26.0 to 9.27.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.27.0/packages/js)

Updates `eslint` from 9.26.0 to 9.27.0
- [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/v9.26.0...v9.27.0)

Updates `sharp` from 0.34.1 to 0.34.2
- [Release notes](https://github.com/lovell/sharp/releases)
- [Commits](https://github.com/lovell/sharp/compare/v0.34.1...v0.34.2)

Updates `webpack` from 5.99.8 to 5.99.9
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.8...v5.99.9)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.27.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: eslint
  dependency-version: 9.27.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: sharp
  dependency-version: 0.34.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor
- dependency-name: webpack
  dependency-version: 5.99.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-29 09:00:15 +02:00
Markus Heiser
913dfbde3c [fix] plugins: currency processor bug
Fix C&P typo from  https://github.com/searxng/searxng/pull/4836

Closes: https://github.com/searxng/searxng/issues/4861
2025-05-29 07:37:59 +02:00
searxng-bot
7448a18efa [data] update searx.data - update_ahmia_blacklist.py 2025-05-29 07:11:55 +02:00
searxng-bot
23396f5a1d [data] update searx.data - update_firefox_version.py 2025-05-29 07:10:22 +02:00
searxng-bot
dbe6a6f4fa [data] update searx.data - update_wikidata_units.py 2025-05-29 07:08:32 +02:00
searxng-bot
b2727e1be9 [data] update searx.data - update_currencies.py 2025-05-29 07:07:55 +02:00
searxng-bot
9d8592afd7 [data] update searx.data - update_engine_traits.py 2025-05-29 07:07:05 +02:00
searxng-bot
70a387a48f [data] update searx.data - update_engine_descriptions.py 2025-05-29 07:06:38 +02:00
Bnyro
2288f07d62 [fix] presearch: reuse response cookies from token extraction
Why?
- presearch requires the response cookies of the first request to be sent within the second request
- otherwise we miss auth information and the engine doesn't work

Related:
- https://github.com/searxng/searxng/pull/4858
- closes https://github.com/searxng/searxng/issues/4854

Co-authored-by: Aadniz <8147434+Aadniz@users.noreply.github.com>
2025-05-28 12:53:45 +02:00
Bnyro
20b40351b9 [chore] il post: disable by default 2025-05-26 17:39:09 +02:00
Bnyro
7a5a499795 [build] /static 2025-05-25 18:04:18 +02:00
Bnyro
9dfdd30da0 [fix] search: autocomplete focus on results page
This has been a regression introduced with the removal of
the unmaintained autocomplete.js library.

We should only focus the search bar on the main search page at `/`
and not at the results page located at `/search`.

I'm not sure if there's a better way to figure out if
we're on the results page than checking if the id of the
main element is `#main_results`, checking the path
obviously isn't a better solution because it can differ
depending on the instance / reverse proxy / ....

- related to 32823ecb69
- closes https://github.com/searxng/searxng/issues/4846
2025-05-25 18:04:18 +02:00
Ivan Gabaldon
14b8a999f3
[mod] ci: exclude some workflows from forks (#4849)
Excludes some workflows/jobs unneeded on forks.

Closes https://github.com/searxng/searxng/issues/4847
2025-05-25 14:54:27 +02:00
Markus Heiser
848c8d0544
[mod] data: implement a simple currencies (SQL) database (#4836)
To reduce the memory footprint, this patch no longer loads the JSON data
completely into memory.  Instead, there is an SQL database based on
`ExpireCacheSQLite`.

The class CurrenciesDB is a simple DB application that encapsulates the
DB (queries and initialization) and provides convenient methods like
`name_to_iso4217` and `iso4217_to_name`.

Related:

- https://github.com/searxng/searxng/discussions/1892
- https://github.com/searxng/searxng/pull/3458#issuecomment-2900807671
- https://github.com/searxng/searxng/pull/4650

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-25 10:40:57 +02:00
github-actions[bot]
e46187e3ce
[l10n] update translations from Weblate (#4840)
51e0a154c - 2025-05-22 - Priit Jõerüüt <jrtcdbrg@noreply.codeberg.org>
256b8cb8e - 2025-05-16 - wetinee <wetinee@noreply.codeberg.org>
ac12b76a8 - 2025-05-16 - wetinee <wetinee@noreply.codeberg.org>

Co-authored-by: searxng-bot <searxng-bot@users.noreply.github.com>
2025-05-25 10:36:27 +02:00
Markus Heiser
064eb50473
[mod] engines: Yahoo in different languages (#4826)
BTW fix issue reported in [1]

[1] https://github.com/searxng/searxng/pull/4814#issuecomment-2896948787

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-05-24 13:14:13 +02:00
Alexandre Flament
9ed9a9aa53
[fix] searx.network: don't trigger DeprecationWarning (#4845)
Avoid a confusing warning:

    DeprecationWarning: Setting per-request cookies=<...> is being deprecated

Code based on httpx unit test [1]

[1] 6a99f6f2b3/tests/client/test_cookies.py (L123-L137)

Closes: https://github.com/searxng/searxng/issues/4833
2025-05-24 12:40:05 +02:00
Markus Heiser
230215c250
[fix] preferences: description not localized for all UI languages (#4844)
The previous implementation for determining the description of an engine did not
take into account that the UI languages ​​can also have a region tag and/or a
script tag:

    el-GR:      Ελληνικά, Ελλάδα (Greek, Greece)
    fa-IR:      فارسی, ایران (Persian, Iran)
    nb-NO:      Norsk bokmål, Norge (Norwegian bokmål, Norway)
    nl-BE:      Nederlands, België (Dutch, Belgium)
    pt-BR:      Português, Brasil (Portuguese, Brazil)
    zh-HK:      中文, 中國香港特別行政區 (Chinese, Hong Kong SAR China)
    zh-Hans-CN: 中文, 中国 (Chinese, China)
    zh-Hant-TW: 中文, 台灣 (Chinese, Taiwan)

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-23 17:11:41 +02:00
Markus Heiser
1ef5c03962
[fix] ddg engine: IndexError exception is raised on empty contend (#4843)
Sometimes (e.g. when ddg does not have a result item) there is no content and
the engine will fail with an IndexError:

  * Error: IndexError
  * Percentage: 10
  * Parameters: `()`
  * File name: `searx/engines/duckduckgo.py:375`
  * Function: `response`
  * Code: `item["content"] = extract_text(eval_xpath(div_result, './/a[contains(@class, "result__snippet")]')[0])`

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-23 14:55:22 +02:00
useralias
4fa7de8033
[refactor] duckduckgo engine: improve request logic and code structure (#4837)
Changes:
- Add trailing slash to base URL to prevent potential redirects
- Remove advanced search syntax filtering (no longer guarantees a CAPTCHA)
- Correct pagination offset calculation: Page 2 now starts at offset 10,
  subsequent pages use 10 + (n-2)*15 formula instead of the previous
  broken 20 + (n-2)*50 calculation that caused CAPTCHAs
- Restructure request parameter building to better match a real request
- "kt" cookie is no longer an empty string if the language/region is "all"
- Group related parameter assignments together
- Add header logging to debugging output

Related:

- https://github.com/searxng/searxng/issues/4824
2025-05-23 13:01:10 +02:00
Markus Heiser
98badc9cd0
[fix] searx.data: fetch-traits - z-library (httpx.ConnectError) (#4835)
There is currently no known z-library, and all known URLs are dead [1]. To avoid
interrupting automated updates, a connection error to a z-library is treated as
a *known error*, and the old properties of the z-library are retained.

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-22 17:43:11 +02:00
Markus Heiser
d29cf64ce4
[mod] searx.data: lazy load of the data objects (databases) (#4834)
In the previous implementation, all databases were loaded into memory when
importing the searx.data package, regardless of whether they were ever needed.

Regardless of this, it is an antipattern to load entire databases into memory
when importing a package or module; databases should be loaded when needed.

Lazy loading is a first step toward improving memory usage and also improves
performance when setting up the runtime environment.  Building on this,
subsequent PRs will be able to further optimize memory behavior, e.g., by using
a real database application such as the one already available via

    searx.cache.ExpireCache

Related:

- https://github.com/searxng/searxng/discussions/1892
- https://github.com/searxng/searxng/pull/3458
- https://github.com/searxng/searxng/pull/4650

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-22 16:23:30 +02:00
Markus Heiser
861f9c4be5 [build] /static 2025-05-22 15:16:54 +02:00
Bnyro
32823ecb69 [refactor] search.js: use custom auto completion implementation
The previously used library is unmaintained for 6 years now [1] and the solution
had know issues [2][3]

[1] https://github.com/searxng/searxng/pull/4284#discussion_r1954493434
[2] https://github.com/searxng/searxng/pull/4318#issuecomment-2731576657
[3] https://github.com/privau/searxng/issues/56
2025-05-22 15:16:54 +02:00
Zhijie He
156d1eb8c8
[feat] engines: add Naver engine (#4573)
Refactor Naver engine (Web, News, Images, Videos, Autocomplete)

- ref: https://search.naver.com/
- lang: `ko`
- Wikidata: https://www.wikidata.org/wiki/Q485639

Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-05-21 18:25:02 +02:00
Markus Heiser
365b9426f1
[fix] engines: disable those with known issues (#4813)
- z-library https://github.com/searxng/searxng/issues/3610
- library of congress: https://github.com/searxng/searxng/issues/4810
- qwant: https://github.com/searxng/searxng/issues/3929

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-21 15:50:29 +02:00
Ivan Gabaldon
9ffe23ecf3 [mod] container: remove -e flag
Temporarily remove the -e flag from set to prevent entrypoint.sh from stopping execution if any command returns a non-zero status. This doesn't solve anything but relaxes the script checks.

Related https://github.com/searxng/searxng/issues/4818
2025-05-21 15:27:26 +02:00
Bnyro
502017b901
[fix] pinterest: engine broken due to API changes (#4816)
- apparently the API now requires a `X-Pinterest-PWS-Handler` in order to
  properly function (extracted from their web UI)

- the other `X-Pinterest` headers here are added in case they become mandatory
  too

Closes: https://github.com/searxng/searxng/issues/4812
2025-05-21 15:22:42 +02:00
Bnyro
88973f5431
[feat] engines: add uxwing engine for icons (#4819)
- uxwing provides attribution-free icons to use for design projects
- svgrepo was my go-to before, but it's ratelimiting a lot recently
2025-05-21 15:10:29 +02:00
Bnyro
8bff73c9b6
[refactor] icon engines: add new icon category (#4817)
Icons category makes sense because it allows to quickly search for free SVG
icons to use for websites / other designs with a quick `!icons` query

Icons don't seem to fit into the normal images category that well because icons
are quite a special type of images
2025-05-21 14:52:16 +02:00
Jost Alemann
7420706a50
[chore] fix some docstring typos (#4815) 2025-05-20 21:03:54 +02:00
useralias
6ec554cb5b [fix] yahoo: url and title xpath 2025-05-20 21:02:40 +02:00
Alexandre Flament
7a3742ae56
[mod] upgrade to httpx 0.28.1 (#4674) 2025-05-20 18:18:07 +02:00
Markus Heiser
ca67f1dffe
[fix] duckduckgo engines: issue when get_vqd() is used by ddg-images and ddg-videos (#4809)
The global variable CACHE is not initialized when DDG images or DDG videos
import the get_vqd() function (please remember: the engine modules are imported
using the importlib method and not via the `import` keyword).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-20 16:10:10 +02:00
Ivan Gabaldon
749de829d5 [mod] container: refactor entrypoint script
That entrypoint is prone to screw things up, especially with permission handling. The new script handles initialization better and fixes some issues like delayed settings update via ENVs and timestamp overwriting, also adjusts what should be copied into the container.

Related https://github.com/searxng/searxng/pull/4721#issuecomment-2850272129
2025-05-20 11:49:30 +02:00
Ivan Gabaldon
a195f52412 [fix] container: base-builder should have essentials
The wolfi-base metapackage includes busybox, ca-certificates-bundle and the package manager. The change is to make the use of base-builder image more flexible.
2025-05-20 11:31:45 +02:00
dependabot[bot]
5dff826937
[upd] web-client (simple): Bump vite-plugin-static-copy (#4791)
Bumps [vite-plugin-static-copy](https://github.com/sapphi-red/vite-plugin-static-copy) from 2.3.1 to 3.0.0.
- [Release notes](https://github.com/sapphi-red/vite-plugin-static-copy/releases)
- [Changelog](https://github.com/sapphi-red/vite-plugin-static-copy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sapphi-red/vite-plugin-static-copy/compare/vite-plugin-static-copy@2.3.1...vite-plugin-static-copy@3.0.0)
2025-05-18 13:22:48 +02:00
Markus Heiser
b8b857d24c
[mod] engine invidious: commented out / no public API available nowadays (#4800)
Reported-by: @unifox https://github.com/searxng/searxng/issues/2722#issuecomment-2884993248

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-18 13:20:27 +02:00
Ivan Gabaldon
86373e7c87
[mod] container: build custom base images (#4799)
Instead of using Wolfi base images from cgr.dev and making that mess on the Dockerfile, why don't we build the base images ourselves from Wolfi repos with apko? The intention of this is to simplify the main Dockerfile and avoid having to patch the base image every time, it also simplifies some steps like image ownership management and provides extremely fast builds.
2025-05-17 18:21:04 +02:00
github-actions[bot]
1b08324f26
[l10n] update translations from Weblate (#4788) 2025-05-16 09:40:45 +02:00
dependabot[bot]
b8682ffc69
[upd] pypi: Bump typer-slim from 0.15.3 to 0.15.4 in the minor group (#4789)
Bumps the minor group with 1 update: [typer-slim](https://github.com/fastapi/typer).


Updates `typer-slim` from 0.15.3 to 0.15.4
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.15.3...0.15.4)

---
updated-dependencies:
- dependency-name: typer-slim
  dependency-version: 0.15.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-16 09:20:44 +02:00
Ivan Gabaldon
03083f07da [enh] container: use Wolfi OS as base image
Wolfi OS images are specifically designed for container use. Using a specially designed base image for containers not only reduces maintenance burdens, but improves overall experience for developers (fewer packages we have to track) and end users (smaller images).

Discussion here: https://github.com/searxng/searxng/issues/4753
2025-05-15 22:56:31 +02:00
9f29131161 Merge pull request 'master' (#1) from Icycoide/searxng:master into master
Reviewed-on: #1
2025-05-15 22:35:22 +02:00
Ivan Gabaldon
cd64fb966e [enh] container: support multiple registries
Allows to push the manifests to other registries, this allows to push both docker.io and ghcr.io registries.
2025-05-15 11:37:18 +02:00
Ivan Gabaldon
743f24d8c6 [fix] CI: commit author should be searxng-bot
If the workflow is executed with the "workflow_dispatch" trigger, the user who executed the workflow becomes the author of the commit on the PR, this is not intended.

It also reverts the body param so that the default text of the action does not appear.
2025-05-15 11:19:28 +02:00
Ivan Gabaldon
bec76bc2e3 [fix] CI: prevent race condition
`checker.yml` and `integration.yml` are the only workflows that are currently safe to be executed simultaneously, the others present a risk that the order of completion may not be expected. The ones that are chained from `integration.yml` can be called as many times as `integration.yml` workflows are running at that moment, the same with the trigger "workflow_dispatch".

This can be fatal for workflows like `container.yml` that use a centralized cache to store and load the candidate images in a common tag called "searxng-<arch>".

* For example, a `container.yml` workflow is executed after being chained from `integration.yml` (called "~1"), and seconds later it may be triggered again because another PR merged some breaking changes (called "~2"). While "~1" has already passed the test job successfully and is about to start the release job, "~2" finishes building the container and overwrites the references on the common tag. When "~1" in the release job loads the images using the common tag, it will load the container of "~2" instead of "~1" having skipped the whole test job process.

The example is only set for the container workflow, but the other workflows might occur in a similar way.
2025-05-15 11:19:28 +02:00
Ivan Gabaldon
d0b7f26f4b [fix] CI: container-mounts bad hash
This is a typo, but if there are multiple patterns in hashFiles, they should be separated by commas.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#examples-with-multiple-patterns
2025-05-15 11:19:28 +02:00
Ivan Gabaldon
b42f812c57
[fix] CI: handle old cache images from registry
Currently, we have 1100~ cache images uploaded to GHCR that weigh more than 300 MB each (most of them are layers from the second phase of the Dockerfile that were uploaded by mistake, read below). To avoid problems, I have set up a new job in a new workflow to be run weekly purging all images older than 1 week, but leaving always the 100 most recent ones.

Only the builder images should be uploaded to cache, the actual behaviour not only slows down the time for building the container, but also wastes lots of space by saving large and useless layers to GHCR that will never be used again.
2025-05-14 22:42:36 +02:00
dependabot[bot]
c73b469ce7
Bump flask from 3.1.0 to 3.1.1 (#4780)
Bumps [flask](https://github.com/pallets/flask) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.1.0...3.1.1)
2025-05-14 08:18:03 +02:00
Ivan Gabaldon
1a8884fa26
[enh] tidy: clean old morty, filtron, searx references
Everyone should have already switched from legacy methods.
2025-05-13 21:10:02 +02:00
dependabot[bot]
4fb29aae81
[upd] pypi: Bump the minor group with 2 updates (#4776)
Bumps the minor group with 2 updates: [selenium](https://github.com/SeleniumHQ/Selenium) and [redis](https://github.com/redis/redis-py).


Updates `selenium` from 4.31.0 to 4.32.0
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.31.0...selenium-4.32.0)

Updates `redis` from 5.0.8 to 5.2.1
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.8...v5.2.1)
2025-05-13 17:44:10 +02:00
dependabot[bot]
c303da55b0
[upd] web-client (simple): Bump the minor group (#4775)
Bumps the minor group in /client/simple with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.25.1` | `9.26.0` |
| [eslint](https://github.com/eslint/eslint) | `9.25.1` | `9.26.0` |
| [globals](https://github.com/sindresorhus/globals) | `16.0.0` | `16.1.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `6.3.4` | `6.3.5` |
| [webpack](https://github.com/webpack/webpack) | `5.99.7` | `5.99.8` |


Updates `@eslint/js` from 9.25.1 to 9.26.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.26.0/packages/js)

Updates `eslint` from 9.25.1 to 9.26.0
- [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/v9.25.1...v9.26.0)

Updates `globals` from 16.0.0 to 16.1.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.0.0...v16.1.0)

Updates `vite` from 6.3.4 to 6.3.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.5/packages/vite)

Updates `webpack` from 5.99.7 to 5.99.8
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.7...v5.99.8)
2025-05-13 17:38:46 +02:00
Ivan Gabaldon
2cfd3fc44b
[enh] tidy: clean old morty, filtron, searx references
Everyone should have already switched from legacy methods
2025-05-13 10:37:02 +02:00
Markus Heiser
9006866019
[fix] engine archlinux: avoid Anubis challenge by User-Agent "SearXNG" (#4779)
Of the archlinux wikis only wiki.archlinux.org has a has Anubis challenge.

About Anubis[1]:

> Anubis decides to present a challenge using this logic:
>
> - User-Agent contains "Mozilla"
> ...
> This should ensure that git clients, RSS readers, and other low-harm clients
> can get through without issue ..

[1] 6c0ff3f4d5/docs/docs/design/how-anubis-works.mdx (challenge-presentation)


Suggested-by: @unixfox https://github.com/searxng/searxng/issues/4646#issuecomment-2855322406
Closes: https://github.com/searxng/searxng/issues/4646

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-13 10:18:28 +02:00
Ivan Gabaldon
5d99373bc6
[fix] DOCKERHUB_USERNAME env reference (#4778)
When making the container rework, I unknowingly deleted the section where an env with the same name as the secret was defined on the job scope, making it look like it was originally defined as an organization env.

Since we can't validate the secrets in a condition directly, it's better to let docker/login-action take care of failing the entire job if the credentials are invalid.

Reported in: https://github.com/searxng/searxng/issues/4777
2025-05-12 23:43:47 +02:00
Ivan Gabaldon
945b30a1c4 [mod] lib_sxng_container.sh: replace echo commands with heredoc
Suggested-by: @return42 https://github.com/searxng/searxng/pull/4764#discussion_r2083571202
2025-05-12 17:11:35 +02:00
Ivan Gabaldon
64a5b6920f [mod] lib_sxng_container.sh use required_commands() helper
Suggested-by: @return42 https://github.com/searxng/searxng/pull/4764#discussion_r2083564489
2025-05-12 17:11:35 +02:00
Markus Heiser
346d7fe019
[mod] CI: dependabot group updates by minor & patch and major updates (#4773)
By default, Dependabot opens a new pull request to update each dependency and we
have a very large number of Dependabot pull requests to review and merge, which
can quickly become difficult to manage.

The intention of this patch to dependabot is to have:

- one PR for all minor & patch level updates
- one PR for every dependency with a major update

[1] https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates
[2] https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#groups

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-12 16:42:43 +02:00
Markus Heiser
750a7b4d6f
[doc] add chapter on the purpose of (git) commits (#4729)
Chapter on the purpose of (git) commits

The commits and their messages are elementary for the traceability of changes
and are unfortunately still too often given too little attention.

It therefore seems necessary to dedicate a chapter to this topic in the context
of development.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-12 08:27:16 +02:00
Ivan Gabaldon
da3c640cef revert using null keyword
env.DOCKERHUB_USERNAME shouldn't be an empty string as it's defined and set (I think, I can't see this). Even if wasn't defined, GitHub Org/Repo wide envs/secrets should return an empty string (?)
2025-05-11 19:28:51 +02:00
Ivan Gabaldon
d16854e67a
[mod] rework container deployment (#4764)
container.yml will run after integration.yml COMPLETES successfully and in master branch.

Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows.

* Podman is now supported to build the container images (Docker also received a refactor, merging both build and buildx)
* Container images are being built by Buildah instead of Docker BuildKit.
* Container images are tested before release.
* Splitting "modern" (amd64 & arm64) and "legacy" (armv7) arches on different Dockerfiles allowing future optimizations.
2025-05-11 18:12:51 +02:00
Ivan Gabaldon
1b787ed35e
[mod] refactor integration.yml (#4763)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows.
2025-05-10 13:59:31 +02:00
Ivan Gabaldon
8e2e7774d7
[mod] new l10n.yml workflow (#4734)
l10n.yml will run after integration.yml finishes successfully (will defer anything depending on integration.yml until heavy loads like container building are moved to separate workflows) and in master branch.

* After every integration.yml workflow completes successfully, only the `update` job runs.
* Dispatch and Crontab triggers only the `pr` job.

Style changes, cleanup and improved integration with CI by leveraging the use of shared cache between all workflows (not functional until all workflows have been refactored).
2025-05-10 13:08:20 +02:00
Ivan Gabaldon
e982b9f732 [fix] documentation should run on push/pr
Instead of executing the workflow after integration.yml completes correctly, let's run this workflow parallel to integration.yml restoring the original behaviour.
2025-05-10 07:41:42 +02:00
Émilien (perso)
48456caeb3
chore: docker + github-actions dependabot (#4754)
* chore: docker dependabot

* Add github actions too
2025-05-09 20:46:20 +02:00
kevadesu
df9d418222 Fixing branding 2025-05-09 18:05:13 +02:00
kevadesu
d456f13f2e Editing branding again 2025-05-09 18:00:19 +02:00
kevadesu
77b78fab04 Branding 2025-05-09 17:39:56 +02:00
Markus Heiser
ef158ce1f4 [build] /static 2025-05-09 12:40:34 +02:00
Markus Heiser
cbf9ec7bf4 [fix] static.build.commit: add missing searx/templates/simple/icons.html
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-09 12:40:34 +02:00
Markus Heiser
409ede1530 [fix] simple client: jinja_svg_catalog addClassesToSVGElement
Starting with ionicons-8.0.8 the SVG already contains a class attribute and
instaed of using SVGO plugin ``addAttributesToSVGElement`` we habve to use
``addClassesToSVGElement`` to add out ``__jinja_class_placeholder__``.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-09 12:40:34 +02:00
dependabot[bot]
1326ec7429 [upd] web-client (simple): Bump ionicons in /client/simple
Bumps [ionicons](https://github.com/ionic-team/ionicons) from 7.4.0 to 8.0.8.
- [Release notes](https://github.com/ionic-team/ionicons/releases)
- [Commits](https://github.com/ionic-team/ionicons/compare/v7.4.0...v8.0.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-09 12:40:34 +02:00
dependabot[bot]
50406d4b46
[upd] pypi: Bump pylint from 3.3.6 to 3.3.7 (#4750)
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.6 to 3.3.7.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.6...v3.3.7)

---
updated-dependencies:
- dependency-name: pylint
  dependency-version: 3.3.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-09 11:10:37 +02:00
dependabot[bot]
5ce3aa3acf
[upd] pypi: Bump yamllint from 1.37.0 to 1.37.1 (#4752)
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.37.0 to 1.37.1.
- [Release notes](https://github.com/adrienverge/yamllint/releases)
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.37.0...v1.37.1)

---
updated-dependencies:
- dependency-name: yamllint
  dependency-version: 1.37.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-09 11:09:44 +02:00
SearXNG Bot
76ebad0b21
[l10n] update translations from Weblate (#4744)
6f8c520f2 - 2025-05-08 - polskiecus <polskiecus@noreply.codeberg.org>
05dd91d5b - 2025-05-08 - return42 <return42@noreply.codeberg.org>
686b8e5fb - 2025-05-08 - return42 <return42@noreply.codeberg.org>
f40b42bd8 - 2025-05-05 - ehsanrs2 <ehsanrs2@noreply.codeberg.org>
b8013bc99 - 2025-05-03 - polskiecus <polskiecus@noreply.codeberg.org>
5affaa104 - 2025-05-02 - SomeTr <sometr@noreply.codeberg.org>

Co-authored-by: searxng-bot <searxng-bot@users.noreply.github.com>
2025-05-09 09:31:50 +02:00
github-actions[bot]
d76f030cb3
[data] update searx.data - update_wikidata_units.py (#4738) 2025-05-09 07:09:58 +02:00
github-actions[bot]
b3b15ecc72
[data] update searx.data - update_ahmia_blacklist.py (#4739)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:09:00 +02:00
github-actions[bot]
1319b250af
[data] update searx.data - update_currencies.py (#4740)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:08:26 +02:00
github-actions[bot]
198928de05
[data] update searx.data - update_engine_traits.py (#4741)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:07:33 +02:00
github-actions[bot]
11d9c830b8
[data] update searx.data - update_engine_descriptions.py (#4742)
Co-authored-by: inetol <inetol@users.noreply.github.com>
2025-05-09 07:06:52 +02:00
Ivan Gabaldon
743f90514b
[fix] missing PR perm data-update.yml workflow (#4737)
We actually don't need to keep the token on checkout because `peter-evans/create-pull-request` will read from `github.token`. The obvious `pull-requests` write permission wasn't set in the last fix, so I added it now.
2025-05-08 23:55:23 +02:00
Ivan Gabaldon
48801dbc9a
[mod] CI move build of online docs to dedicated workflow documentation.yml (#4733)
documentation.yml will run after integration.yml COMPLETES successfully (will
defer anything depending on integration.yml until heavy loads like container
building are moved to separate workflows) and in master branch.

Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 17:40:05 +02:00
Ivan Gabaldon
5451ab243a
[fix] fix security.yml workflow (#4735)
Uploading SARIFs needs to write into the repository GitHub security tab
2025-05-08 17:13:07 +02:00
Ivan Gabaldon
7ca24eee45
[fix] missing perm data-update.yml workflow (#4736)
We need to keep the token on checkout and allow writing into the repository to create the branch
2025-05-08 16:51:21 +02:00
Ivan Gabaldon
c6a70782b2
[mod] CI: refactor data-update.yml - searxng_extra/update scripts (#4732)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 15:13:22 +02:00
Ivan Gabaldon
01a07f34b2
[mod] CI refactor security.yml - style and cleanup changes (#4731) 2025-05-08 14:44:22 +02:00
Ivan Gabaldon
f32fcb1243
[mod] CI: refactor checker.yml - make search.checker (#4730)
Style changes, cleanup and improved integration with CI by leveraging the use of
shared cache between all workflows (not functional until all workflows have been
refactored).
2025-05-08 13:58:06 +02:00
benpiano800
bc06b1aece
[enh] plugins: tor_check: Add more keywords (#4726)
Previously, there was only one usable keyword for the tor_check plugin. Adding more keywords eliminates confusion.
2025-05-07 10:39:46 +02:00
Brock Vojkovic
ff60fe635f
[fix] sec-fetch-* blocking infinite scroll (#4728) 2025-05-07 10:38:21 +02:00
Markus Heiser
6e7119fa4e
[fix] references from searx.botdetection.http_sec_fetch (#4723) 2025-05-07 10:25:47 +02:00
Ivan Gabaldon
f52cd3f008
missing dependency for armv7 (#4727) 2025-05-07 08:53:34 +02:00
Ivan Gabaldon
a2fa7de880
[mod] Rework Dockerfile - migrate to glibc (debian) (#4721) 2025-05-06 11:56:59 +02:00
Bnyro
0315988f5a
fix] revert searxng/searxng#4699 due to breaking issues (#4720)
This reverts commit 2e74d86321.
2025-05-05 09:46:37 +02:00
Ivan Gabaldon
2e74d86321
Rework Dockerfile (#4699)
This is one of various PR to refactor the entire SearXNG Docker workflow.

Switches to Python glibc based images, all dependencies are installed via pip and not from system repositories, and several minor changes.

This PR will increase the image size from 194.9 MB to 345.47 MB (amd64), this is due to ARMv7 images (needs dependencies for wheels compilation and runtime (?)) and uWSGI webserver. Later PR will reduce the final image size.
2025-05-04 22:27:53 +02:00
Émilien (perso)
19b116f1d7
fix: check if the browser supports Sec-Fetch headers (#4696) 2025-05-04 10:12:25 +02:00
Markus Heiser
fe08bb1d90 [mod] botdetection: HTTP Fetch Metadata Request Headers
HTTP Fetch Metadata Request Headers [1][2] are used to detect bot requests. Bots
with invalid *Fetch Metadata* will be redirected to the intro (`index`)  page.

[1] https://www.w3.org/TR/fetch-metadata/
[2] https://developer.mozilla.org/en-US/docs/Glossary/Fetch_metadata_request_header

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-04 02:07:26 +02:00
Markus Heiser
8ef5fbca4e [fix] cache.ExpireCache: definition of a context name for the key
The definition of a context name belongs in the abstract base class (was
previously only in the concrete implementation for the SQLite adapter).

Suggested-by: @dalf https://github.com/searxng/searxng/pull/4650#discussion_r2069873853
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03 08:39:12 +02:00
Markus Heiser
7351c38e6c [fix] (armv7) cache.ExpireCache: remove option ENCRYPT_VALUE
Prophylactic encryption of the value currently makes no sense; on the contrary,
since the ``cryptography`` package is not available on armv7, it would cause
further problems.

Suggested-by: @dalf https://github.com/searxng/searxng/pull/4650#issuecomment-2830786661
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03 08:39:12 +02:00
Markus Heiser
bdfe1c2a15 [mod] engines: migration of the individual cache solutions to EngineCache
The EngineCache class replaces all previously individual solutions for caches in
the context of the engines.

- demo_offline.py
- duckduckgo.py
- radio_browser.py
- soundcloud.py
- startpage.py
- wolframalpha_api.py
- wolframalpha_noapi.py

Search term to test most of the modified engines::

    !ddg !rb !sc !sp !wa test

    !ddg !rb !sc !sp !wa foo

For introspection of the DB, jump into developer environment and run command to
show cache state::

    $ ./manage pyenv.cmd bash --norc --noprofile
    (py3) python -m searx.enginelib cache state

    cache tables and key/values
    ===========================
    [demo_offline        ] 2025-04-22 11:32:50 count        --> (int) 4
    [startpage           ] 2025-04-22 12:32:30 SC_CODE      --> (str) fSOBnhEMlDfE20
    [duckduckgo          ] 2025-04-22 12:32:31 4dff493e.... --> (str) 4-128634958369380006627592672385352473325
    [duckduckgo          ] 2025-04-22 12:40:06 3e2583e2.... --> (str) 4-263126175288871260472289814259666848451
    [radio_browser       ] 2025-04-23 11:33:08 servers      --> (list) ['https://de2.api.radio-browser.info',  ...]
    [soundcloud          ] 2025-04-29 11:40:06 guest_client_id --> (str) EjkRJG0BLNEZquRiPZYdNtJdyGtTuHdp
    [wolframalpha        ] 2025-04-22 12:40:06 code         --> (str) 5aa79f86205ad26188e0e26e28fb7ae7
    number of tables: 6
    number of key/value pairs: 7

In the "cache tables and key/values" section, the table name (engine name) is at
first position on the second there is the calculated expire date and on the
third and fourth position the key/value is shown.

About duckduckgo: The *vqd coode* of ddg depends on the query term and therefore
the key is a hash value of the query term (to not to store the raw query term).

In the "properties of ENGINES_CACHE" section all properties of the SQLiteAppl /
ExpireCache and their last modification date are shown::

    properties of ENGINES_CACHE
    ===========================
    [last modified: 2025-04-22 11:32:27] DB_SCHEMA           : 1
    [last modified: 2025-04-22 11:32:27] LAST_MAINTENANCE    :
    [last modified: 2025-04-22 11:32:27] crypt_hash          : ca612e3566fdfd7cf7efe2b1c9349f461158d07cb78a3750e5c5be686aa8ebdc
    [last modified: 2025-04-22 11:32:30] CACHE-TABLE--demo_offline: demo_offline
    [last modified: 2025-04-22 11:32:30] CACHE-TABLE--startpage: startpage
    [last modified: 2025-04-22 11:32:31] CACHE-TABLE--duckduckgo: duckduckgo
    [last modified: 2025-04-22 11:33:08] CACHE-TABLE--radio_browser: radio_browser
    [last modified: 2025-04-22 11:40:06] CACHE-TABLE--soundcloud: soundcloud
    [last modified: 2025-04-22 11:40:06] CACHE-TABLE--wolframalpha: wolframalpha

These properties provide information about the state of the ExpireCache and
control the behavior.  For example, the maintenance intervals are controlled by
the last modification date of the LAST_MAINTENANCE property and the hash value
of the password can be used to detect whether the password has been changed (in
this case the DB entries can no longer be decrypted and the entire cache must be
discarded).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03 08:39:12 +02:00
Markus Heiser
4cbfba9d7b [mod] ExpireCache - sqlite based key/value cache with expire time 2025-05-03 08:39:12 +02:00
Markus Heiser
4a594f1b53 [fix] ResourceWarning: unclosed database in sqlite3
Reported:

- https://github.com/inetol-infrastructure/searxng-container/issues/5

Related:

- https://github.com/searxng/searxng/issues/4405#issuecomment-2692352352

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03 08:39:12 +02:00
Bnyro
590b211652 [fix] semantic scholar: method not allowed / engine doesn't work
Fixes the semantic scholar engine by extracting a ui version token.

BTW: remove html tags from the content.

Author's checklist:

- they are ratelimiting very fast, if you do approx more than 2 requests per
  minute, you have to wait some time again...

- they also have an official api at api.semanticscholar.org, but it's ratelimits
  are even harder

Closes: https://github.com/searxng/searxng/issues/4685
2025-05-02 16:46:38 +02:00
return42
41e3a0baa7 [data] update searx.data - update_engine_descriptions.py 2025-05-02 16:45:47 +02:00
dependabot[bot]
11204459da [upd] web-client (simple): Bump less-loader in /client/simple
Bumps [less-loader](https://github.com/webpack-contrib/less-loader) from 12.2.0 to 12.3.0.
- [Release notes](https://github.com/webpack-contrib/less-loader/releases)
- [Changelog](https://github.com/webpack-contrib/less-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/less-loader/compare/v12.2.0...v12.3.0)

---
updated-dependencies:
- dependency-name: less-loader
  dependency-version: 12.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 16:06:36 +02:00
Markus Heiser
03787b2e5a [docs] fix link searx/languages.py to new file searx/sxng_locales.py
The language settings page in the documentation reference languages.py which was
removed in commit c9cd376

Closes: https://github.com/searxng/searxng/issues/4690
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-02 15:19:55 +02:00
dependabot[bot]
72294a9ffa [upd] web-client (simple): Bump webpack in /client/simple
Bumps [webpack](https://github.com/webpack/webpack) from 5.99.6 to 5.99.7.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.6...v5.99.7)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.99.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 14:50:13 +02:00
BrandonStudio
d47cf9db24 [feat] engine ChinaSo: support source filter for ChinaSo-News
* filtering ChinaSo-News results by source, option ``chinaso_news_source``
* add ChinaSo engine to the online docs https://docs.searxng.org/dev/engines/online/chinaso.html
* fix SearXNG categories in the settings.yml
* deactivate ChinaSo engines ``inactive: true`` until [1] is fixed
* configure network of the ChinaSo engines

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

Signed-off-by: @BrandonStudio
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-02 14:22:51 +02:00
dependabot[bot]
705ebe64b5 [upd] pypi: Bump typer-slim from 0.15.2 to 0.15.3
Bumps [typer-slim](https://github.com/fastapi/typer) from 0.15.2 to 0.15.3.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.15.2...0.15.3)

---
updated-dependencies:
- dependency-name: typer-slim
  dependency-version: 0.15.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 13:46:47 +02:00
dependabot[bot]
b072b0f66b [upd] pypi: Bump setproctitle from 1.3.5 to 1.3.6
Bumps [setproctitle](https://github.com/dvarrazzo/py-setproctitle) from 1.3.5 to 1.3.6.
- [Changelog](https://github.com/dvarrazzo/py-setproctitle/blob/master/HISTORY.rst)
- [Commits](https://github.com/dvarrazzo/py-setproctitle/compare/version-1.3.5...version-1.3.6)

---
updated-dependencies:
- dependency-name: setproctitle
  dependency-version: 1.3.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 13:37:39 +02:00
dependabot[bot]
4beb5523f5 [upd] pypi: Bump certifi from 2025.1.31 to 2025.4.26
Bumps [certifi](https://github.com/certifi/python-certifi) from 2025.1.31 to 2025.4.26.
- [Commits](https://github.com/certifi/python-certifi/compare/2025.01.31...2025.04.26)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2025.4.26
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 13:37:11 +02:00
dependabot[bot]
54e6e2a96d [upd] web-client (simple): Bump stylelint in /client/simple
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.19.0 to 16.19.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.19.0...16.19.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.19.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 13:36:01 +02:00
searxng-bot
abcf8ca073 [l10n] update translations from Weblate
244e1f3f2 - 2025-04-30 - return42 <return42@noreply.codeberg.org>
2025-05-02 13:29:05 +02:00
dependabot[bot]
1a16281490 Bump vite from 6.3.3 to 6.3.4 in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.3.3 to 6.3.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.4
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 09:43:39 +02:00
Bnyro
fd33559cfb [fix] brave: fix images and videos engines 2025-04-30 08:28:04 +02:00
Denperidge
60e31eacfc [fix] pdia: dynamically fetch API key config file location
As suggested by @Bnyro at
https://github.com/searxng/searxng/pull/4652#discussion_r2055760390 !
2025-04-29 20:45:08 +02:00
return42
c45b970546 [data] update searx.data - update_currencies.py 2025-04-29 09:12:06 +02:00
Markus Heiser
a4251be397 [data] update searx.data - make data.traits
Related:

- https://github.com/searxng/searxng/pull/4687

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-29 09:11:33 +02:00
Markus Heiser
c20038e7c3 [fix] engine yahoo: replace fetch_traits by a list of languages
The Yahoo engine's fetch_traits function has been encountering an error in CI
jobs for several months [1], thus aborting the process for all other engines as
well.

The language selection dialog (which fetch_traits calls) requires an `EuConsent`
cookie. Strangely, the cookie is not needed for searching, which is why the
engine itself still works.

Since Yahoo won't be conquering any new marketplaces in the foreseeable future,
it should be sufficient to hard-implement the list of currently available
languages ​​(`yahoo_languages`).

[1] https://github.com/searxng/searxng/actions/runs/14720458830/job/41313149268

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-29 08:48:56 +02:00
return42
20e40ded6d [data] update searx.data - update_wikidata_units.py 2025-04-29 07:07:15 +02:00
return42
4de0766b76 [data] update searx.data - update_ahmia_blacklist.py 2025-04-29 07:06:49 +02:00
return42
6de83ca47f [data] update searx.data - update_firefox_version.py 2025-04-29 07:06:26 +02:00
return42
a32bcd54c5 [data] update searx.data - update_external_bangs.py 2025-04-29 07:06:10 +02:00
searxng-bot
c733aa83e8 [l10n] update translations from Weblate
bec89c8a4 - 2025-04-24 - Atul_Eterno <atul_eterno@noreply.codeberg.org>
97edb4d63 - 2025-04-23 - whytf <whytf@noreply.codeberg.org>
e7111d6ec - 2025-04-22 - prashere <prashere@noreply.codeberg.org>
f5eeda966 - 2025-04-20 - return42 <return42@noreply.codeberg.org>
2025-04-27 17:13:43 +02:00
dependabot[bot]
9dfc6f38d5 [upd] web-client (simple): Bump vite in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.3.2 to 6.3.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-27 10:16:44 +02:00
dependabot[bot]
e1076f5c35 [upd] web-client (simple): Bump @eslint/js in /client/simple
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.24.0 to 9.25.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/commits/v9.25.1/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.25.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-27 10:16:26 +02:00
dependabot[bot]
8489817561 [upd] web-client (simple): Bump webpack in /client/simple
Bumps [webpack](https://github.com/webpack/webpack) from 5.99.5 to 5.99.6.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.99.5...v5.99.6)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.99.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-27 10:16:03 +02:00
dependabot[bot]
38ff1e4a7d [upd] web-client (simple): Bump stylelint in /client/simple
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.18.0 to 16.19.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.18.0...16.19.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-27 10:15:40 +02:00
dependabot[bot]
21cdb0332b [upd] web-client (simple): Bump eslint in /client/simple
Bumps [eslint](https://github.com/eslint/eslint) from 9.24.0 to 9.25.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/v9.24.0...v9.25.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-27 10:15:33 +02:00
dependabot[bot]
30330617d9 [upd] pypi: Bump lxml from 5.3.2 to 5.4.0
Bumps [lxml](https://github.com/lxml/lxml) from 5.3.2 to 5.4.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.3.2...lxml-5.4.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-version: 5.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-26 13:46:56 +02:00
Markus Heiser
33729439c5 [fix] is_werkzeug_reload_active is not realted to python -m
Werkzeug's reloader is not active when was server is launched by uWSGI.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-24 17:24:51 +02:00
Markus Heiser
20ce88a274 Revert "[fix] is_werkzeug_reload_active is not realted to python -m"
This reverts commit 3392beb914.
2025-04-24 17:03:20 +02:00
Zhijie He
8595e467ce [fix] fix Quark engine calling 2025-04-24 16:17:34 +02:00
Markus Heiser
3392beb914 [fix] is_werkzeug_reload_active is not realted to python -m
Werkzeug's reloader is not active when was server is launched by::

    python -m searx.webapp

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-24 15:33:59 +02:00
Markus Heiser
c6c6d3027c [mod] internal ! and external !! bangs: ignore upper/lower case
Closes: https://github.com/searxng/searxng/issues/1223

Suggested-by: @dalf https://github.com/searxng/searxng/issues/1223#issuecomment-1133772363
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-24 10:40:18 +02:00
Markus Heiser
d19eb3903e [clean] drop unusable engine: server/project on curlie.org is broken
The websites of https://curlie.org are no longer usable, long runtimes and
recurring "Bad Gateway" messages .. the project is no longer maintained and is
therefore no longer useful in SearXNG.

Related: https://github.com/searxng/searxng/issues/1190
Closes: https://github.com/searxng/searxng/issues/3482

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-24 09:57:50 +02:00
Markus Heiser
f45d4145e6 [fix] typo in soundcloud engine
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-23 18:42:40 +02:00
Markus Heiser
937eb907d3 [data] update searx.data - make data.traits (mullvad leta)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-23 14:06:32 +02:00
Grant Lanham
851c0e5cc0 [fix] engine: re-implement mullvad leta integration
Re-writes the Mullvad Leta integration to work with the new breaking changes.

Mullvad Leta is a search engine proxy.  Currently Leta only offers text search
results not image, news or any other types of search result.  Leta acts as a
proxy to Google and Brave search results.

- Remove docstring comments regarding requiring the use of Mullvad VPN, which is
  no longer a hard requirement.

- configured two engines: ``mullvadleta`` (uses google) and
  ``mullvadleta brave`` (uses brave)

- since leta may not provide up-to-date search results, both search engines are
  disabled by default.

.. hint::

   Leta caches each search for up to 30 days.  For example, if you use search
   terms like ``news``, contrary to your intention you'll get very old results!

Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
Signed-off-by: Grant Lanham <contact@grantlanham.com>
2025-04-23 14:06:32 +02:00
Aadniz
07a94d4d2e [mod] include SEARXNG_METHOD environment variable 2025-04-23 07:29:26 +02:00
Markus Heiser
e9157b3c1a [fix] issues when launching a local development server
A local development server can be launched by one of these command lines::

    $ flask --app searx.webapp run
    $ python -m searx.webapp

The different ways of starting the server should lead to the same result, which
is generally the case.  However, if the modules are reloaded after code
changes (reload option), it must be avoided that the application is initialized
twice at startup.  We have already discussed this in 2022 [1][2].

Further information on this topic can be found in [3][4][5].

To test a bash in the ./local environment was started and the follwing commands
had been executed::

    $ ./manage pyenv.cmd bash --norc --noprofile
    (py3) SEARXNG_DEBUG=1 flask --app searx.webapp run --reload
    (py3) SEARXNG_DEBUG=1 python -m searx.webapp

Since the generic parts of the docs also initialize the app to generate doc from
it, the build of the docs was also tested::

    $ make docs.clean docs.live

[1] https://github.com/searxng/searxng/pull/1656#issuecomment-1214198941
[2] https://github.com/searxng/searxng/pull/1616#issuecomment-1206137468
[3] https://flask.palletsprojects.com/en/stable/api/#flask.Flask.run
[4] https://github.com/pallets/flask/issues/5307#issuecomment-1774646119
[5] https://stackoverflow.com/a/25504196

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-22 14:26:11 +02:00
dependabot[bot]
5ae3b3f17e [upd] web-client (simple): Bump vite-plugin-static-copy
Bumps [vite-plugin-static-copy](https://github.com/sapphi-red/vite-plugin-static-copy) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/sapphi-red/vite-plugin-static-copy/releases)
- [Changelog](https://github.com/sapphi-red/vite-plugin-static-copy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sapphi-red/vite-plugin-static-copy/compare/vite-plugin-static-copy@2.3.0...vite-plugin-static-copy@2.3.1)

---
updated-dependencies:
- dependency-name: vite-plugin-static-copy
  dependency-version: 2.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 09:46:01 +02:00
dependabot[bot]
50ac76ce94 [upd] web-client (simple): Bump vite in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.2/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-18 09:43:05 +02:00
searxng-bot
5aea044eb5 [l10n] update translations from Weblate
f290f4ffe - 2025-04-15 - return42 <return42@noreply.codeberg.org>
4a9134b03 - 2025-04-14 - DZDevelopers <dzdevelopers@noreply.codeberg.org>
a8c86581d - 2025-04-14 - aindriu80 <aindriu80@noreply.codeberg.org>
2b5395719 - 2025-04-11 - ayame30 <ayame30@noreply.codeberg.org>
448a443fa - 2025-04-11 - ayame30 <ayame30@noreply.codeberg.org>
2025-04-18 09:30:55 +02:00
Zhijie He
808dcaf1e2 [feat] engine: add Steam engine 2025-04-18 09:30:17 +02:00
Markus Heiser
777ba6ddf8 [fix] disable engine ansa by default
Reported-by: https://github.com/searxng/searxng/pull/4575#issuecomment-2813007107
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-17 16:50:57 +02:00
Tommaso Colella
8ca57748ff [fix] docs: changed "many" to "some" for clarity in contribution guide's privacy by design section 2025-04-17 16:47:52 +02:00
Tommaso Colella
30399c50e2 [fix] docs: typos and minor refinements in contribution_guide.rst 2025-04-17 16:47:52 +02:00
Tommaso Colella
e6467bce7c [fix] docs: better phrasing for many sections of contribution_guide.rst 2025-04-17 16:47:52 +02:00
Tommaso Colella
8ca2bbc4e9 [fix] docs: typos in dev contrib guide "it's might be because
of the tool" -> "it might be because the tool"
2025-04-17 16:47:52 +02:00
Tommaso Colella
a74593419f [fix] docs: typo in templates dev doc developerat -> developer at 2025-04-17 16:47:52 +02:00
Zhijie He
f94802f2d2 [feat] engines: add Hugging Face engine 2025-04-17 16:43:32 +02:00
Tommaso Colella
d1c584b961 [feat] engine: add engine for italian press agency ansa 2025-04-17 15:33:57 +02:00
Markus Heiser
81f3d15665 [fix] settings.yml files: doc & obsolete settings in the template
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-17 13:31:10 +02:00
Tommaso Colella
99ad69450d [fix] Result type: remove rstrip "/" form url normalization 2025-04-17 10:24:05 +02:00
RobinFrcd
087da66565 [feat] add SensCritique (FR) engine
Closes: https://github.com/searxng/searxng/issues/4623
2025-04-17 10:19:22 +02:00
Markus Heiser
b84ae39978 [fix] doc of setting server.base_url, env is SEARXNG_BASE_URL
Related:

- https://github.com/searxng/searxng/issues/4634

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-16 14:54:46 +02:00
Tommaso Colella
391bb1268d [feat] engine: add microsoft learn engine 2025-04-12 11:14:13 +02:00
dependabot[bot]
2287a6826a Bump vite from 6.2.5 to 6.2.6 in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-11 18:23:56 +02:00
dependabot[bot]
b3971f89e2 [upd] web-client (simple): Bump less in /client/simple
Bumps [less](https://github.com/less/less.js) from 4.2.2 to 4.3.0.
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/compare/v4.2.2...v4.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-11 16:02:15 +02:00
Markus Heiser
a4e08a5c2f [upd] web-client (simple): Bump eslint, sharp, webpack
Closes: https://github.com/searxng/searxng/pull/4618
Closes: https://github.com/searxng/searxng/pull/4617
Closes: https://github.com/searxng/searxng/pull/4616
Closes: https://github.com/searxng/searxng/pull/4615

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-11 15:57:01 +02:00
grasdk
8ee51cc0f3 [fix] engine dokuwiki: basedir duplication
Dokuwiki searches behind reverse proxy had duplicate base path in the url,
creating a wrong url.

This patch exchanges string concat of URLs with urljoin [1] from urllib.parse.  This
eliminates the dual problem, while retaining the old functionality designed to
concatenate protocol, hostname and port (as base_url) with path.

[1] https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urljoin

Closes: https://github.com/searxng/searxng/issues/4598
2025-04-11 09:47:25 +02:00
dependabot[bot]
ed2953c59f [upd] pypi: Bump lxml from 5.3.1 to 5.3.2
Bumps [lxml](https://github.com/lxml/lxml) from 5.3.1 to 5.3.2.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.3.1...lxml-5.3.2)

---
updated-dependencies:
- dependency-name: lxml
  dependency-version: 5.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-11 09:25:19 +02:00
dependabot[bot]
e2fac7f306 [upd] pypi: Bump selenium from 4.30.0 to 4.31.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.30.0 to 4.31.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.30.0...selenium-4.31.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-11 09:23:45 +02:00
dependabot[bot]
8db2a15307 [upd] pypi: Bump sphinx-issues from 5.0.0 to 5.0.1
Bumps [sphinx-issues](https://github.com/sloria/sphinx-issues) from 5.0.0 to 5.0.1.
- [Commits](https://github.com/sloria/sphinx-issues/compare/5.0.0...5.0.1)

---
updated-dependencies:
- dependency-name: sphinx-issues
  dependency-version: 5.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-11 09:23:30 +02:00
searxng-bot
92b8f71780 [l10n] update translations from Weblate
63157cd1f - 2025-04-10 - pfaca <pfaca@noreply.codeberg.org>
e50166782 - 2025-04-10 - return42 <return42@noreply.codeberg.org>
f7ed39011 - 2025-04-09 - Kita Ikuyo <kitakita@disroot.org>
c8786066f - 2025-04-08 - return42 <return42@noreply.codeberg.org>
dd4adf136 - 2025-04-08 - return42 <return42@noreply.codeberg.org>
df50952f0 - 2025-04-08 - return42 <return42@noreply.codeberg.org>
d9a9a0bad - 2025-04-06 - eatyourglory <eatyourglory@noreply.codeberg.org>
2025-04-11 09:21:14 +02:00
Markus Heiser
15384e8fc5 [fix] make docs - ERROR: Unknown target name: "auth_key"
BTW: fix a bug with sys.path: repo-root (not util) needs to added to generate
autodoc from scripts in ./searxng_extra

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-09 17:28:18 +02:00
Markus Heiser
b146b745a7 [fix] Meilisearch engine: Authorization Token When Integrating Meilisearch
`X-Meili-API-Key` has  been changed to `Authorization` [1]

[1] https://www.meilisearch.com/docs/reference/api/overview#authorization

Suggested-by: https://github.com/searxng/searxng/issues/4416#issuecomment-2781254841
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-07 08:44:00 +02:00
Markus Heiser
c185d07689 [build] /static 2025-04-06 19:21:07 +02:00
Markus Heiser
5a54372368 [fix] images cropped in Safari (webkit)
- Closes: https://github.com/searxng/searxng/issues/4156

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-06 19:21:07 +02:00
Markus Heiser
8c8aba8cf5 [fix] engine radio browser: get servers from DNS api.radio-browser.info
Do a DNS-lookup of 'all.api.radio-browser.info', add reverse lookup and select
randomly a URL from available servers

Closes: https://github.com/searxng/searxng/issues/4576
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-06 18:59:10 +02:00
Ivan Gabaldon
9424bac031
Don't hardcode uWSGI parameters (#4578)
* Initial update

* fix

* add todo note
2025-04-04 14:57:53 +02:00
dependabot[bot]
59228fb1db [upd] web-client (simple): Bump vite in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 11:47:26 +02:00
searxng-bot
f630a24311 [l10n] update translations from Weblate
faf95be5a - 2025-04-03 - sakistzimas <sakistzimas@noreply.codeberg.org>
e42efee66 - 2025-04-02 - Juno Takano <jutty@noreply.codeberg.org>
c1fbb26c4 - 2025-04-02 - return42 <return42@noreply.codeberg.org>
562d21fb9 - 2025-04-02 - ghose <ghose@noreply.codeberg.org>
1ea9e67c5 - 2025-04-01 - return42 <return42@noreply.codeberg.org>
daaa0b41e - 2025-03-31 - wags07 <wags07@noreply.codeberg.org>
52635ec5f - 2025-03-31 - return42 <return42@noreply.codeberg.org>
589ad13f2 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
1f063c96e - 2025-03-31 - return42 <return42@noreply.codeberg.org>
c001e606d - 2025-03-31 - return42 <return42@noreply.codeberg.org>
9bc14f1a0 - 2025-03-31 - wags07 <wags07@noreply.codeberg.org>
6a524ecb4 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
508fe79c7 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
8c8db80e7 - 2025-03-31 - return42 <return42@noreply.codeberg.org>
c9f551913 - 2025-03-31 - AndersNordh <andersnordh@noreply.codeberg.org>
6c56adc71 - 2025-03-31 - artens <artens@noreply.codeberg.org>
15526190b - 2025-03-31 - Linerly <linerly@noreply.codeberg.org>
2102783df - 2025-03-31 - AndersNordh <andersnordh@noreply.codeberg.org>
fee510d78 - 2025-03-30 - kratos <makesocialfoss32@keemail.me>
d5c9b970c - 2025-03-30 - Fjuro <fjuro@noreply.codeberg.org>
94259815b - 2025-03-30 - return42 <return42@noreply.codeberg.org>
a448cf7da - 2025-03-29 - Outbreak2096 <outbreak2096@noreply.codeberg.org>
0c3ef7929 - 2025-03-29 - Priit Jõerüüt <jrtcdbrg@noreply.codeberg.org>
ce2fbffe8 - 2025-03-29 - SomeTr <sometr@noreply.codeberg.org>
2025-04-04 10:21:19 +02:00
dependabot[bot]
4452358e87 Bump vite from 6.2.3 to 6.2.4 in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-03 09:25:43 +02:00
Markus Heiser
7546f88b1e [build] /static 2025-04-03 09:03:35 +02:00
Markus Heiser
d4c6c9401d [fix] client/simple: add missing "swiped-events" devDependencies (import)
In commit 1a3543d4b in PR-4284 [1] the swiped-events [2] were forgotten to be
migrated.  In this patch, the event library is added to the ``devDependencies``
and imported by::

    import "../../../node_modules/swiped-events/src/swiped-events.js

[1] https://github.com/searxng/searxng/pull/4284
[2] https://www.npmjs.com/package/swiped-events

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Reported-by: https://github.com/searxng/searxng/pull/4198#issuecomment-2770734321
2025-04-03 09:03:35 +02:00
Markus Heiser
e6308b8167 [fix] hardening against arguments of type None, where str or dict is expected
On a long-running server, the tracebacks below can be found (albeit rarely),
which indicate problems with NoneType where a string or another data type is
expected.

result.img_src::

    File "/usr/local/searxng/searxng-src/searx/templates/simple/result_templates/images.html", line 13, in top-level template code
      <img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">{{- "" -}}
      ^
    File "/usr/local/searxng/searxng-src/searx/webapp.py", line 284, in image_proxify
      if url.startswith('//'):
         ^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'startswith'

result.content::

    File "/usr/local/searxng/searxng-src/searx/result_types/_base.py", line 105, in _normalize_text_fields
      result.content = WHITESPACE_REGEX.sub(" ", result.content).strip()
                       ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
    TypeError: expected string or bytes-like object, got 'NoneType'

html_to_text, when html_str is a NoneType::

    File "/usr/local/searxng/searxng-src/searx/engines/wikipedia.py", line 190, in response
      title = utils.html_to_text(api_result.get('titles', {}).get('display') or api_result.get('title'))
    File "/usr/local/searxng/searxng-src/searx/utils.py", line 158, in html_to_text
      html_str = html_str.replace('\n', ' ').replace('\r', ' ')
                 ^^^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'replace'

presearch engine, when json_resp is a NoneType::

    File "/usr/local/searxng/searxng-src/searx/engines/presearch.py", line 221, in response
      results = parse_search_query(json_resp.get('results'))
    File "/usr/local/searxng/searxng-src/searx/engines/presearch.py", line 161, in parse_search_query
      for item in json_results.get('specialSections', {}).get('topStoriesCompact', {}).get('data', []):
                  ^^^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'get'

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-01 11:13:47 +02:00
Zhijie He
08885d0614 [feat] add Quark autocomplete support
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-31 14:59:49 +02:00
Zhijie He
7b4612e862 [feat] engines: add Ollama engine 2025-03-30 14:25:58 +02:00
Bnyro
9ffa9fb730 [feat] engines: add reuters news engine 2025-03-30 13:56:09 +02:00
Tommaso Colella
5daa4f0460 [feat] engine: add engine for italian online newspaper "il post" 2025-03-30 13:45:06 +02:00
Zhijie He
33661cc5c3 [feat] engines: add Quark engine
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-30 13:20:35 +02:00
Zhijie He
b231cb4b59 [feat] engines: add Niconico videos engine
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-30 12:42:31 +02:00
naughtymommy42069
c8b419fcbb [feat] engine: add bitchute 2025-03-30 12:41:43 +02:00
Markus Heiser
237267ffbe [data] update searx.data - update_engine_descriptions.py 2025-03-30 09:54:03 +02:00
Markus Heiser
50f92779bd [refactor] migrate plugins from "module" to class SXNGPlugin
This patch brings two major changes:

- ``Result.filter_urls(..)`` to pass a filter function for URL fields
- The ``enabled_plugins:`` section in SearXNG's settings do no longer exists.

To understand plugin development compile documentation:

    $ make docs.clean docs.live

and read http://0.0.0.0:8000/dev/plugins/development.html

There is no longer a distinction between built-in and external plugin, all
plugins are registered via the settings in the ``plugins:`` section.

In SearXNG, plugins can be registered via a fully qualified class name.  A
configuration (`PluginCfg`) can be transferred to the plugin, e.g. to activate
it by default / *opt-in* or *opt-out* from user's point of view.

built-in plugins
================

The built-in plugins are all located in the namespace `searx.plugins`.

.. code:: yaml

    plugins:

      searx.plugins.calculator.SXNGPlugin:
        active: true

      searx.plugins.hash_plugin.SXNGPlugin:
        active: true

      searx.plugins.self_info.SXNGPlugin:
        active: true

      searx.plugins.tracker_url_remover.SXNGPlugin:
        active: true

      searx.plugins.unit_converter.SXNGPlugin:
        active: true

      searx.plugins.ahmia_filter.SXNGPlugin:
        active: true

      searx.plugins.hostnames.SXNGPlugin:
        active: true

      searx.plugins.oa_doi_rewrite.SXNGPlugin:
        active: false

      searx.plugins.tor_check.SXNGPlugin:
        active: false

external plugins
================

SearXNG supports *external plugins* / there is no need to install one, SearXNG
runs out of the box.

- Only show green hosted results: https://github.com/return42/tgwf-searx-plugins/

To get a developer installation in a SearXNG developer environment:

.. code:: sh

   $ git clone git@github.com:return42/tgwf-searx-plugins.git
   $ ./manage pyenv.cmd python -m \
         pip install -e tgwf-searx-plugins

To register the plugin in SearXNG add ``only_show_green_results.SXNGPlugin`` to
the ``plugins:``:

.. code:: yaml

    plugins:
      # ...
      only_show_green_results.SXNGPlugin:
        active: false

Result.filter_urls(..)
======================

The ``Result.filter_urls(..)`` can be used to filter and/or modify URL fields.
In the following example, the filter function ``my_url_filter``:

.. code:: python

   def my_url_filter(result, field_name, url_src) -> bool | str:
       if "google" in url_src:
           return False              # remove URL field from result
       if "facebook" in url_src:
           new_url = url_src.replace("facebook", "fb-dummy")
           return new_url            # return modified URL
       return True                   # leave URL in field unchanged

is applied to all URL fields in the :py:obj:`Plugin.on_result` hook:

.. code:: python

   class MyUrlFilter(Plugin):
       ...
       def on_result(self, request, search, result) -> bool:
           result.filter_urls(my_url_filter)
           return True

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-29 10:16:43 +01:00
return42
d36da0a6c3 [data] update searx.data - update_ahmia_blacklist.py 2025-03-29 09:49:27 +01:00
return42
d7ca257fcd [data] update searx.data - update_firefox_version.py 2025-03-29 09:48:39 +01:00
return42
98024d8518 [data] update searx.data - update_wikidata_units.py 2025-03-29 09:48:06 +01:00
return42
96d0854a50 [data] update searx.data - update_currencies.py 2025-03-29 09:47:33 +01:00
Aadniz
ecee73eafd [fix] presearch engine: Unexpected crash if duration not in videos 2025-03-28 16:26:39 +01:00
searxng-bot
1189b1906c [l10n] update translations from Weblate
9a0c9e142 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
8e06fb05a - 2025-03-27 - return42 <return42@noreply.codeberg.org>
8e683ef69 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
3588715a0 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
acf531db2 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
b4b09bdef - 2025-03-27 - return42 <return42@noreply.codeberg.org>
8bef57082 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
239bae388 - 2025-03-27 - return42 <return42@noreply.codeberg.org>
ca6a6fc4f - 2025-03-27 - return42 <return42@noreply.codeberg.org>
2a19a52db - 2025-03-27 - return42 <return42@noreply.codeberg.org>
7b217fad1 - 2025-03-24 - Haraldher <haraldher@noreply.codeberg.org>
649d15f55 - 2025-03-24 - Haraldher <haraldher@noreply.codeberg.org>
2025-03-28 08:51:09 +01:00
dependabot[bot]
4a0ff84a40 [upd] pypi: Bump selenium from 4.29.0 to 4.30.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.29.0 to 4.30.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.29.0...selenium-4.30.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:50:32 +01:00
dependabot[bot]
d02d432862 [upd] pypi: Bump yamllint from 1.36.2 to 1.37.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.36.2 to 1.37.0.
- [Release notes](https://github.com/adrienverge/yamllint/releases)
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.36.2...v1.37.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:50:10 +01:00
dependabot[bot]
3c537f958f [upd] web-client (simple): Bump stylelint in /client/simple
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.16.0 to 16.17.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.16.0...16.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:49:44 +01:00
dependabot[bot]
a2ad1bed00 [upd] web-client (simple): Bump eslint in /client/simple
Bumps [eslint](https://github.com/eslint/eslint) from 9.22.0 to 9.23.0.
- [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/v9.22.0...v9.23.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 08:48:46 +01:00
Markus Heiser
f62f6194e3 [build] /static 2025-03-27 12:27:37 +01:00
Markus Heiser
68d871dea0 [fix] image deatils view: vertical overflow in results.image-detail-open
overflow-y: scroll
  If the information on the image exceeds the visible area in the detail view,
  there must be a way to access this information via scroll.

max-height: -17rem versus 7rem
  There are new fields in the lower area, so the height of the image (top) must
  be reduced

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-27 12:27:37 +01:00
Markus Heiser
150b2e21fd [fix] make docs -> ERROR: Unknown target name: "google: max 50 pages".
Fix the issues reported by sphinx build::

    docstring of searx.engines.google.max_page:1: ERROR: Unknown target name: "google: max 50 pages".
    docstring of searx.engines.google_images.max_page:1: ERROR: Unknown target name: "google: max 50 pages".
    docstring of searx.engines.google_scholar.max_page:1: ERROR: Unknown target name: "google: max 50 pages".

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-27 06:57:28 +01:00
Aadniz
02f5002a5f [fix] baidu engine: properly decoding HTML escape codes 2025-03-27 06:11:39 +01:00
Bnyro
4dfc47584d [refactor] duration strings: move parsing logic to utils.py 2025-03-25 16:48:44 +01:00
Bnyro
c28d35c7fc [fix] duckduckgo news: unescaped html sequences in description 2025-03-25 16:14:36 +01:00
dependabot[bot]
2ad987c711 Bump vite from 6.2.2 to 6.2.3 in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-25 16:04:41 +01:00
Markus Heiser
5986629c6b [fix] make data.traits - partial revert of commit 30a8204
The entries in the catalog of search languages are build up from the "Engine
Traits" [1] and which entries are included in the catalog is controlled qby two
threshold values [2].

If possible, the values should ensure that no languages or regions disappear
from the catalog of search languages [3].

The threshold values should have been adjusted in commit 30a8204:

- ``min_eng_per_region = 18``
- ``min_eng_per_lang = 22``

Because the threshold values were not adjusted, many entries were missing in the
search language catalog.  This bug has been fixed with this patch: the threshold
values have been adjusted and the catalog of search languages has been completed
again.

[1] https://docs.searxng.org/dev/engines/enginelib.html#module-searx.enginelib.traits
[2] 96a6e3dcb2/searxng_extra/update/update_engine_traits.py (L104-L105)
[3] https://github.com/searxng/searxng/blob/master/searx/sxng_locales.py

Closes: https://github.com/searxng/searxng/issues/4519
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-22 07:52:36 +01:00
dependabot[bot]
7e680d8e8e [upd] web-client (simple): Bump stylelint in /client/simple
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.15.0 to 16.16.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.15.0...16.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 11:43:46 +01:00
Ikko Eltociear Ashimine
2482646323 [fix] typo in doc-str: offical -> official 2025-03-21 11:05:54 +01:00
Markus Heiser
96a6e3dcb2 [fix] Results.url: don't normalize www.example.com to example.com
Hostname "www" in URL results can't be normalized to an empty string:

- https://www.tu-darmstadt.de/
- https://tu-darmstadt.de/

Reported-By: @Bnyro <bnyro@tutanota.com>
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-21 10:28:34 +01:00
searxng-bot
ef99cc472d [l10n] update translations from Weblate
efbb54229 - 2025-03-16 - gkkulik <gkkulik@noreply.codeberg.org>
f76dddd02 - 2025-03-15 - cc5efd7b0 <cc5efd7b0@noreply.codeberg.org>
2025-03-21 08:40:14 +01:00
dependabot[bot]
64b52d485b [upd] pypi: Bump yamllint from 1.36.0 to 1.36.2
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.36.0 to 1.36.2.
- [Release notes](https://github.com/adrienverge/yamllint/releases)
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.36.0...v1.36.2)

---
updated-dependencies:
- dependency-name: yamllint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 08:39:32 +01:00
dependabot[bot]
de6b027ec7 [upd] pypi: Bump tomli from 2.0.2 to 2.2.1
Bumps [tomli](https://github.com/hukkin/tomli) from 2.0.2 to 2.2.1.
- [Changelog](https://github.com/hukkin/tomli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hukkin/tomli/compare/2.0.2...2.2.1)

---
updated-dependencies:
- dependency-name: tomli
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 08:38:48 +01:00
dependabot[bot]
f687306a95 [upd] pypi: Bump pylint from 3.3.4 to 3.3.6
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.4 to 3.3.6.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.4...v3.3.6)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-21 08:38:16 +01:00
Bnyro
b75e56afe6 [fix] duckduckgo: answer sometimes contains faulty (duplicated) url 2025-03-21 07:48:30 +01:00
Bnyro
3668c7012e [fix] presearch videos: item description and duration are located in metadata field 2025-03-20 20:55:09 +01:00
Aadniz
556db857aa [fix] presearch engine: News and Videos formatted incorrectly 2025-03-20 20:44:43 +01:00
Tan Yong Sheng
40feede51e [fix] engine: core.ac.uk implement API v3 / v2 is no longer supported 2025-03-19 17:51:00 +01:00
Alexandre Flament
82b9e533b2 [fix] static.build: upgrade min. node version to 18.17
For sharp [1] dependency / this commit was cherry picked from PR #3157

[1] https://www.npmjs.com/package/sharp
2025-03-18 06:19:44 +01:00
Bnyro
babbe9e1ae [fix] duckduckgo: show proper source url of answers 2025-03-18 05:31:28 +01:00
Bnyro
885d02c8c3 [feat] engine: add selfh.st/icons for logos of common self-hosted programs 2025-03-17 20:23:54 +01:00
Bnyro
bbb2894b04 [engine] elasticsearch: add pagination support 2025-03-16 22:10:05 +01:00
Brock Vojkovic
84636ef49a
[feat] add docker healthcheck back (#4504) 2025-03-16 11:34:26 +01:00
Markus Heiser
a1d5add718 fixup! [fix] fix invalid escape error in Baidu Images & default config typo 2025-03-15 17:14:54 +01:00
Zhijie He
38caa49540 [fix] fix invalid escape error in Baidu Images & default config typo 2025-03-15 17:14:54 +01:00
Zhijie He
4ce7f1accc [feat]: engines add images & kaifa from baidu.com 2025-03-15 17:14:54 +01:00
Ivan Gabaldon
11b5ae186b
container: add default support for IPv6 (#4448)
* Initial update

* update docs and test files
2025-03-15 11:20:37 +01:00
Markus Heiser
583007fd04 [build] /static 2025-03-15 10:36:33 +01:00
Markus Heiser
da7b069d6e [fix] plugins: bugfix of tor_check and unit_converter
Closes: https://github.com/searxng/searxng/issues/4461
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-15 10:36:33 +01:00
Markus Heiser
f49b2c94a9 [mod] migrate all key-value.html templates to KeyValue type
The engines now all use KeyValue results and return the results in a
EngineResults object.

The sqlite engine can return MainResult results in addition to KeyValue
results (based on engine's config in settings.yml),

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-15 10:36:33 +01:00
Markus Heiser
af5dbdf768 [mod] typification of SearXNG: add new result type KeyValue
This patch adds a new result type: KeyValue

- Python class:   searx/result_types/keyvalue.py
- Jinja template: searx/templates/simple/result_templates/keyvalue.html
- CSS (less)      client/simple/src/less/result_types/keyvalue.less

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-15 10:36:33 +01:00
Markus Heiser
8769b7c6d6 [refactor] typification of SearXNG (MainResult) / result items (part 2)
The class ReslutContainer has been revised, it can now handle the typed Result
items of classes:

- MainResult
- LegacyResult (a dict wrapper for backward compatibility)

Due to the now complete typing of theses three clases, instead of the *getitem*
accesses, the fields can now be accessed directly via attributes (which is also
supported by the IDE).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-15 10:36:33 +01:00
Markus Heiser
d6ce29f7f0 [build] /static 2025-03-15 09:03:49 +01:00
Markus Heiser
eb1bdea865 [fix] make static.build.commit: add client/simple/package-lock.json
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-15 09:03:49 +01:00
bearz314
85bdff6b0a [web-client] simple theme: dynamic vertical height
On mobile devices with browser chrome (UI) that recedes on scroll,
'vh' includes the height covered by chrome, which 'dvh' does not.
By using 'dvh' the footer is immediately visible on the homepage
without scrollbar on mobile devices.
2025-03-15 09:03:49 +01:00
dependabot[bot]
f7ef4396b1 [upd] pypi: Bump aiounittest from 1.4.3 to 1.5.0
Bumps [aiounittest](https://github.com/kwarunek/aiounittest) from 1.4.3 to 1.5.0.
- [Release notes](https://github.com/kwarunek/aiounittest/releases)
- [Commits](https://github.com/kwarunek/aiounittest/compare/1.4.3...1.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 08:04:23 +01:00
dependabot[bot]
83f6545903 [upd] pypi: Bump yamllint from 1.35.1 to 1.36.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.35.1 to 1.36.0.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.35.1...v1.36.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 07:52:10 +01:00
searxng-bot
6afe0e29a7 [l10n] update translations from Weblate
efa1f5656 - 2025-03-13 - return42 <return42@noreply.codeberg.org>
5e0a76d3c - 2025-03-13 - return42 <return42@noreply.codeberg.org>
2025-03-15 07:50:21 +01:00
dependabot[bot]
523871ae7b [upd] web-client (simple): Bump @eslint/js in /client/simple
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.21.0 to 9.22.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.22.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 07:49:52 +01:00
dependabot[bot]
505f7732d8 [upd] web-client (simple): Bump vite in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 07:49:44 +01:00
dependabot[bot]
896cb3ab46 [upd] web-client (simple): Bump eslint in /client/simple
Bumps [eslint](https://github.com/eslint/eslint) from 9.21.0 to 9.22.0.
- [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/v9.21.0...v9.22.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 07:49:34 +01:00
XLion
3fe602a468 [fix] "[fix] uwsgi: don't set static-expires": Clean comment that forgot to cleen
I noticed this when I tracking the difference between my current `settings.yml` and the `settings.yml`.
2025-03-11 11:04:34 +01:00
Brock Vojkovic
8b1d73c5b9
[feat] add docker into devcontainer (#4475) 2025-03-09 09:40:49 +01:00
Aadniz
a88b4d7036 [fix] presearch engine: domain sometimes included in beginning of titles 2025-03-08 12:39:16 +01:00
Austin-Olacsi
73d50f5748 [feat] add bilibili support to get get_embeded_stream_url 2025-03-08 10:47:30 +01:00
Markus Heiser
523d2a7683 [fix] uwsgi: don't set static-expires
As long we don't have a working solution for cache busting [3][4] we should not
set an expire time in thw uWSGI config.

The default procedure in every web browser is the "304 Not Modified" [2] and
this default procedure should also be sufficient for us as long as we have not
implemented a complete alternative (cache busting) / form [1]

> By default uWSGI will add a Last-Modified [2] header to all static responses,
> and will honor the If-Modified-Since [2] request header.

[1] https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#setting-the-expires-headers
[2] https://developer.mozilla.org/de/docs/Web/HTTP/Status/304
[3] https://github.com/searxng/searxng/pull/4433
[4] https://github.com/searxng/searxng/issues/964

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-08 09:08:03 +01:00
Aadniz
4884747508 [fix] presearch engine: Title showing <em> html code 2025-03-07 21:24:35 +01:00
Markus Heiser
eb3633629a [fix] set language for engines from chinese market (no i18n index nor UI)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-07 19:59:13 +01:00
Loris
02b76c8389 [fix] engine qwant: add tgp and llm arguments to avoid CAPTCHA 2025-03-07 18:58:45 +01:00
Aadniz
67a8b66f75 [README] Updated logo paths
Since the commit a207f5d035, logos has been moved and README.rst needs to point to the new paths.
2025-03-07 13:40:31 +01:00
Markus Heiser
08a90d46d6 [doc] add missing docs for the search.max_page setting
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-07 10:07:41 +01:00
dependabot[bot]
e7cb18c3dd [upd] web-client (simple): Bump vite-plugin-static-copy
Bumps [vite-plugin-static-copy](https://github.com/sapphi-red/vite-plugin-static-copy) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/sapphi-red/vite-plugin-static-copy/releases)
- [Changelog](https://github.com/sapphi-red/vite-plugin-static-copy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sapphi-red/vite-plugin-static-copy/compare/vite-plugin-static-copy@2.2.0...vite-plugin-static-copy@2.3.0)

---
updated-dependencies:
- dependency-name: vite-plugin-static-copy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 09:34:05 +01:00
dependabot[bot]
9a50f6c9a1 [upd] web-client (simple): Bump vite in /client/simple
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.2.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 09:21:34 +01:00
dependabot[bot]
00bae78463 [upd] web-client (simple): Bump stylelint in /client/simple
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.14.1 to 16.15.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.14.1...16.15.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 09:21:16 +01:00
dependabot[bot]
375f0c4a79 [upd] pypi: Bump mock from 5.1.0 to 5.2.0
Bumps [mock](https://github.com/testing-cabal/mock) from 5.1.0 to 5.2.0.
- [Changelog](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/testing-cabal/mock/compare/5.1.0...5.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 08:17:31 +01:00
dependabot[bot]
424cbf7851 [upd] pypi: Bump jinja2 from 3.1.5 to 3.1.6
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 08:17:14 +01:00
searxng-bot
860f0a35ac [l10n] update translations from Weblate
a516df5a2 - 2025-03-06 - DanielBoone <danielboone@noreply.codeberg.org>
2763a5d77 - 2025-03-06 - return42 <return42@noreply.codeberg.org>
4a3a81c9b - 2025-03-06 - marc-lopez <marc-lopez@noreply.codeberg.org>
d2bd5b048 - 2025-03-05 - MonsoonFire <monsoonfire@noreply.codeberg.org>
752b558d6 - 2025-03-05 - buiducnhat <buiducnhat@noreply.codeberg.org>
0ff2ccf43 - 2025-03-04 - marc-lopez <marc-lopez@noreply.codeberg.org>
462a0625d - 2025-03-03 - Juno Takano <jutty@noreply.codeberg.org>
5cb41045c - 2025-03-02 - gkkulik <gkkulik@noreply.codeberg.org>
e599c3942 - 2025-03-02 - gkkulik <gkkulik@noreply.codeberg.org>
d44128eda - 2025-03-02 - gkkulik <gkkulik@noreply.codeberg.org>
2025-03-07 08:16:45 +01:00
Bubu
b8671c7a4a [feat] engines: add baidu (general) 2025-03-07 06:59:28 +01:00
Zhijie He
066aabc112 [feat] engines: add www.acfun.cn 2025-03-06 17:52:16 +01:00
Zhijie He
8fe4904619 [feat] engines: add www.iqiyi.com
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-06 17:28:14 +01:00
Zhijie He
08d08475fc [feat] engines: add www.chinaso.com
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-06 17:23:11 +01:00
Markus Heiser
194f222203 [fix] engines: Google-Web & Google-Video (random arc_id)
Both enghines have been reported ``TooManyRequests``, additionaly Google-Videos
thumbnails needed a review.

Based on the research from @unixfox [1] this patch generates every hour a new random
``arc_id``.

[1] https://github.com/searxng/searxng/issues/4435#issuecomment-2703279522

Closes:

- https://github.com/searxng/searxng/issues/4435
- https://github.com/searxng/searxng/issues/4431

Related:

- https://github.com/searxng/searxng/discussions/4434
- https://github.com/searxng/searxng/discussions/4429

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-06 15:43:53 +01:00
Markus Heiser
8984d7ae02 [fix] brave engine: add sec-fetch headers and source=web argument
The intention is to reduce the "TooManyRequestsException".

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-02 18:19:55 +01:00
Zhijie He
b0beb307ca [chore] add timediff field for sogou_videos
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-02 13:31:31 +01:00
Zhijie He
76f52b5b45 [feat] add Sogou WeChat article search support 2025-03-02 13:31:31 +01:00
Zhijie He
97aa5a779b [feat] add Sogou engine for searxng
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-02 13:31:31 +01:00
Zhijie He
71d1504e57 [feat] add 360search engine for searxng
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-02 13:25:35 +01:00
Markus Heiser
80f5fad16e [fix] add backward compatibility for the "enabled_plugins:"
Before #4183 a builtin plugin was *defautlt_on* when it is listed in the
"enabled_plugins" settings, this patch restores the previous behavior.

Not part of this patch but just to mentioning in context of #4263:

  In the long term, we will abolish the "enabled_plugins:" setting and combine
  all options for the plugins in the "plugins:" setting, as is already planned
  in the PR #4282

Closes: https://github.com/searxng/searxng/issues/4263
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-01 18:02:31 +01:00
Markus Heiser
0c2076ca5b [doc] minor improvements to the favicon docs (cache.db_url)
Related:

- https://github.com/searxng/searxng/issues/4405

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-01 18:02:05 +01:00
Bnyro
a51416c7c3 [feat] engines: add openclipart.org 2025-03-01 18:01:51 +01:00
Markus Heiser
d0022d86d2 [refactor] soundcloud engine
Closes: https://github.com/searxng/searxng/issues/4226
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-01 17:51:14 +01:00
Markus Heiser
1d16b94279 [fix] wikidata: increase wikidata queries timeout
The big queries for initializing and updating the currencies take longer than
the default of the wikidata engine, which is only 3sec.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-01 12:21:29 +01:00
return42
30a820437d [data] update searx.data - update_engine_traits.py 2025-03-01 09:43:06 +01:00
Markus Heiser
03419078ef [fix] bing fetch engine traits - adjusted XPath selectors
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-01 09:43:06 +01:00
return42
01e2b3e325 [data] update searx.data - update_firefox_version.py 2025-03-01 07:47:48 +01:00
return42
ccf485c519 [data] update searx.data - update_wikidata_units.py 2025-03-01 07:47:24 +01:00
return42
64810ee911 [data] update searx.data - update_ahmia_blacklist.py 2025-03-01 07:44:28 +01:00
return42
a4b120c33d [data] update searx.data - update_engine_descriptions.py 2025-03-01 07:43:29 +01:00
return42
73e4128970 [data] update searx.data - update_external_bangs.py 2025-03-01 07:43:00 +01:00
dependabot[bot]
355883f366 [upd] pypi: Bump typer-slim from 0.15.1 to 0.15.2
Bumps [typer-slim](https://github.com/fastapi/typer) from 0.15.1 to 0.15.2.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.15.1...0.15.2)

---
updated-dependencies:
- dependency-name: typer-slim
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-28 12:58:29 +01:00
dependabot[bot]
b4b1a61562 [upd] pypi: Bump setproctitle from 1.3.4 to 1.3.5
Bumps [setproctitle](https://github.com/dvarrazzo/py-setproctitle) from 1.3.4 to 1.3.5.
- [Changelog](https://github.com/dvarrazzo/py-setproctitle/blob/master/HISTORY.rst)
- [Commits](https://github.com/dvarrazzo/py-setproctitle/compare/version-1.3.4...version-1.3.5)

---
updated-dependencies:
- dependency-name: setproctitle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-28 12:57:45 +01:00
searxng-bot
28b5cbf276 [l10n] update translations from Weblate
0e9536840 - 2025-02-24 - dauiau <dauiau@users.noreply.translate.codeberg.org>
047501d2d - 2025-02-25 - return42 <return42@users.noreply.translate.codeberg.org>
647b20923 - 2025-02-21 - kratos <kratos@users.noreply.translate.codeberg.org>
288d0d4c8 - 2025-02-21 - guenael <guenael@users.noreply.translate.codeberg.org>
2025-02-28 12:57:15 +01:00
dependabot[bot]
d9d5e9140e [upd] web-client (simple): Bump globals in /client/simple
Bumps [globals](https://github.com/sindresorhus/globals) from 15.15.0 to 16.0.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v15.15.0...v16.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-28 12:56:27 +01:00
Markus Heiser
cd1b88e916 [mod] bump copy-webpack-plugin 13.0.2, eslint 9.21 & vite 6.2.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:41:06 +01:00
Markus Heiser
4e195e1000 [mod] bump copy-webpack-plugin 13.0.2, eslint 9.21 & vite 6.2.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:38:59 +01:00
Markus Heiser
d5ba3bf150 [build] /static 2025-02-28 12:27:41 +01:00
Markus Heiser
485f1f8eff [upd] npm: Bump eslint from 9.19.0 to 9.20.1 in /client/simple
Related:

- https://github.com/searxng/searxng/pull/4322

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
8b864ed111 [fix] simple template - video.html fix button icon to icon_small
BTW: Rename the manufacturer-specific name ``ion-icon`` of the icon set in
SerXNG to ``sxng-icon-set`` --> The icon set can be assembled together as
desired in the FE and should therefore not have a manufacturer-specific name in
the style and template definitions.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
6500d73714 [web-client] integrate the migrated theme in the github CI
- upgrade to ubuntu-24.04 to get NodeJS v20
- remove DEBUG (V=1) environment / in a ViteJS env the DEBUG environment is
  reserved for interactive debugging tasks (not for verbose build messages).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
2bf77f5d2d [web-client] integrate the migrated theme in the development workflows
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
1a3543d4b2 [web-client] simple theme: final build by vite & clean up grunt leftovers
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
872e09d103 [web-client] simple theme: move SVGs to client/simple/src and deploy to static by plg_svg2svg
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
189dd0155d [web-client] simple theme: refactor jinja_svg_catalog and cleanup icon names
This patch implements the template generation of the template:

  searx/templates/simple/icons.html

by the way the icon set (the icon names) has been normalized:

  film-outline   --> film
  magnet-outline --> magnet
  ..
  warning        --> alert

Some missing (categorie) icons had been added.

Some of the ionicons are not suitable for a dark theme, we fixed the svg
manually in src/svg/ionicons:

- https://github.com/searxng/searxng/pull/4284#issuecomment-2680550342

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
30ee34d3ea [web-client] simple theme: vite plugins plg_svg2png & plg_svg2svg
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
a207f5d035 [web-client] simple theme: move src/brand to client/simple/src
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
d29ca7d593 [web-client] simple theme: stylelint-prettier LESS source files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
a8ed79b730 [web-client] simple theme: stylelint LESS source files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
b74496b192 [web-client] simple theme: eslint JS source files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
7a6ea56565 [web-client] simple theme: vite build -- CSS sourcemaps still missing!!!
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
a1132deaa4 [web-client] simple theme: move sources to client/simple/src
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
b6487b70aa [web-client] simple theme: build & development env based on vite.
Vite is a build tool, it consists of two major parts [1]:

- A dev server that provides rich feature enhancements over native ES modules,
  for example extremely fast Hot Module Replacement (HMR).

- A build command that bundles your code with Rollup, pre-configured to output
  highly optimized static assets for production.

[1] https://vite.dev/guide/

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28 12:27:41 +01:00
Markus Heiser
e86bfa163b Revert "[feat] add HEALTHCHECK in Dockerfile"
This reverts commit dabe425499.
2025-02-26 11:55:43 +01:00
Markus Heiser
333d536937 Revert "Updated health check in Dockerfile"
This reverts commit 1fd4dab3b4.
2025-02-26 11:55:43 +01:00
Salvatore Gabriele La Greca
1fd4dab3b4 Updated health check in Dockerfile 2025-02-26 10:20:51 +01:00
Markus Heiser
887594f634 [fix] Internet links disappeared from wikidata side box (second try)
Related:

- https://github.com/searxng/searxng/pull/4286#issuecomment-2639960013

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-26 08:45:56 +01:00
fatwang2
bc5c8e5748 [fix] engine unsplash: image links by preserving URL parameters
Only remove ixid parameter while keeping other essential URL parameters
to ensure images are properly displayed in search results.
2025-02-26 08:44:39 +01:00
dependabot[bot]
cb0a75bad9 [upd] pypi: Bump selenium from 4.28.1 to 4.29.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.28.1 to 4.29.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits/selenium-4.29.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-26 07:18:24 +01:00
Brock Vojkovic
dabe425499 [feat] add HEALTHCHECK in Dockerfile 2025-02-26 07:17:49 +01:00
searxng-bot
f325f8a886 [l10n] update translations from Weblate
fecbeb1d5 - 2025-02-20 - return42 <return42@users.noreply.translate.codeberg.org>
8891568c6 - 2025-02-17 - AlanBacker <alanbacker@users.noreply.translate.codeberg.org>
727ae2508 - 2025-02-15 - return42 <return42@users.noreply.translate.codeberg.org>
11f215e90 - 2025-02-15 - return42 <return42@users.noreply.translate.codeberg.org>
9eb07083e - 2025-02-15 - thenack0 <thenack0@users.noreply.translate.codeberg.org>
2025-02-26 07:16:01 +01:00
Markus Heiser
2e0abc9310 [fix] various issues in the documentation
Closes: https://github.com/searxng/searxng/issues/4370
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-26 07:15:39 +01:00
Markus Heiser
28d1240fce [fix] remove dead invidious instances from the settings
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-20 17:16:15 +01:00
Markus Heiser
4994fbb5af [fix] engines bing.images & brave.videos - fix parse data string
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-20 17:03:25 +01:00
Markus Heiser
caf0dd5372 [fix] piped engine - update backend_url list
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-20 14:43:01 +01:00
Markus Heiser
c0a21789a3 [mod] activate startpage by default and use default timeout (3sec)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-20 14:23:03 +01:00
Bnyro
0f2fc5879d [feat] startpage: support for news and images 2025-02-20 13:44:28 +01:00
Markus Heiser
feb15e3878 [fix] brave.news engine: response is HTML and no longer JSON
The response from brave.com for news is no longer a JSON string.

Closes: https://github.com/searxng/searxng/issues/4352
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-20 10:08:03 +01:00
bearz314
c2804c51e2 [doc] Add myself for trying to improve searxng 2025-02-20 07:55:45 +01:00
bearz314
0a3eb24a0b [fix] limiter: prevent loading cached index html when redirected
The redirection to index lets client requests CSS token, if somehow they haven't been.
We need to ensure the html isn't cached so the latest token can be retrieved.
2025-02-20 07:55:45 +01:00
bearz314
16fafed6a2 [fix] limiter: prevent caching of token link
Depending on server and client setup, this CSS link with empty content may be cached.
For example, in my setup CloudFlare automatically adds 14400s (4hours) in my test.
This prevents caching by browser and proxies so the CSS can be reliably requested.
2025-02-20 07:55:45 +01:00
Markus Heiser
44d941c93c [fix] mojeek web engine: don't add empty fmt argument for web searches
Empty ``&fmt=`` argument triggers an automated tools detection from mojeek.

Suggested-by: @shinodark in https://github.com/searxng/searxng/issues/4307#issuecomment-2669355322
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-20 07:45:57 +01:00
Markus Heiser
cc9dbde2e5 [fix] autocomplete: remove broken startpage backend
as long we don't have a solution for #4334 we can't offer startpage as
autocomplete backend.

Related:

- https://github.com/searxng/searxng/issues/4334

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-17 11:00:18 +01:00
Duckxz
1ae37728e4 [fix] Fix improper import of corrections.html 2025-02-17 06:41:04 +01:00
searxng-bot
d37dc30783 [l10n] update translations from Weblate
2b26704c4 - 2025-02-12 - return42 <return42@users.noreply.translate.codeberg.org>
647377905 - 2025-02-12 - return42 <return42@users.noreply.translate.codeberg.org>
afd50738d - 2025-02-12 - alexgabi <alexgabi@users.noreply.translate.codeberg.org>
665fafbe2 - 2025-02-11 - naktinis <naktinis@users.noreply.translate.codeberg.org>
583834fec - 2025-02-10 - alexgabi <alexgabi@users.noreply.translate.codeberg.org>
0f4f34434 - 2025-02-10 - MonsoonFire <monsoonfire@users.noreply.translate.codeberg.org>
fbd59c560 - 2025-02-08 - akinu <akinu@users.noreply.translate.codeberg.org>
c3f7f27f6 - 2025-02-07 - SecularSteve <secularsteve@users.noreply.translate.codeberg.org>
cba4bc53f - 2025-02-07 - SecularSteve <secularsteve@users.noreply.translate.codeberg.org>
2025-02-15 07:16:17 +01:00
dependabot[bot]
f92bfebe21 [upd] pypi: Bump lxml from 5.3.0 to 5.3.1
Bumps [lxml](https://github.com/lxml/lxml) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.3.0...lxml-5.3.1)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-15 07:16:00 +01:00
dependabot[bot]
0eb23c490d [upd] pypi: Bump aiounittest from 1.4.2 to 1.4.3
Bumps [aiounittest](https://github.com/kwarunek/aiounittest) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/kwarunek/aiounittest/releases)
- [Commits](https://github.com/kwarunek/aiounittest/compare/1.4.2...1.4.3)

---
updated-dependencies:
- dependency-name: aiounittest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-15 07:15:35 +01:00
bonswouar
d456f3dd9f [fix] engine adobe stock videos datetime parsing
re #4310
2025-02-12 07:05:58 +01:00
Markus Heiser
a1e2b25467 [mod] improve description of the prefernces URL in the "COOKIES" tab
Closes: https://github.com/searxng/searxng/issues/4272
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-09 13:32:33 +01:00
Bnyro
3a59aea742 [fix] results.py: crashes when 'parsed_url' is None 2025-02-08 17:18:43 +01:00
Bnyro
28ead13eb9 [chore] engines: replace datetime.utcfromtimestamp with datetime.fromtimestamp 2025-02-07 17:19:00 +01:00
searxng-bot
9b1f8681a1 [l10n] update translations from Weblate
d030e5252 - 2025-02-06 - curtwheeler <curtwheeler@users.noreply.translate.codeberg.org>
d3c6b503b - 2025-02-06 - curtwheeler <curtwheeler@users.noreply.translate.codeberg.org>
ed13a35ed - 2025-02-06 - curtwheeler <curtwheeler@users.noreply.translate.codeberg.org>
1126eef12 - 2025-02-06 - curtwheeler <curtwheeler@users.noreply.translate.codeberg.org>
ee8fd4d82 - 2025-02-06 - curtwheeler <curtwheeler@users.noreply.translate.codeberg.org>
b9507095f - 2025-02-06 - curtwheeler <curtwheeler@users.noreply.translate.codeberg.org>
5766ca07e - 2025-02-06 - curtwheeler <curtwheeler@users.noreply.translate.codeberg.org>
cadb0be4f - 2025-02-06 - ivantodorov <ivantodorov@users.noreply.translate.codeberg.org>
9e1d733b7 - 2025-02-06 - ivantodorov <ivantodorov@users.noreply.translate.codeberg.org>
bbb8c9646 - 2025-02-06 - AndersNordh <andersnordh@users.noreply.translate.codeberg.org>
463ea44dc - 2025-02-05 - artens <artens@users.noreply.translate.codeberg.org>
3549e01c0 - 2025-02-05 - return42 <return42@users.noreply.translate.codeberg.org>
58277713c - 2025-02-05 - Ricky-Tigg <ricky-tigg@users.noreply.translate.codeberg.org>
511926257 - 2025-02-03 - artens <artens@users.noreply.translate.codeberg.org>
6d49bafee - 2025-02-03 - artens <artens@users.noreply.translate.codeberg.org>
5d1dcf0b0 - 2025-02-03 - return42 <return42@users.noreply.translate.codeberg.org>
bb40eae80 - 2025-02-03 - artens <artens@users.noreply.translate.codeberg.org>
3e34b5486 - 2025-02-03 - davquar <davquar@users.noreply.translate.codeberg.org>
e67e0eaaf - 2025-02-03 - return42 <return42@users.noreply.translate.codeberg.org>
664e90b17 - 2025-02-03 - kny5 <kny5@users.noreply.translate.codeberg.org>
34ebe95c7 - 2025-02-03 - AndersNordh <andersnordh@users.noreply.translate.codeberg.org>
74e21c47a - 2025-02-03 - rodgui <rodgui@users.noreply.translate.codeberg.org>
ac770eae1 - 2025-02-03 - kny5 <kny5@users.noreply.translate.codeberg.org>
e9509ed4b - 2025-02-02 - davquar <davquar@users.noreply.translate.codeberg.org>
79824e94e - 2025-02-01 - matsob0123 <matsob0123@users.noreply.translate.codeberg.org>
4153606b0 - 2025-02-01 - Fjuro <fjuro@users.noreply.translate.codeberg.org>
9c6763231 - 2025-01-31 - Shihfu Juan <xlion@xlion.tw>
791869503 - 2025-01-31 - Shihfu Juan <xlion@xlion.tw>
00e05f5aa - 2025-01-31 - Shihfu Juan <xlion@xlion.tw>
2025-02-07 17:06:27 +01:00
dependabot[bot]
739822f705 [upd] pypi: Bump babel from 2.16.0 to 2.17.0
Bumps [babel](https://github.com/python-babel/babel) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.16.0...v2.17.0)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-07 17:06:09 +01:00
Markus Heiser
d45dea56c5 [fix] selenium: binary is not a Firefox executable
Since Ubuntu installs firefox frrom snap, we can't use any longer
``Browser('firefox')``.

[1] https://github.com/searxng/searxng/pull/3663#issuecomment-2255963036
[2] https://splinter.readthedocs.io/en/latest/drivers/firefox.html#custom-binary-path

Suggested-by: @allendema
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-07 17:05:06 +01:00
Markus Heiser
8c610404bd [upd] upgrade: github actions / to ubuntu: 24.04 / to nvm: node 20.15
- ubuntu-20.04 --> ubuntu-24.04

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-07 17:05:06 +01:00
Markus Heiser
147bda894e [fix] Internet links disappeared from wikidata side box
Closes: https://github.com/searxng/searxng/issues/4285

Reported and tested by: Popolon
Suggested-by: @dalf
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-06 14:50:30 +01:00
allixx
4ab7984edd [fix] public domain image archive: change name to lowercase
Otherwise logs are flooded with warnings:
WARNING:searx.engines: Engine name is not lowercase: "Public Domain Image Archive", converting to lowercase
2025-02-03 18:38:56 +01:00
XLion
ab1e895cc0
[fix] openverse: update API and website URL (#4275) 2025-02-02 22:12:24 +01:00
dependabot[bot]
6324a9752a [upd] pypi: Bump certifi from 2024.12.14 to 2025.1.31
Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.12.14 to 2025.1.31.
- [Commits](https://github.com/certifi/python-certifi/compare/2024.12.14...2025.01.31)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-31 08:58:22 +01:00
dependabot[bot]
d7602aa4f1 [upd] pypi: Bump sphinx-notfound-page from 1.0.4 to 1.1.0
Bumps [sphinx-notfound-page](https://github.com/readthedocs/sphinx-notfound-page) from 1.0.4 to 1.1.0.
- [Changelog](https://github.com/readthedocs/sphinx-notfound-page/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/readthedocs/sphinx-notfound-page/compare/1.0.4...1.1.0)

---
updated-dependencies:
- dependency-name: sphinx-notfound-page
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-31 08:57:55 +01:00
dependabot[bot]
157c9267ec [upd] pypi: Bump pylint from 3.3.3 to 3.3.4
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.3 to 3.3.4.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.3.3...v3.3.4)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-31 08:57:18 +01:00
searxng-bot
eea4d4fd1d [l10n] update translations from Weblate
86a55bb1f - 2025-01-30 - Shihfu Juan <xlion@xlion.tw>
553225b31 - 2025-01-30 - kratos <kratos@users.noreply.translate.codeberg.org>
f6ad2986e - 2025-01-30 - return42 <return42@users.noreply.translate.codeberg.org>
b550ed406 - 2025-01-30 - nebras <nebras@users.noreply.translate.codeberg.org>
2852d3ada - 2025-01-29 - Outbreak2096 <outbreak2096@users.noreply.translate.codeberg.org>
98d2ed269 - 2025-01-30 - Linerly <linerly@users.noreply.translate.codeberg.org>
8b13e0d11 - 2025-01-29 - RoyBarina <roybarina@users.noreply.translate.codeberg.org>
75bcc2aaf - 2025-01-29 - ghose <ghose@users.noreply.translate.codeberg.org>
6b21bccc2 - 2025-01-29 - Priit Jõerüüt <jrtcdbrg@users.noreply.translate.codeberg.org>
5dc3d664d - 2025-01-29 - return42 <return42@users.noreply.translate.codeberg.org>
2025-01-31 08:54:00 +01:00
return42
738906358b [data] update searx.data - update_currencies.py 2025-01-29 06:23:04 +01:00
return42
fc8938c968 [data] update searx.data - update_ahmia_blacklist.py 2025-01-29 06:07:28 +01:00
return42
3b9e06fbd2 [data] update searx.data - update_wikidata_units.py 2025-01-29 06:06:50 +01:00
return42
4934922156 [data] update searx.data - update_engine_traits.py 2025-01-29 06:05:58 +01:00
return42
bee39e4ec0 [data] update searx.data - update_engine_descriptions.py 2025-01-29 06:04:54 +01:00
Markus Heiser
3f4e0b0859 [fix] gettext can't work with f-strings (i10n)
``str.format`` is the pythonic way of handling strings returned by
gettext.gettext that retain interpolation tokens.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-29 06:04:09 +01:00
Markus Heiser
a235c54f8c [mod] rudimentary implementation of a MainResult type
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-29 05:04:41 +01:00
Markus Heiser
df3344e5d5 [fix] JSON & CSV format return error 500
For CSV and JSON output, the LegacyResult and the Result objects needs to be
converted to a python dictionary.

Closes: https://github.com/searxng/searxng/issues/4244
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-29 05:04:41 +01:00
Markus Heiser
906b9e7d4c [fix] hostnames plugin: AttributeError: 'NoneType' object has no attribute 'netloc'
Closes: https://github.com/searxng/searxng/issues/4245
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-28 16:28:12 +01:00
Markus Heiser
36a1ef1239 [refactor] typification of SearXNG / EngineResults
In [1] and [2] we discussed the need of a Result.results property and how we can
avoid unclear code.  This patch implements a class for the reslut-lists of
engines::

    searx.result_types.EngineResults

A simple example for the usage in engine development::

    from searx.result_types import EngineResults
    ...
    def response(resp) -> EngineResults:
        res = EngineResults()
        ...
        res.add( res.types.Answer(answer="lorem ipsum ..", url="https://example.org") )
        ...
        return res

[1] https://github.com/searxng/searxng/pull/4183#pullrequestreview-257400034
[2] https://github.com/searxng/searxng/pull/4183#issuecomment-2614301580
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-28 07:07:08 +01:00
Markus Heiser
edfbf1e118 [refactor] typification of SearXNG (initial) / result items (part 1)
Typification of SearXNG
=======================

This patch introduces the typing of the results.  The why and how is described
in the documentation, please generate the documentation ..

    $ make docs.clean docs.live

and read the following articles in the "Developer documentation":

- result types --> http://0.0.0.0:8000/dev/result_types/index.html

The result types are available from the `searx.result_types` module.  The
following have been implemented so far:

- base result type: `searx.result_type.Result`
  --> http://0.0.0.0:8000/dev/result_types/base_result.html

- answer results
  --> http://0.0.0.0:8000/dev/result_types/answer.html

including the type for translations (inspired by #3925).  For all other
types (which still need to be set up in subsequent PRs), template documentation
has been created for the transition period.

Doc of the fields used in Templates
===================================

The template documentation is the basis for the typing and is the first complete
documentation of the results (needed for engine development).  It is the
"working paper" (the plan) with which further typifications can be implemented
in subsequent PRs.

- https://github.com/searxng/searxng/issues/357

Answer Templates
================

With the new (sub) types for `Answer`, the templates for the answers have also
been revised, `Translation` are now displayed with collapsible entries (inspired
by #3925).

    !en-de dog

Plugins & Answerer
==================

The implementation for `Plugin` and `Answer` has been revised, see
documentation:

- Plugin: http://0.0.0.0:8000/dev/plugins/index.html
- Answerer: http://0.0.0.0:8000/dev/answerers/index.html

With `AnswerStorage` and `AnswerStorage` to manage those items (in follow up
PRs, `ArticleStorage`, `InfoStorage` and .. will be implemented)

Autocomplete
============

The autocompletion had a bug where the results from `Answer` had not been shown
in the past.  To test activate autocompletion and try search terms for which we
have answerers

- statistics: type `min 1 2 3` .. in the completion list you should find an
  entry like `[de] min(1, 2, 3) = 1`

- random: type `random uuid` .. in the completion list, the first item is a
  random UUID

Extended Types
==============

SearXNG extends e.g. the request and response types of flask and httpx, a module
has been set up for type extensions:

- Extended Types
  --> http://0.0.0.0:8000/dev/extended_types.html

Unit-Tests
==========

The unit tests have been completely revised.  In the previous implementation,
the runtime (the global variables such as `searx.settings`) was not initialized
before each test, so the runtime environment with which a test ran was always
determined by the tests that ran before it.  This was also the reason why we
sometimes had to observe non-deterministic errors in the tests in the past:

- https://github.com/searxng/searxng/issues/2988 is one example for the Runtime
  issues, with non-deterministic behavior ..

- https://github.com/searxng/searxng/pull/3650
- https://github.com/searxng/searxng/pull/3654
- https://github.com/searxng/searxng/pull/3642#issuecomment-2226884469
- https://github.com/searxng/searxng/pull/3746#issuecomment-2300965005

Why msgspec.Struct
==================

We have already discussed typing based on e.g. `TypeDict` or `dataclass` in the past:

- https://github.com/searxng/searxng/pull/1562/files
- https://gist.github.com/dalf/972eb05e7a9bee161487132a7de244d2
- https://github.com/searxng/searxng/pull/1412/files
- https://github.com/searxng/searxng/pull/1356

In my opinion, TypeDict is unsuitable because the objects are still dictionaries
and not instances of classes / the `dataclass` are classes but ...

The `msgspec.Struct` combine the advantages of typing, runtime behaviour and
also offer the option of (fast) serializing (incl. type check) the objects.

Currently not possible but conceivable with `msgspec`: Outsourcing the engines
into separate processes, what possibilities this opens up in the future is left
to the imagination!

Internally, we have already defined that it is desirable to decouple the
development of the engines from the development of the SearXNG core / The
serialization of the `Result` objects is a prerequisite for this.

HINT: The threads listed above were the template for this PR, even though the
implementation here is based on msgspec.  They should also be an inspiration for
the following PRs of typification, as the models and implementations can provide
a good direction.

Why just one commit?
====================

I tried to create several (thematically separated) commits, but gave up at some
point ... there are too many things to tackle at once / The comprehensibility of
the commits would not be improved by a thematic separation. On the contrary, we
would have to make multiple changes at the same places and the goal of a change
would be vaguely recognizable in the fog of the commits.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-28 07:07:08 +01:00
Bnyro
9079d0cac0 [refactor] translation engines: common interface 2025-01-28 07:07:08 +01:00
Denperidge
70f1b65008 [feat] engines: add NixOS Wiki
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-01-26 20:12:19 +01:00
Markus Heiser
06f6ee4e36 [build] /static 2025-01-26 13:34:52 +01:00
Markus Heiser
9beff8212b [refactor] results.js: wait one second before loading full high-res image
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-26 13:34:52 +01:00
Bnyro
cf4e183790 [refactor] results.js: cancel image loading after next one selected 2025-01-26 13:34:52 +01:00
Bnyro
c1fcee9d9f [docs] settings_search.rst: add missing autocompletion providers 2025-01-26 08:38:29 +01:00
Bnyro
176079977d [chore] autocomplete.py: order autocompletion engines alphabetically 2025-01-25 12:12:46 +01:00
Zhijie He
f3f13519ff
[feat] autocompletion: add baidu search autocompleter (#4227) 2025-01-25 11:59:10 +01:00
dependabot[bot]
04a6ab12fb [upd] npm: Bump less from 4.2.1 to 4.2.2 in /searx/static/themes/simple
Bumps [less](https://github.com/less/less.js) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/commits)

---
updated-dependencies:
- dependency-name: less
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 20:24:52 +01:00
searxng-bot
edf6d96625 [l10n] update translations from Weblate
8a0e2e2d6 - 2025-01-21 - return42 <return42@users.noreply.translate.codeberg.org>
b70a88fec - 2025-01-19 - rajeeban <rajeeban@users.noreply.translate.codeberg.org>
2025-01-24 09:52:04 +01:00
dependabot[bot]
fa50324dae [upd] pypi: Bump selenium from 4.27.1 to 4.28.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.27.1 to 4.28.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-24 09:48:34 +01:00
Markus Heiser
bee2677929 [build] /static 2025-01-21 22:55:45 +01:00
Markus Heiser
e7081bb2c1 [update] make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-21 16:12:27 +01:00
dependabot[bot]
1fde000499 [upd] pypi: Bump pygments from 2.18.0 to 2.19.1
Bumps [pygments](https://github.com/pygments/pygments) from 2.18.0 to 2.19.1.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.18.0...2.19.1)

---
updated-dependencies:
- dependency-name: pygments
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 16:12:27 +01:00
Bnyro
8731e37796 [build] /static 2025-01-20 18:46:31 +01:00
Bnyro
e92d1bc6af [fix] results.js: back button not working after closing image result manually 2025-01-20 18:46:31 +01:00
Bnyro
f766faca3f [feat] engines: add ipernity (images) 2025-01-20 17:22:32 +01:00
dependabot[bot]
c020a964e4 [upd] npm: Bump eslint in /searx/static/themes/simple
Bumps [eslint](https://github.com/eslint/eslint) from 9.17.0 to 9.18.0.
- [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/v9.17.0...v9.18.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 16:53:12 +01:00
dependabot[bot]
46b16e6ff1 [upd] npm: Bump stylelint-config-standard in /searx/static/themes/simple
Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 36.0.1 to 37.0.0.
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.1...37.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 16:52:21 +01:00
Markus Heiser
98c66c0ae6 [build] /static 2025-01-20 16:41:00 +01:00
Markus Heiser
c06ec65b2a [fix] LESS sourcemaps broken in less-plugin-clean-css v1.6.0
The ``less-plugin-clean-css`` lacks some maintenance: the sourcemaps are broken
since v1.6.0 (08/2024) [1]

- [1] https://github.com/less/less-plugin-clean-css/issues/42

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-20 16:41:00 +01:00
Markus Heiser
e581921c92 [fix] engine brave: remove date from the content string
Related: https://github.com/searxng/searxng/issues/4211#issuecomment-2601941440
Closes: https://github.com/searxng/searxng/issues/4006

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-20 16:40:36 +01:00
Markus Heiser
073d9549a0 [build] /static 2025-01-20 13:52:43 +01:00
Markus Heiser
601ffcb8a3 [mod] add swipe events to the image gallery (gesture control)
Adds [1] to the searxng.min.js and horizontal swipe events to the image gallery.

[1] https://www.npmjs.com/package/swiped-events

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-20 13:52:43 +01:00
Markus Heiser
d9115b8d48 [build] /static 2025-01-20 13:29:26 +01:00
Bnyro
c760ad0808 [feat] image results: dismiss image viewer on back button press on mobile devices 2025-01-20 13:29:26 +01:00
Bnyro
2f087a3a22 [feat] public domain image archive: automatically obtain algolia api key 2025-01-20 12:56:15 +01:00
Denperidge
3333d9f385 [feat] engines: public domain image archive 2025-01-20 12:56:15 +01:00
Popolon
1a885b70ce
[feat] wikidata: add mastodon, peertube and Lemmy accounts to infobox
Co-authored-by: Popolon <popolon@popolon.org>
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-01-20 11:19:56 +01:00
searxng-bot
a576f69c12 [l10n] update translations from Weblate
09c56a561 - 2025-01-16 - tentsbet <tentsbet@users.noreply.translate.codeberg.org>
219fff972 - 2025-01-14 - hirushaadi <hirushaadi@users.noreply.translate.codeberg.org>
2b4b64e60 - 2025-01-14 - return42 <return42@users.noreply.translate.codeberg.org>
6a359da17 - 2025-01-14 - return42 <return42@users.noreply.translate.codeberg.org>
2025-01-17 08:13:57 +01:00
DanielMowitz
272e39893d [feat]: engines: add astrophysical data system 2025-01-16 20:27:55 +01:00
Markus Heiser
41159fed32 [build] /static 2025-01-16 10:51:33 +01:00
Markus Heiser
b1507f188e [fix] gallery view overlaps category bar
Closes: https://github.com/searxng/searxng/issues/4190

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
1668ff5e64 [fix] theme simple: image viewer hides autocomplete suggestions
Closes: https://github.com/searxng/searxng/issues/3509
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
f03ab00155 [fix] broken mobile view (from #4154)
Related:
- https://github.com/searxng/searxng/pull/4154#issuecomment-2591881963

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
15d0e274b3 [fix] build workflows of the themes
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-16 10:51:33 +01:00
Markus Heiser
e4f8f0483f [mod] slightly improve make node.clean themes.all
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Bnyro
5a1a43ef74 [build] /static 2025-01-14 15:22:23 +01:00
Bnyro
94b6adf03d [chore] stylelint: fix reported errors 2025-01-14 15:22:23 +01:00
Bnyro
337a6db064 [upd] stylelint: use less-compatible configuration and update rules 2025-01-14 15:22:23 +01:00
Markus Heiser
9d834c0722 [fix] issues reported by sytlelint
"Unexpected vendor-prefixed":
   -webkit-transform & -ms-transform [3]
   -webkit-animation [2]
   @-webkit-keyframes [1]

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/animation
[3] https://developer.mozilla.org/en-US/docs/Web/CSS/transform

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Markus Heiser
0abad23daa [upd] migrate .eslintrc.json to eslint.config.mjs
The migration was done by the following steps, firts prepare the node enviroment
an open a bash in this environment::

    $ make clean nvm.nodejs
    ...
    $ ./manage nvm.bash
    $ which npx
    searxng/.nvm/versions/node/v23.5.0/bin/npx

In this environment the migration command from [1] is started::

    $ npx @eslint/migrate-config .eslintrc.json
    Need to install the following packages:
    @eslint/migrate-config@1.3.5
    Migrating .eslintrc.json

    Wrote new config to ./eslint.config.mjs

    You will need to install the following packages to use the new config:
    - globals
    - @eslint/js
    - @eslint/eslintrc

    You can install them using the following command:

    npm install globals @eslint/js @eslint/eslintrc -D

    The following messages were generated during migration:
    - The 'node' environment is used, so switching sourceType to 'commonjs'.

[1] https://eslint.org/docs/latest/use/configure/migration-guide#migrate-your-config-file

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Markus Heiser
943c8fb85b [upd] update npm dependencies (package.json) and .tool-versions
To avoid issue like [1], versions from now on are pinned in::

    searx/static/themes/simple/package-lock.json

To test nodejs v23 or newer is needed (will be installed by nvm).  To drop a
possibly existing installation::

    $ make clean

Install nodejs in nvm::

    $ make nvm.nodejs
    INFO:  install (update) NVM at searxng/.nvm
    ...
    Now using node v23.5.0 (npm v10.9.2)
    Creating default alias: default -> v23.5 (-> v23.5.0)
    INFO:  Node.js is installed at searxng/.nvm/versions/node/v23.5.0/bin/node
    INFO:  Node.js is version v23.5.0
    INFO:  npm is installed at searxng/.nvm/versions/node/v23.5.0/bin/npm
    INFO:  npm is version 10.9.2
    INFO:  NVM is installed at searxng/.nvm

To test npm checks and builds:

    $ make static.build.commit

Related:

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-14 15:22:23 +01:00
Lucki
35c80268bf [json_engine] Fix R0912 (too-many-branches) 2025-01-14 14:07:35 +01:00
Lucki
3942b311ac [json_engine] Add unit test 2025-01-14 14:07:35 +01:00
Lucki
64d954b350 [json_engine] mirror xpath functionality 2025-01-14 14:07:35 +01:00
Lucki
591d9c2505 [json_engine] document existing options 2025-01-14 14:07:35 +01:00
Markus Heiser
09cce18518 [data] update searx.data - make data.all
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-13 08:02:01 +01:00
searxng-bot
94a0b415ef [l10n] update translations from Weblate
8f8f92dc0 - 2025-01-10 - hirushaadi <hirushaadi@users.noreply.translate.codeberg.org>
d4ae2e4ba - 2025-01-08 - Harshith-10 <harshith-10@users.noreply.translate.codeberg.org>
05848d0bb - 2025-01-08 - return42 <return42@users.noreply.translate.codeberg.org>
151cde7fc - 2025-01-08 - return42 <return42@users.noreply.translate.codeberg.org>
43ba79c99 - 2025-01-06 - return42 <return42@users.noreply.translate.codeberg.org>
2025-01-10 08:13:22 +01:00
Markus Heiser
6dab7fe78b Revert "[l10n ga] trigger weblate.push.translations (another try)"
This reverts commit e352926187.
2025-01-06 17:12:16 +01:00
Markus Heiser
e352926187 [l10n ga] trigger weblate.push.translations (another try)
Related:

- https://github.com/searxng/searxng/issues/4117

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 16:59:20 +01:00
Markus Heiser
b0391fe718 reomve DUMMY from searxng.msg catalog
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 16:24:44 +01:00
Markus Heiser
91d3d38690 [l10n ga] trigger weblate.push.translations
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 16:16:04 +01:00
Markus Heiser
c5991865c8 [fix] l10n ga (Irish) messages.po is marked as fuzzy
$ ./manage pyenv.cmd pybabel compile --statistics -d searx/translations/

reports:

    catalog searx/translations/ga/LC_MESSAGES/messages.po is marked as fuzzy, skipping

This commit removes the ``fuzzy`` tag and BTW reverts commit 655e41f27

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 15:49:21 +01:00
Markus Heiser
655e41f274 [l10n ga] trigger weblate.push.translations
Related:

- https://github.com/searxng/searxng/issues/4117

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 14:54:41 +01:00
Aindriú Mac Giolla Eoin
d9343b6388 [l10n] adding new language Irish (ga) 2025-01-06 14:54:41 +01:00
Bnyro
0642c5434a [fix] dockerhub: switch to new api path
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-06 13:46:13 +01:00
Lucki
18c3e08837 Fix usage of api_key engine setting
The value of `params['api_key']` isn't read anywhere.
Writing directly into the header object solves this quite easily though.

> [Users can authenticate by including their API key either in a request URL by appending `?apikey=<API KEY>`, or by including the `X-API-Key: <API KEY>` header with the request.](https://wallhaven.cc/help/api)
2025-01-06 12:25:33 +01:00
Alexandre Flament
96c32549be [fix] requirements-dev.txt: remove autodoc_pydantic
Related to #3727
2025-01-05 09:31:03 +01:00
searxng-bot
a060c09854 [l10n] update translations from Weblate
3db237112 - 2024-12-31 - kratos <kratos@users.noreply.translate.codeberg.org>
2025-01-03 08:49:25 +01:00
Markus Heiser
c1bb0bebd4 [data] update searx.data - update_engine_traits.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-29 10:12:45 +01:00
Markus Heiser
af3f272b0b [fix] update_engine_traits.py: annas archive, bing-* and zlibrary engines
Github action Update data - update_engine_traits [1] had issues in annas
archive, bing-* and zlibrary engines:

    ./manage pyenv.cmd python ./searxng_extra/update/update_engine_traits.py

[1] https://github.com/searxng/searxng/actions/runs/12530827768/job/34953392587

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-29 10:12:45 +01:00
return42
05c82d3201 [data] update searx.data - update_engine_descriptions.py 2024-12-29 10:12:24 +01:00
return42
f0e9c3be8c [data] update searx.data - update_currencies.py 2024-12-29 10:11:38 +01:00
return42
428eaea2b7 [data] update searx.data - update_wikidata_units.py 2024-12-29 10:11:09 +01:00
return42
3d55008f23 [data] update searx.data - update_ahmia_blacklist.py 2024-12-29 10:10:38 +01:00
569 changed files with 63379 additions and 24427 deletions

View file

@ -3,7 +3,8 @@
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/github-cli": {}
"ghcr.io/devcontainers/features/github-cli": {},
"ghcr.io/devcontainers/features/docker-in-docker": {}
},
"customizations": {
"vscode": {

View file

@ -16,11 +16,17 @@ max_line_length = 119
[*.html]
indent_size = 4
[*.css]
indent_size = 2
[*.less]
indent_size = 2
[*.js]
indent_size = 2
[*.json]
indent_size = 4
indent_size = 2
insert_final_newline = ignore
# Minified JavaScript files shouldn't be changed

View file

@ -10,13 +10,43 @@ updates:
target-branch: "master"
commit-message:
prefix: "[upd] pypi:"
groups:
minor:
applies-to: version-updates
update-types:
- "minor"
- "patch"
- package-ecosystem: "npm"
directory: "/searx/static/themes/simple"
directory: "/client/simple"
schedule:
interval: "weekly"
day: "friday"
open-pull-requests-limit: 5
target-branch: "master"
commit-message:
prefix: "[upd] npm:"
prefix: "[upd] web-client (simple):"
groups:
minor:
applies-to: version-updates
update-types:
- "minor"
- "patch"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
target-branch: "master"
commit-message:
prefix: "[upd] docker:"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
target-branch: "master"
commit-message:
prefix: "[upd] github-actions:"

View file

@ -1,31 +1,46 @@
name: "Checker"
on: # yamllint disable-line rule:truthy
---
name: Checker
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * 5"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
env:
PYTHON_VERSION: "3.13"
jobs:
checker:
name: Checker
runs-on: ubuntu-22.04
search:
name: Search
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: |
sudo ./utils/searxng.sh install packages
- name: Set up Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
architecture: 'x64'
python-version: "${{ env.PYTHON_VERSION }}"
- name: Install Python dependencies
run: |
make V=1 install
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- name: Checker
run: |
make search.checker
- name: Setup cache Python
uses: actions/cache@v4
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local"
- name: Setup venv
run: make V=1 install
- name: Search checker
run: make search.checker

36
.github/workflows/cleanup.yml vendored Normal file
View file

@ -0,0 +1,36 @@
---
name: Cleanup
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "4 4 * * *"
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
jobs:
container-cache:
# FIXME: On forks it fails with "Failed to fetch packages: missing field `id` at line 1 column 141"
if: github.repository_owner == 'searxng' || github.event_name == 'workflow_dispatch'
name: Container cache
runs-on: ubuntu-24.04
permissions:
# Organization GHCR
packages: write
steps:
- name: Prune
uses: snok/container-retention-policy@v3.0.0
with:
account: "${{ github.repository_owner }}"
token: "${{ secrets.GITHUB_TOKEN }}"
image-names: "cache base"
image-tags: "!searxng*"
cut-off: "1d"
keep-n-most-recent: "100"

252
.github/workflows/container.yml vendored Normal file
View file

@ -0,0 +1,252 @@
---
name: Container
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
workflow_run:
workflows:
- Integration
types:
- completed
branches:
- master
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
# Organization GHCR
packages: read
env:
PYTHON_VERSION: "3.13"
jobs:
build-base:
if: |
(github.repository_owner == 'searxng' && github.event.workflow_run.conclusion == 'success')
|| github.event_name == 'workflow_dispatch'
name: Build base
runs-on: ubuntu-24.04
permissions:
# Organization GHCR
packages: write
steps:
- if: github.repository_owner == 'searxng'
name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- if: github.repository_owner == 'searxng'
name: Get date
id: date
run: echo "date=$(date +'%Y%m%d')" >>$GITHUB_OUTPUT
- if: github.repository_owner == 'searxng'
name: Check cache apko
id: cache-apko
uses: actions/cache/restore@v4
with:
# yamllint disable-line rule:line-length
key: "apko-${{ steps.date.outputs.date }}-${{ hashFiles('./container/base.yml', './container/base-builder.yml') }}"
path: "/tmp/.apko/"
lookup-only: true
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Setup cache apko
uses: actions/cache@v4
with:
# yamllint disable-line rule:line-length
key: "apko-${{ steps.date.outputs.date }}-${{ hashFiles('./container/base.yml', './container/base-builder.yml') }}"
restore-keys: "apko-${{ steps.date.outputs.date }}-"
path: "/tmp/.apko/"
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Setup apko
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install apko
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Login to GHCR
uses: docker/login-action@v3
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Build
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
apko publish ./container/base.yml ghcr.io/${{ github.repository_owner }}/base:searxng \
--cache-dir=/tmp/.apko/ \
--sbom=false \
--vcs=false \
--log-level=debug
apko publish ./container/base-builder.yml ghcr.io/${{ github.repository_owner }}/base:searxng-builder \
--cache-dir=/tmp/.apko/ \
--sbom=false \
--vcs=false \
--log-level=debug
build:
if: github.repository_owner == 'searxng' || github.event_name == 'workflow_dispatch'
name: Build (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
needs: build-base
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
os: ubuntu-24.04
emulation: false
- arch: arm64
os: ubuntu-24.04-arm
emulation: false
- arch: armv7
os: ubuntu-24.04-arm
emulation: true
permissions:
# Organization GHCR
packages: write
outputs:
version_string: ${{ steps.build.outputs.version_string }}
version_tag: ${{ steps.build.outputs.version_tag }}
docker_tag: ${{ steps.build.outputs.docker_tag }}
git_url: ${{ steps.build.outputs.git_url }}
git_branch: ${{ steps.build.outputs.git_branch }}
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- name: Setup cache Python
uses: actions/cache@v4
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup cache container mounts
uses: actions/cache@v4
with:
# yamllint disable-line rule:line-length
key: "container-mounts-${{ matrix.arch }}-${{ hashFiles('./container/Dockerfile', './container/legacy/Dockerfile') }}"
restore-keys: "container-mounts-${{ matrix.arch }}-"
path: |
/var/tmp/buildah-cache/
/var/tmp/buildah-cache-*/
- if: ${{ matrix.emulation }}
name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Build
id: build
env:
OVERRIDE_ARCH: "${{ matrix.arch }}"
run: make podman.build
test:
name: Test (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
needs: build
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
os: ubuntu-24.04
emulation: false
- arch: arm64
os: ubuntu-24.04-arm
emulation: false
- arch: armv7
os: ubuntu-24.04-arm
emulation: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- if: ${{ matrix.emulation }}
name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Test
env:
OVERRIDE_ARCH: "${{ matrix.arch }}"
GIT_URL: "${{ needs.build.outputs.git_url }}"
run: make container.test
release:
if: github.repository_owner == 'searxng' && github.ref_name == 'master'
name: Release
runs-on: ubuntu-24.04-arm
needs:
- build
- test
permissions:
# Organization GHCR
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: "ghcr.io"
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: "docker.io"
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_TOKEN }}"
- name: Release
env:
GIT_URL: "${{ needs.build.outputs.git_url }}"
DOCKER_TAG: "${{ needs.build.outputs.docker_tag }}"
run: make container.push

View file

@ -1,14 +1,27 @@
name: "Update searx.data"
on: # yamllint disable-line rule:truthy
---
name: Update searx.data
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "59 23 28 * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
env:
PYTHON_VERSION: "3.13"
jobs:
updateData:
name: Update data - ${{ matrix.fetch }}
runs-on: ubuntu-24.04
if: ${{ github.repository_owner == 'searxng'}}
data:
if: github.repository_owner == 'searxng'
name: ${{ matrix.fetch }}
runs-on: ubuntu-24.04-arm
strategy:
fail-fast: false
matrix:
@ -20,48 +33,53 @@ jobs:
- update_engine_traits.py
- update_wikidata_units.py
- update_engine_descriptions.py
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: |
sudo ./utils/searxng.sh install packages
- name: Set up Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
python-version: "${{ env.PYTHON_VERSION }}"
- name: Install Python dependencies
run: |
make V=1 install
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- name: Setup cache Python
uses: actions/cache@v4
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup venv
run: make V=1 install
- name: Fetch data
env:
FETCH_SCRIPT: ./searxng_extra/update/${{ matrix.fetch }}
run: |
V=1 ./manage pyenv.cmd python "$FETCH_SCRIPT"
run: V=1 ./manage pyenv.cmd python "./searxng_extra/update/${{ matrix.fetch }}"
- name: Create Pull Request
- name: Create PR
id: cpr
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: '[data] update searx.data - ${{ matrix.fetch }}'
committer: searxng-bot <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update_data_${{ matrix.fetch }}
delete-branch: true
draft: false
title: '[data] update searx.data - ${{ matrix.fetch }}'
author: "searxng-bot <searxng-bot@users.noreply.github.com>"
committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
title: "[data] update searx.data - ${{ matrix.fetch }}"
commit-message: "[data] update searx.data - ${{ matrix.fetch }}"
branch: "update_data_${{ matrix.fetch }}"
delete-branch: "true"
draft: "false"
signoff: "false"
body: |
update searx.data - ${{ matrix.fetch }}
[data] update searx.data - ${{ matrix.fetch }}
labels: |
data
- name: Check outputs
- name: Display information
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

66
.github/workflows/documentation.yml vendored Normal file
View file

@ -0,0 +1,66 @@
---
name: Documentation
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
env:
PYTHON_VERSION: "3.13"
jobs:
release:
name: Release
runs-on: ubuntu-24.04-arm
permissions:
# for JamesIves/github-pages-deploy-action to push
contents: write
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
fetch-depth: "0"
- name: Setup cache Python
uses: actions/cache@v4
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup venv
run: make V=1 install
- name: Build documentation
run: make V=1 docs.clean docs.html
- if: github.ref_name == 'master'
name: Release
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: "dist/docs"
branch: "gh-pages"
commit-message: "[doc] build from commit ${{ github.sha }}"
# Automatically remove deleted files from the deploy branch
clean: "true"
single-commit: "true"

View file

@ -1,205 +1,96 @@
---
name: Integration
on: # yamllint disable-line rule:truthy
# yamllint disable-line rule:truthy
on:
push:
branches: ["master"]
branches:
- master
pull_request:
branches: ["master"]
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: false
permissions:
contents: read
env:
PYTHON_VERSION: "3.13"
jobs:
python:
test:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: |
sudo ./utils/searxng.sh install packages
sudo apt install firefox
- name: Set up Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
python-version: "${{ matrix.python-version }}"
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- name: Setup cache Python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements*.txt', 'setup.py') }}
- name: Install Python dependencies
if: steps.cache-python.outputs.cache-hit != 'true'
run: |
make V=1 install
make V=1 gecko.driver
key: "python-${{ matrix.python-version }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ matrix.python-version }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup venv
run: make V=1 install
- name: Run tests
run: make V=1 ci.test
themes:
name: Themes
runs-on: ubuntu-20.04
theme:
name: Theme
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Install node dependencies
run: make V=1 node.env
- name: Build themes
run: make V=1 themes.all
python-version: "${{ env.PYTHON_VERSION }}"
documentation:
name: Documentation
runs-on: ubuntu-20.04
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
persist-credentials: false
- name: Install Ubuntu packages
run: sudo ./utils/searxng.sh install buildhost
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Build documentation
run: |
make V=1 docs.clean docs.html
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ github.token }}
BRANCH: gh-pages
FOLDER: dist/docs
CLEAN: true # Automatically remove deleted files from the deploy branch
SINGLE_COMMIT: true
COMMIT_MESSAGE: '[doc] build from commit ${{ github.sha }}'
persist-credentials: "false"
babel:
name: Update translations branch
runs-on: ubuntu-20.04
if: ${{ github.repository_owner == 'searxng' && github.ref == 'refs/heads/master' }}
needs:
- python
- themes
- documentation
permissions:
contents: write # for make V=1 weblate.push.translations
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: weblate & git setup
env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
run: |
mkdir -p ~/.config
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Update transations
id: update
run: |
make V=1 weblate.push.translations
node-version-file: "./.nvmrc"
dockers:
name: Docker
if: github.ref == 'refs/heads/master'
needs:
- python
- themes
- documentation
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
if: env.DOCKERHUB_USERNAME != null
uses: actions/checkout@v4
with:
# make sure "make docker.push" can get the git history
fetch-depth: '0'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
- name: Setup cache Node.js
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: Set up QEMU
if: env.DOCKERHUB_USERNAME != null
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
if: env.DOCKERHUB_USERNAME != null
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: env.DOCKERHUB_USERNAME != null
uses: docker/login-action@v1
key: "nodejs-${{ runner.arch }}-${{ hashFiles('./.nvmrc', './package.json') }}"
path: "./client/simple/node_modules/"
- name: Setup cache Python
uses: actions/cache@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: env.DOCKERHUB_USERNAME != null
run: make -e GIT_URL=$(git remote get-url origin) docker.buildx
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup venv
run: make V=1 install
- name: Build
run: make themes.all

138
.github/workflows/l10n.yml vendored Normal file
View file

@ -0,0 +1,138 @@
---
name: Translation
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
workflow_run:
workflows:
- Integration
types:
- completed
branches:
- master
schedule:
- cron: "05 07 * * 5"
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
env:
PYTHON_VERSION: "3.13"
jobs:
update:
if: github.repository_owner == 'searxng' && github.event.workflow_run.conclusion == 'success'
name: Update
runs-on: ubuntu-24.04-arm
permissions:
# For "make V=1 weblate.push.translations"
contents: write
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Checkout
uses: actions/checkout@v4
with:
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
fetch-depth: "0"
- name: Setup cache Python
uses: actions/cache@v4
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup venv
run: make V=1 install
- name: Setup Weblate
run: |
mkdir -p ~/.config
echo "${{ secrets.WEBLATE_CONFIG }}" > ~/.config/weblate
- name: Setup Git
run: |
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Update translations
run: make V=1 weblate.push.translations
pr:
if: |
github.repository_owner == 'searxng'
&& (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
name: Pull Request
runs-on: ubuntu-24.04-arm
permissions:
# For "make V=1 weblate.translations.commit"
contents: write
# For action "peter-evans/create-pull-request"
pull-requests: write
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Checkout
uses: actions/checkout@v4
with:
token: "${{ secrets.WEBLATE_GITHUB_TOKEN }}"
fetch-depth: "0"
- name: Setup cache Python
uses: actions/cache@v4
with:
key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
path: "./local/"
- name: Setup venv
run: make V=1 install
- name: Setup Weblate
run: |
mkdir -p ~/.config
echo "${{ secrets.WEBLATE_CONFIG }}" > ~/.config/weblate
- name: Setup Git
run: |
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Merge and push translation updates
run: make V=1 weblate.translations.commit
- name: Create PR
id: cpr
uses: peter-evans/create-pull-request@v7
with:
author: "searxng-bot <searxng-bot@users.noreply.github.com>"
committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
title: "[l10n] update translations from Weblate"
commit-message: "[l10n] update translations from Weblate"
branch: "translations_update"
delete-branch: "true"
draft: "false"
signoff: "false"
body: |
[l10n] update translations from Weblate
labels: |
translation
- name: Display information
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

View file

@ -1,28 +1,44 @@
name: "Security checks"
on: # yamllint disable-line rule:truthy
---
name: Security
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "42 05 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: read
jobs:
dockers:
name: Trivy ${{ matrix.image }}
runs-on: ubuntu-20.04
container:
if: github.repository_owner == 'searxng'
name: Container
runs-on: ubuntu-24.04-arm
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'searxng/searxng:latest'
ignore-unfixed: false
vuln-type: 'os,library'
severity: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL'
format: 'sarif'
output: 'trivy-results.sarif'
persist-credentials: "false"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@0.30.0
with:
sarif_file: 'trivy-results.sarif'
image-ref: "ghcr.io/searxng/searxng:latest"
vuln-type: "os,library"
severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
ignore-unfixed: "false"
format: "sarif"
output: "./trivy-results.sarif"
- name: Upload SARIFs
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "./trivy-results.sarif"

View file

@ -1,59 +0,0 @@
name: "Update translations"
on: # yamllint disable-line rule:truthy
schedule:
- cron: "05 07 * * 5"
workflow_dispatch:
jobs:
babel:
name: "create PR for additions from weblate"
runs-on: ubuntu-20.04
if: ${{ github.repository_owner == 'searxng' && github.ref == 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Cache Python dependencies
id: cache-python
uses: actions/cache@v4
with:
path: |
./local
./.nvm
./node_modules
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
- name: weblate & git setup
env:
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
run: |
mkdir -p ~/.config
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
git config --global user.email "searxng-bot@users.noreply.github.com"
git config --global user.name "searxng-bot"
- name: Merge and push transation updates
run: |
make V=1 weblate.translations.commit
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
commit-message: '[l10n] update translations from Weblate'
committer: searxng-bot <searxng-bot@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: translations_update
delete-branch: true
draft: false
title: '[l10n] update translations from Weblate'
body: |
update translations from Weblate
labels: |
translation

2
.nvmrc
View file

@ -1 +1 @@
v20.10
v23.5

View file

@ -1,2 +1,4 @@
python 3.12.0
shellcheck 0.9.0
nodejs 23.5.0
python 3.13.1
shellcheck 0.10.0
sqlite 3.47.2

View file

@ -173,4 +173,7 @@ features or generally made searx better:
- Austin Olacsi `<https://github.com/Austin-Olacsi>`
- @micsthepick
- Daniel Kukula `<https://github.com/dkuku>`
- Patrick Evans `https://github.com/holysoles`
- Patrick Evans `https://github.com/holysoles`
- Daniel Mowitz `<https://daniel.mowitz.rocks>`
- `Bearz314 <https://github.com/bearz314>`_
- Tommaso Colella `<https://github.com/gioleppe>`

View file

@ -1,89 +0,0 @@
FROM alpine:3.20
ENTRYPOINT ["/sbin/tini","--","/usr/local/searxng/dockerfiles/docker-entrypoint.sh"]
EXPOSE 8080
VOLUME /etc/searxng
ARG SEARXNG_GID=977
ARG SEARXNG_UID=977
RUN addgroup -g ${SEARXNG_GID} searxng && \
adduser -u ${SEARXNG_UID} -D -h /usr/local/searxng -s /bin/sh -G searxng searxng
ENV INSTANCE_NAME=searxng \
AUTOCOMPLETE= \
BASE_URL= \
MORTY_KEY= \
MORTY_URL= \
SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml \
UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini \
UWSGI_WORKERS=%k \
UWSGI_THREADS=4
WORKDIR /usr/local/searxng
COPY requirements.txt ./requirements.txt
RUN apk add --no-cache -t build-dependencies \
build-base \
py3-setuptools \
python3-dev \
libffi-dev \
libxslt-dev \
libxml2-dev \
openssl-dev \
tar \
git \
&& apk add --no-cache \
ca-certificates \
python3 \
py3-pip \
libxml2 \
libxslt \
openssl \
tini \
uwsgi \
uwsgi-python3 \
brotli \
&& pip3 install --break-system-packages --no-cache -r requirements.txt \
&& apk del build-dependencies \
&& rm -rf /root/.cache
COPY --chown=searxng:searxng dockerfiles ./dockerfiles
COPY --chown=searxng:searxng searx ./searx
ARG TIMESTAMP_SETTINGS=0
ARG TIMESTAMP_UWSGI=0
ARG VERSION_GITCOMMIT=unknown
RUN su searxng -c "/usr/bin/python3 -m compileall -q searx" \
&& touch -c --date=@${TIMESTAMP_SETTINGS} searx/settings.yml \
&& touch -c --date=@${TIMESTAMP_UWSGI} dockerfiles/uwsgi.ini \
&& find /usr/local/searxng/searx/static -a \( -name '*.html' -o -name '*.css' -o -name '*.js' \
-o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
-type f -exec gzip -9 -k {} \+ -exec brotli --best {} \+
# Keep these arguments at the end to prevent redundant layer rebuilds
ARG LABEL_DATE=
ARG GIT_URL=unknown
ARG SEARXNG_GIT_VERSION=unknown
ARG SEARXNG_DOCKER_TAG=unknown
ARG LABEL_VCS_REF=
ARG LABEL_VCS_URL=
LABEL maintainer="searxng <${GIT_URL}>" \
description="A privacy-respecting, hackable metasearch engine." \
version="${SEARXNG_GIT_VERSION}" \
org.label-schema.schema-version="1.0" \
org.label-schema.name="searxng" \
org.label-schema.version="${SEARXNG_GIT_VERSION}" \
org.label-schema.url="${LABEL_VCS_URL}" \
org.label-schema.vcs-ref=${LABEL_VCS_REF} \
org.label-schema.vcs-url=${LABEL_VCS_URL} \
org.label-schema.build-date="${LABEL_DATE}" \
org.label-schema.usage="https://github.com/searxng/searxng-docker" \
org.opencontainers.image.title="searxng" \
org.opencontainers.image.version="${SEARXNG_DOCKER_TAG}" \
org.opencontainers.image.url="${LABEL_VCS_URL}" \
org.opencontainers.image.revision=${LABEL_VCS_REF} \
org.opencontainers.image.source=${LABEL_VCS_URL} \
org.opencontainers.image.created="${LABEL_DATE}" \
org.opencontainers.image.documentation="https://github.com/searxng/searxng-docker"

View file

@ -50,11 +50,11 @@ search.checker.%: install
$(Q)./manage pyenv.cmd searxng-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
PHONY += test ci.test test.shell
ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.pybabel
test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.shell
ci.test: test.yamllint test.black test.types.ci test.pylint test.unit test.robot test.rst test.shell test.pybabel
test: test.yamllint test.black test.types.dev test.pylint test.unit test.robot test.rst test.shell
test.shell:
$(Q)shellcheck -x -s dash \
dockerfiles/docker-entrypoint.sh
container/entrypoint.sh
$(Q)shellcheck -x -s bash \
utils/brand.sh \
$(MTOOLS) \
@ -65,26 +65,25 @@ test.shell:
utils/lib_redis.sh \
utils/searxng.sh \
utils/lxc.sh \
utils/lxc-searxng.env \
utils/searx.sh \
utils/filtron.sh \
utils/morty.sh
utils/lxc-searxng.env
$(Q)$(MTOOLS) build_msg TEST "$@ OK"
# wrap ./manage script
MANAGE += weblate.translations.commit weblate.push.translations
MANAGE += data.all data.traits data.useragents data.locales
MANAGE += data.all data.traits data.useragents data.locales data.currencies
MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
MANAGE += docker.build docker.push docker.buildx
MANAGE += podman.build
MANAGE += docker.build docker.buildx
MANAGE += container.build container.test container.push
MANAGE += gecko.driver
MANAGE += node.env node.env.dev node.clean
MANAGE += py.build py.clean
MANAGE += pyenv pyenv.install pyenv.uninstall
MANAGE += format.python
MANAGE += test.yamllint test.pylint test.pyright test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean
MANAGE += themes.all themes.simple themes.simple.test pygments.less
MANAGE += test.yamllint test.pylint test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean test.themes test.types.dev test.types.ci
MANAGE += themes.all themes.fix themes.test
MANAGE += static.build.commit static.build.drop static.build.restore
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs
@ -95,8 +94,8 @@ $(MANAGE):
# short hands of selected targets
PHONY += docs docker themes
PHONY += docs container themes
docs: docs.html
docker: docker.build
container: container.build
themes: themes.all

View file

@ -2,7 +2,7 @@
----
.. figure:: https://raw.githubusercontent.com/searxng/searxng/master/src/brand/searxng.svg
.. figure:: https://raw.githubusercontent.com/searxng/searxng/master/client/simple/src/brand/searxng.svg
:target: https://docs.searxng.org/
:alt: SearXNG
:width: 100%
@ -10,6 +10,8 @@
----
Fork of SearXNG. The globe icon for empty_favicon.svg in searx/static/themes/simple/img/ belongs to the Noto Emojis font by Google
Privacy-respecting, hackable `metasearch engine`_
Searx.space_ lists ready-to-use running instances.
@ -34,7 +36,7 @@ A user_, admin_ and developer_ handbook is available on the homepage_.
.. _homepage: https://docs.searxng.org/
.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
.. |SearXNG logo| image:: https://raw.githubusercontent.com/searxng/searxng/master/src/brand/searxng-wordmark.svg
.. |SearXNG logo| image:: https://raw.githubusercontent.com/searxng/searxng/master/client/simple/src/brand/searxng-wordmark.svg
:target: https://docs.searxng.org/
:width: 5%

3
client/simple/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
dist
node_modules
.stylelintcache

View file

@ -0,0 +1,17 @@
{
"formatter": "unix",
"plugins": [ "stylelint-prettier" ],
"extends": [ "stylelint-config-standard-less" ],
"rules": {
"prettier/prettier": true,
"declaration-empty-line-before": null,
"no-invalid-position-at-import-rule": null,
"property-no-vendor-prefix": null,
"selector-no-vendor-prefix": null,
"selector-attribute-quotes": null,
"shorthand-property-no-redundant-values": null,
"at-rule-no-vendor-prefix": null,
"selector-id-pattern": null,
"selector-class-pattern": null
}
}

24
client/simple/README.rst Normal file
View file

@ -0,0 +1,24 @@
=====================
MEMO vite development
=====================
Local install::
# in folder ./client/simple/
$ npm install
Start development server::
$ ./manage vite.simple.dev
# in folder ./client/simple/
$ npm exec -- vite
Fix source code::
# in folder ./client/simple/
$ npm run fix
Fix & Build::
$ ./manage vite.simple.build

View file

@ -0,0 +1,34 @@
import globals from "globals";
import pluginJs from "@eslint/js";
/** @type {import('eslint').Linter.Config[]} */
export default [
pluginJs.configs.recommended,
// global "ignores"
// https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
{
ignores: ["node_modules/", "dist/"]
},
{
files: [
"**/*.js",
],
linterOptions: {
reportUnusedDisableDirectives: "error",
// noInlineConfig: true
},
languageOptions: {
sourceType: "module",
globals: {
...globals.browser,
}
},
rules: {
indent: ["error", 2],
},
},
];

View file

@ -1,6 +1,6 @@
/*
this file is generated automatically by searxng_extra/update/update_pygments.py
using pygments version 2.18.0
using pygments version 2.19.1
*/
@ -13,9 +13,9 @@
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.hll { background-color: #ffffcc }
.c { color: #3D7B7B; font-style: italic } /* Comment */
.err { border: 1px solid #FF0000 } /* Error */
.err { border: 1px solid #F00 } /* Error */
.k { color: #008000; font-weight: bold } /* Keyword */
.o { color: #666666 } /* Operator */
.o { color: #666 } /* Operator */
.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.cp { color: #9C6500 } /* Comment.Preproc */
@ -32,34 +32,34 @@
.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.gt { color: #0044DD } /* Generic.Traceback */
.gt { color: #04D } /* Generic.Traceback */
.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.kp { color: #008000 } /* Keyword.Pseudo */
.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.kt { color: #B00040 } /* Keyword.Type */
.m { color: #666666 } /* Literal.Number */
.m { color: #666 } /* Literal.Number */
.s { color: #BA2121 } /* Literal.String */
.na { color: #687822 } /* Name.Attribute */
.nb { color: #008000 } /* Name.Builtin */
.nc { color: #0000FF; font-weight: bold } /* Name.Class */
.no { color: #880000 } /* Name.Constant */
.nd { color: #AA22FF } /* Name.Decorator */
.nc { color: #00F; font-weight: bold } /* Name.Class */
.no { color: #800 } /* Name.Constant */
.nd { color: #A2F } /* Name.Decorator */
.ni { color: #717171; font-weight: bold } /* Name.Entity */
.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.nf { color: #0000FF } /* Name.Function */
.nf { color: #00F } /* Name.Function */
.nl { color: #767600 } /* Name.Label */
.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.nn { color: #00F; font-weight: bold } /* Name.Namespace */
.nt { color: #008000; font-weight: bold } /* Name.Tag */
.nv { color: #19177C } /* Name.Variable */
.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mb { color: #666666 } /* Literal.Number.Bin */
.mf { color: #666666 } /* Literal.Number.Float */
.mh { color: #666666 } /* Literal.Number.Hex */
.mi { color: #666666 } /* Literal.Number.Integer */
.mo { color: #666666 } /* Literal.Number.Oct */
.ow { color: #A2F; font-weight: bold } /* Operator.Word */
.w { color: #BBB } /* Text.Whitespace */
.mb { color: #666 } /* Literal.Number.Bin */
.mf { color: #666 } /* Literal.Number.Float */
.mh { color: #666 } /* Literal.Number.Hex */
.mi { color: #666 } /* Literal.Number.Integer */
.mo { color: #666 } /* Literal.Number.Oct */
.sa { color: #BA2121 } /* Literal.String.Affix */
.sb { color: #BA2121 } /* Literal.String.Backtick */
.sc { color: #BA2121 } /* Literal.String.Char */
@ -74,12 +74,12 @@
.s1 { color: #BA2121 } /* Literal.String.Single */
.ss { color: #19177C } /* Literal.String.Symbol */
.bp { color: #008000 } /* Name.Builtin.Pseudo */
.fm { color: #0000FF } /* Name.Function.Magic */
.fm { color: #00F } /* Name.Function.Magic */
.vc { color: #19177C } /* Name.Variable.Class */
.vg { color: #19177C } /* Name.Variable.Global */
.vi { color: #19177C } /* Name.Variable.Instance */
.vm { color: #19177C } /* Name.Variable.Magic */
.il { color: #666666 } /* Literal.Number.Integer.Long */
.il { color: #666 } /* Literal.Number.Integer.Long */
}
.code-highlight-dark(){
@ -91,33 +91,33 @@
td.linenos .special { color: #3c4354; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #3c4354; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.hll { background-color: #6e7681 }
.c { color: #7e8aa1 } /* Comment */
.err { color: #f88f7f } /* Error */
.esc { color: #d4d2c8 } /* Escape */
.g { color: #d4d2c8 } /* Generic */
.c { color: #7E8AA1 } /* Comment */
.err { color: #F88F7F } /* Error */
.esc { color: #D4D2C8 } /* Escape */
.g { color: #D4D2C8 } /* Generic */
.k { color: #FFAD66 } /* Keyword */
.l { color: #D5FF80 } /* Literal */
.n { color: #d4d2c8 } /* Name */
.n { color: #D4D2C8 } /* Name */
.o { color: #FFAD66 } /* Operator */
.x { color: #d4d2c8 } /* Other */
.p { color: #d4d2c8 } /* Punctuation */
.ch { color: #f88f7f; font-style: italic } /* Comment.Hashbang */
.cm { color: #7e8aa1 } /* Comment.Multiline */
.x { color: #D4D2C8 } /* Other */
.p { color: #D4D2C8 } /* Punctuation */
.ch { color: #F88F7F; font-style: italic } /* Comment.Hashbang */
.cm { color: #7E8AA1 } /* Comment.Multiline */
.cp { color: #FFAD66; font-weight: bold } /* Comment.Preproc */
.cpf { color: #7e8aa1 } /* Comment.PreprocFile */
.c1 { color: #7e8aa1 } /* Comment.Single */
.cs { color: #7e8aa1; font-style: italic } /* Comment.Special */
.gd { color: #f88f7f; background-color: #3d1e20 } /* Generic.Deleted */
.ge { color: #d4d2c8; font-style: italic } /* Generic.Emph */
.ges { color: #d4d2c8 } /* Generic.EmphStrong */
.gr { color: #f88f7f } /* Generic.Error */
.gh { color: #d4d2c8 } /* Generic.Heading */
.gi { color: #6ad4af; background-color: #19362c } /* Generic.Inserted */
.go { color: #7e8aa1 } /* Generic.Output */
.gp { color: #d4d2c8 } /* Generic.Prompt */
.gs { color: #d4d2c8; font-weight: bold } /* Generic.Strong */
.gu { color: #d4d2c8 } /* Generic.Subheading */
.gt { color: #f88f7f } /* Generic.Traceback */
.cpf { color: #7E8AA1 } /* Comment.PreprocFile */
.c1 { color: #7E8AA1 } /* Comment.Single */
.cs { color: #7E8AA1; font-style: italic } /* Comment.Special */
.gd { color: #F88F7F; background-color: #3D1E20 } /* Generic.Deleted */
.ge { color: #D4D2C8; font-style: italic } /* Generic.Emph */
.ges { color: #D4D2C8 } /* Generic.EmphStrong */
.gr { color: #F88F7F } /* Generic.Error */
.gh { color: #D4D2C8 } /* Generic.Heading */
.gi { color: #6AD4AF; background-color: #19362C } /* Generic.Inserted */
.go { color: #7E8AA1 } /* Generic.Output */
.gp { color: #D4D2C8 } /* Generic.Prompt */
.gs { color: #D4D2C8; font-weight: bold } /* Generic.Strong */
.gu { color: #D4D2C8 } /* Generic.Subheading */
.gt { color: #F88F7F } /* Generic.Traceback */
.kc { color: #FFAD66 } /* Keyword.Constant */
.kd { color: #FFAD66 } /* Keyword.Declaration */
.kn { color: #FFAD66 } /* Keyword.Namespace */
@ -131,19 +131,19 @@
.nb { color: #FFD173 } /* Name.Builtin */
.nc { color: #73D0FF } /* Name.Class */
.no { color: #FFD173 } /* Name.Constant */
.nd { color: #7e8aa1; font-weight: bold; font-style: italic } /* Name.Decorator */
.nd { color: #7E8AA1; font-weight: bold; font-style: italic } /* Name.Decorator */
.ni { color: #95E6CB } /* Name.Entity */
.ne { color: #73D0FF } /* Name.Exception */
.nf { color: #FFD173 } /* Name.Function */
.nl { color: #d4d2c8 } /* Name.Label */
.nn { color: #d4d2c8 } /* Name.Namespace */
.nx { color: #d4d2c8 } /* Name.Other */
.nl { color: #D4D2C8 } /* Name.Label */
.nn { color: #D4D2C8 } /* Name.Namespace */
.nx { color: #D4D2C8 } /* Name.Other */
.py { color: #FFD173 } /* Name.Property */
.nt { color: #5CCFE6 } /* Name.Tag */
.nv { color: #d4d2c8 } /* Name.Variable */
.nv { color: #D4D2C8 } /* Name.Variable */
.ow { color: #FFAD66 } /* Operator.Word */
.pm { color: #d4d2c8 } /* Punctuation.Marker */
.w { color: #d4d2c8 } /* Text.Whitespace */
.pm { color: #D4D2C8 } /* Punctuation.Marker */
.w { color: #D4D2C8 } /* Text.Whitespace */
.mb { color: #DFBFFF } /* Literal.Number.Bin */
.mf { color: #DFBFFF } /* Literal.Number.Float */
.mh { color: #DFBFFF } /* Literal.Number.Hex */
@ -153,7 +153,7 @@
.sb { color: #D5FF80 } /* Literal.String.Backtick */
.sc { color: #D5FF80 } /* Literal.String.Char */
.dl { color: #D5FF80 } /* Literal.String.Delimiter */
.sd { color: #7e8aa1 } /* Literal.String.Doc */
.sd { color: #7E8AA1 } /* Literal.String.Doc */
.s2 { color: #D5FF80 } /* Literal.String.Double */
.se { color: #95E6CB } /* Literal.String.Escape */
.sh { color: #D5FF80 } /* Literal.String.Heredoc */
@ -164,10 +164,10 @@
.ss { color: #DFBFFF } /* Literal.String.Symbol */
.bp { color: #5CCFE6 } /* Name.Builtin.Pseudo */
.fm { color: #FFD173 } /* Name.Function.Magic */
.vc { color: #d4d2c8 } /* Name.Variable.Class */
.vg { color: #d4d2c8 } /* Name.Variable.Global */
.vi { color: #d4d2c8 } /* Name.Variable.Instance */
.vm { color: #d4d2c8 } /* Name.Variable.Magic */
.vc { color: #D4D2C8 } /* Name.Variable.Class */
.vg { color: #D4D2C8 } /* Name.Variable.Global */
.vi { color: #D4D2C8 } /* Name.Variable.Instance */
.vm { color: #D4D2C8 } /* Name.Variable.Magic */
.il { color: #DFBFFF } /* Literal.Number.Integer.Long */
}
}

7398
client/simple/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,38 @@
{
"name": "simple",
"version": "1.0.0",
"type": "module",
"scripts": {
"clean": "rm -Rf node_modules",
"build": "node theme_icons.js && vite build",
"fix": "eslint --fix && stylelint --fix strict 'src/**/*.{css,scss,sass,less,styl,vue,svelte}'",
"icons.html": "node theme_icons.js"
},
"devDependencies": {
"@eslint/js": "^9.27.0",
"copy-webpack-plugin": "^13.0.0",
"css-loader": "^7.1.2",
"edge.js": "^6.2.1",
"eslint": "^9.27.0",
"filemanager-webpack-plugin": "^8.0.0",
"globals": "^16.2.0",
"ionicons": "^8.0.8",
"leaflet": "^1.9.4",
"less": "^4.3.0",
"less-loader": "^12.3.0",
"normalize.css": "^8.0.1",
"sharp": "^0.34.2",
"style-loader": "^4.0.0",
"stylelint": "^16.20.0",
"stylelint-config-standard": "^38.0.0",
"stylelint-config-standard-less": "^3.0.1",
"stylelint-prettier": "^5.0.3",
"svgo": "^3.3.2",
"swiped-events": "^1.2.0",
"vite": "^6.3.5",
"vite-plugin-static-copy": "^3.0.0",
"vite-plugin-stylelint": "^6.0.0",
"webpack": "^5.99.9",
"webpack-cli": "^6.0.1"
}
}

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

@ -0,0 +1,184 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
import "../../../node_modules/swiped-events/src/swiped-events.js";
(function (w, d, searxng) {
'use strict';
if (searxng.endpoint !== 'results') {
return;
}
searxng.ready(function () {
d.querySelectorAll('#urls img').forEach(
img =>
img.addEventListener(
'error', () => {
// console.log("ERROR can't load: " + img.src);
img.src = window.searxng.settings.theme_static_path + "/img/img_load_error.svg";
},
{once: true}
));
if (d.querySelector('#search_url button#copy_url')) {
d.querySelector('#search_url button#copy_url').style.display = "block";
}
searxng.on('.btn-collapse', 'click', function () {
var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');
var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');
var target = this.getAttribute('data-target');
var targetElement = d.querySelector(target);
var html = this.innerHTML;
if (this.classList.contains('collapsed')) {
html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);
} else {
html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);
}
this.innerHTML = html;
this.classList.toggle('collapsed');
targetElement.classList.toggle('invisible');
});
searxng.on('.media-loader', 'click', function () {
var target = this.getAttribute('data-target');
var iframe_load = d.querySelector(target + ' > iframe');
var srctest = iframe_load.getAttribute('src');
if (srctest === null || srctest === undefined || srctest === false) {
iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));
}
});
searxng.on('#copy_url', 'click', function () {
var target = this.parentElement.querySelector('pre');
navigator.clipboard.writeText(target.innerText);
this.innerText = this.dataset.copiedText;
});
// searxng.selectImage (gallery)
// -----------------------------
// setTimeout() ID, needed to cancel *last* loadImage
let imgTimeoutID;
// progress spinner, while an image is loading
const imgLoaderSpinner = d.createElement('div');
imgLoaderSpinner.classList.add('loader');
// singleton image object, which is used for all loading processes of a
// detailed image
const imgLoader = new Image();
const loadImage = (imgSrc, onSuccess) => {
// if defered image load exists, stop defered task.
if (imgTimeoutID) clearTimeout(imgTimeoutID);
// defer load of the detail image for 1 sec
imgTimeoutID = setTimeout(() => {
imgLoader.src = imgSrc;
}, 1000);
// set handlers in the on-properties
imgLoader.onload = () => {
onSuccess();
imgLoaderSpinner.remove();
};
imgLoader.onerror = () => {
imgLoaderSpinner.remove();
};
};
searxng.selectImage = (resultElement) => {
// add a class that can be evaluated in the CSS and indicates that the
// detail view is open
d.getElementById('results').classList.add('image-detail-open');
// add a hash to the browser history so that pressing back doesn't return
// to the previous page this allows us to dismiss the image details on
// pressing the back button on mobile devices
window.location.hash = '#image-viewer';
searxng.scrollPageToSelected();
// if there is none element given by the caller, stop here
if (!resultElement) return;
// find <img> object in the element, if there is none, stop here.
const img = resultElement.querySelector('.result-images-source img');
if (!img) return;
// <img src="" data-src="http://example.org/image.jpg">
const src = img.getAttribute('data-src');
// already loaded high-res image or no high-res image available
if (!src) return;
// use the image thumbnail until the image is fully loaded
const thumbnail = resultElement.querySelector('.image_thumbnail');
img.src = thumbnail.src;
// show a progress spinner
const detailElement = resultElement.querySelector('.detail');
detailElement.appendChild(imgLoaderSpinner);
// load full size image in background
loadImage(src, () => {
// after the singelton loadImage has loaded the detail image into the
// cache, it can be used in the origin <img> as src property.
img.src = src;
img.removeAttribute('data-src');
});
};
searxng.closeDetail = function () {
d.getElementById('results').classList.remove('image-detail-open');
// remove #image-viewer hash from url by navigating back
if (window.location.hash == '#image-viewer') window.history.back();
searxng.scrollPageToSelected();
};
searxng.on('.result-detail-close', 'click', e => {
e.preventDefault();
searxng.closeDetail();
});
searxng.on('.result-detail-previous', 'click', e => {
e.preventDefault();
searxng.selectPrevious(false);
});
searxng.on('.result-detail-next', 'click', e => {
e.preventDefault();
searxng.selectNext(false);
});
// listen for the back button to be pressed and dismiss the image details when called
window.addEventListener('hashchange', () => {
if (window.location.hash != '#image-viewer') searxng.closeDetail();
});
d.querySelectorAll('.swipe-horizontal').forEach(
obj => {
obj.addEventListener('swiped-left', function () {
searxng.selectNext(false);
});
obj.addEventListener('swiped-right', function () {
searxng.selectPrevious(false);
});
}
);
w.addEventListener('scroll', function () {
var e = d.getElementById('backToTop'),
scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
results = d.getElementById('results');
if (e !== null) {
if (scrollTop >= 100) {
results.classList.add('scrolling');
} else {
results.classList.remove('scrolling');
}
}
}, true);
});
})(window, document, window.searxng);

View file

@ -0,0 +1,199 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* exported AutoComplete */
(function (w, d, searxng) {
'use strict';
var qinput_id = "q", qinput;
const isMobile = window.matchMedia("only screen and (max-width: 50em)").matches;
const isResultsPage = document.querySelector("main").id == "main_results";
function submitIfQuery () {
if (qinput.value.length > 0) {
var search = document.getElementById('search');
setTimeout(search.submit.bind(search), 0);
}
}
function createClearButton (qinput) {
var cs = document.getElementById('clear_search');
var updateClearButton = function () {
if (qinput.value.length === 0) {
cs.classList.add("empty");
} else {
cs.classList.remove("empty");
}
};
// update status, event listener
updateClearButton();
cs.addEventListener('click', function (ev) {
qinput.value = '';
qinput.focus();
updateClearButton();
ev.preventDefault();
});
qinput.addEventListener('input', updateClearButton, false);
}
const fetchResults = async (query) => {
let request;
if (searxng.settings.method === 'GET') {
const reqParams = new URLSearchParams();
reqParams.append("q", query);
request = fetch("./autocompleter?" + reqParams.toString());
} else {
const formData = new FormData();
formData.append("q", query);
request = fetch("./autocompleter", {
method: 'POST',
body: formData,
});
}
request.then(async function (response) {
const results = await response.json();
if (!results) return;
const autocomplete = d.querySelector(".autocomplete");
const autocompleteList = d.querySelector(".autocomplete ul");
autocomplete.classList.add("open");
autocompleteList.innerHTML = "";
// show an error message that no result was found
if (!results[1] || results[1].length == 0) {
const noItemFoundMessage = document.createElement("li");
noItemFoundMessage.classList.add('no-item-found');
noItemFoundMessage.innerHTML = searxng.settings.translations.no_item_found;
autocompleteList.appendChild(noItemFoundMessage);
return;
}
for (let result of results[1]) {
const li = document.createElement("li");
li.innerText = result;
searxng.on(li, 'mousedown', () => {
qinput.value = result;
const form = d.querySelector("#search");
form.submit();
autocomplete.classList.remove('open');
});
autocompleteList.appendChild(li);
}
});
};
searxng.ready(function () {
// focus search input on large screens
if (!isMobile && !isResultsPage) document.getElementById("q").focus();
qinput = d.getElementById(qinput_id);
const autocomplete = d.querySelector(".autocomplete");
const autocompleteList = d.querySelector(".autocomplete ul");
if (qinput !== null) {
// clear button
createClearButton(qinput);
// autocompleter
if (searxng.settings.autocomplete) {
searxng.on(qinput, 'input', () => {
const query = qinput.value;
if (query.length < searxng.settings.autocomplete_min) return;
setTimeout(() => {
if (query == qinput.value) fetchResults(query);
}, 300);
});
searxng.on(qinput, 'keyup', (e) => {
let currentIndex = -1;
const listItems = autocompleteList.children;
for (let i = 0; i < listItems.length; i++) {
if (listItems[i].classList.contains('active')) {
currentIndex = i;
break;
}
}
let newCurrentIndex = -1;
if (e.key === "ArrowUp") {
if (currentIndex >= 0) listItems[currentIndex].classList.remove('active');
// we need to add listItems.length to the index calculation here because the JavaScript modulos
// operator doesn't work with negative numbers
newCurrentIndex = (currentIndex - 1 + listItems.length) % listItems.length;
} else if (e.key === "ArrowDown") {
if (currentIndex >= 0) listItems[currentIndex].classList.remove('active');
newCurrentIndex = (currentIndex + 1) % listItems.length;
} else if (e.key === "Tab" || e.key === "Enter") {
autocomplete.classList.remove('open');
}
if (newCurrentIndex != -1) {
const selectedItem = listItems[newCurrentIndex];
selectedItem.classList.add('active');
if (!selectedItem.classList.contains('no-item-found')) qinput.value = selectedItem.innerText;
}
});
}
}
// Additionally to searching when selecting a new category, we also
// automatically start a new search request when the user changes a search
// filter (safesearch, time range or language) (this requires JavaScript
// though)
if (
qinput !== null
&& searxng.settings.search_on_category_select
// If .search_filters is undefined (invisible) we are on the homepage and
// hence don't have to set any listeners
&& d.querySelector(".search_filters") != null
) {
searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);
searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);
searxng.on(d.getElementById('language'), 'change', submitIfQuery);
}
const categoryButtons = d.querySelectorAll("button.category_button");
for (let button of categoryButtons) {
searxng.on(button, 'click', (event) => {
if (event.shiftKey) {
event.preventDefault();
button.classList.toggle("selected");
return;
}
// manually deselect the old selection when a new category is selected
const selectedCategories = d.querySelectorAll("button.category_button.selected");
for (let categoryButton of selectedCategories) {
categoryButton.classList.remove("selected");
}
button.classList.add("selected");
});
}
// override form submit action to update the actually selected categories
const form = d.querySelector("#search");
if (form != null) {
searxng.on(form, 'submit', (event) => {
event.preventDefault();
const categoryValuesInput = d.querySelector("#selected-categories");
if (categoryValuesInput) {
let categoryValues = [];
for (let categoryButton of categoryButtons) {
if (categoryButton.classList.contains("selected")) {
categoryValues.push(categoryButton.name.replace("category_", ""));
}
}
categoryValuesInput.value = categoryValues.join(",");
}
form.submit();
});
}
});
})(window, document, window.searxng);

View file

@ -0,0 +1 @@
import "./head/00_init.js";

View file

@ -0,0 +1,7 @@
import "./main/00_toolkit.js";
import "./main/infinite_scroll.js";
import "./main/keyboard.js";
import "./main/mapresult.js";
import "./main/preferences.js";
import "./main/results.js";
import "./main/search.js";

View file

@ -3,6 +3,7 @@
.autocomplete {
position: absolute;
width: @search-width;
max-width: calc(100% - 2 * @search-padding-horizontal);
max-height: 0;
overflow-y: hidden;
.ltr-text-align-left();
@ -53,7 +54,7 @@
color: var(--color-autocomplete-font);
max-height: 32rem;
overflow-y: auto;
z-index: 100;
z-index: 5000;
margin-top: 3.5rem;
border-radius: 0.8rem;
@ -65,8 +66,6 @@
@media screen and (max-width: @phone) {
.autocomplete {
width: 100%;
> ul > li {
padding: 1rem;
}

View file

@ -1,4 +1,4 @@
@import "../generated/pygments.less";
@import "../../generated/pygments.less";
.codelines {
margin: @results-margin 0 0 0;

View file

@ -55,8 +55,12 @@
--color-autocomplete-background: #fff;
--color-autocomplete-background-hover: #e3e3e3;
/// Answer Colors
--color-answer-font: #444; // same as --color-base-font
--color-answer-font: #444; // same as --color-base-font
--color-answer-background: #fff;
// colors of the KeyValue result class
--color-result-keyvalue-col-table: #fdfbff;
--color-result-keyvalue-odd: #fdfbff;
--color-result-keyvalue-even: #fff;
/// Results Colors
--color-result-background: #fff;
--color-result-border: #ddd;
@ -85,8 +89,8 @@
--color-result-detail-background: #242424;
--color-result-detail-hr: #555;
--color-result-detail-link: #8af;
--color-result-detail-loader-border: rgba(255, 255, 255, 0.2);
--color-result-detail-loader-borderleft: rgba(0, 0, 0, 0);
--color-result-detail-loader-border: rgb(255 255 255 / 20%);
--color-result-detail-loader-borderleft: rgb(0 0 0 / 0%);
/// Toolkit Colors
--color-toolkit-badge-font: #fff;
--color-toolkit-badge-background: #545454;
@ -111,16 +115,16 @@
--color-toolkit-checkbox-input-border: #3050ff;
--color-toolkit-engine-tooltip-border: #ddd;
--color-toolkit-engine-tooltip-background: #fff;
--color-toolkit-loader-border: rgba(0, 0, 0, 0.2);
--color-toolkit-loader-borderleft: rgba(255, 255, 255, 0);
--color-toolkit-loader-border: rgb(0 0 0 / 20%);
--color-toolkit-loader-borderleft: rgb(255 255 255 / 0%);
--color-doc-code: #003;
--color-doc-code-background: #ddeaff;
/// Other misc colors
--color-bar-chart-primary: #5bc0de;
--color-bar-chart-secondary: #deb15b;
--color-image-resolution-background: rgba(0, 0, 0, 50%);
--color-image-resolution-background: rgb(0 0 0 / 50%);
--color-image-resolution-font: #fff;
--color-loading-indicator: rgba(255, 255, 255, 0.2);
--color-loading-indicator: rgb(255 255 255 / 20%);
--color-loading-indicator-gap: #fff;
--color-line-number: #64708d;
// Favicons Colors
@ -180,6 +184,10 @@
/// Answer Colors
--color-answer-font: #bbb; // same as --color-base-font
--color-answer-background: #26292f;
// colors of the KeyValue result class
--color-result-keyvalue-col-table: #1e1e22;
--color-result-keyvalue-odd: #1e1e22;
--color-result-keyvalue-even: #26292f;
/// Results Colors
--color-result-background: #26292f;
--color-result-border: #333;
@ -200,8 +208,8 @@
--color-result-detail-background: #1a1a1c;
--color-result-detail-hr: #555;
--color-result-detail-link: #8af;
--color-result-detail-loader-border: rgba(255, 255, 255, 0.2);
--color-result-detail-loader-borderleft: rgba(0, 0, 0, 0);
--color-result-detail-loader-border: rgb(255 255 255 / 20%);
--color-result-detail-loader-borderleft: rgb(0 0 0 / 0%);
// Images Colors
--color-result-image-span-font: #bbb;
--color-result-image-span-font-selected: #222;
@ -234,8 +242,8 @@
--color-toolkit-checkbox-input-border: #58f;
--color-toolkit-engine-tooltip-border: #333;
--color-toolkit-engine-tooltip-background: #222;
--color-toolkit-loader-border: rgba(255, 255, 255, 0.2);
--color-toolkit-loader-borderleft: rgba(0, 0, 0, 0);
--color-toolkit-loader-border: rgb(255 255 255 / 20%);
--color-toolkit-loader-borderleft: rgb(0 0 0 / 0%);
--color-doc-code: #ddd;
--color-doc-code-background: #4d5a6f;
// Favicons Colors
@ -279,12 +287,13 @@
@results-image-row-height: 12rem;
@results-image-row-height-phone: 10rem;
@search-width: 44rem;
// heigh of #search, see detail.less
@search-height: 7.6rem;
// height of #search, see detail.less
@search-height: 13rem;
@search-padding-horizontal: 0.5rem;
/// Device Size
/// @desktop > @tablet
@tablet: 79.75em; // see https://github.com/searxng/searxng/issues/874
@tablet: 79.75em; // see https://github.com/searxng/searxng/issues/874
@phone: 50em;
@small-phone: 35em;
@ultra-small-phone: 20rem;
@ -293,12 +302,12 @@
@stacked-bar-chart: rgb(0, 0, 0);
/// Load fonts from this directory.
@icon-font-path: "../../../fonts/";
@icon-font-path: "../../../fonts/";
//** File name for all font files.
@icon-font-name: "glyphicons-halflings-regular";
@icon-font-name: "glyphicons-halflings-regular";
//** Element ID within SVG icon file.
@icon-font-svg-id: "glyphicons_halflingsregular";
@icon-font-svg-id: "glyphicons_halflingsregular";
// decoration of the select HTML elements
@select-light-svg-path: "../svg/select-light.svg";
@select-dark-svg-path: "../svg/select-dark.svg";
@select-light-svg-path: "../svg/select-light.svg";
@select-dark-svg-path: "../svg/select-dark.svg";

View file

@ -22,8 +22,9 @@ article.result-images .detail {
bottom: 0;
background: var(--color-result-detail-background);
border: 1px solid var(--color-result-detail-background);
z-index: 10000;
z-index: 1000;
padding: 4rem 3rem 3rem 3rem;
overflow-y: scroll;
a.result-images-source {
display: block;
@ -42,7 +43,7 @@ article.result-images .detail {
height: inherit;
max-width: 100%;
min-height: inherit;
max-height: calc(100vh - 25rem - 7rem);
max-height: calc(100vh - 25rem - 17rem);
background: inherit;
}
}
@ -93,8 +94,7 @@ article.result-images .detail {
p.result-url {
white-space: nowrap;
overflow-x: hidden;
overflow-y: hidden;
overflow: hidden hidden;
text-overflow: ellipsis;
}
@ -149,7 +149,7 @@ article.result-images .detail {
height: 1.5rem;
position: absolute;
filter: opacity(40%);
z-index: 2000002;
z-index: 1200;
span {
display: block;
@ -204,7 +204,9 @@ article.result-images .detail {
}
}
#results.image-detail-open.scrolling article.result-images[data-vim-selected] .detail {
#results.image-detail-open.scrolling
article.result-images[data-vim-selected]
.detail {
top: 0;
a.result-images-source img {

View file

@ -1,14 +1,17 @@
iframe[src^="https://w.soundcloud.com"] {
iframe[src^="https://w.soundcloud.com"]
{
height: 120px;
}
iframe[src^="https://www.deezer.com"] {
iframe[src^="https://www.deezer.com"]
{
// The real size is 92px, but 94px are needed to avoid an inner scrollbar of
// the embedded HTML.
height: 94px;
}
iframe[src^="https://www.mixcloud.com"] {
iframe[src^="https://www.mixcloud.com"]
{
// the embedded player from mixcloud has some quirks: initial there is an
// issue with an image URL that is blocked since it is an a Cross-Origin
// request. The alternative text (<img alt='Mixcloud Logo'> then cause an
@ -18,16 +21,19 @@ iframe[src^="https://www.mixcloud.com"] {
height: 250px;
}
iframe[src^="https://bandcamp.com/EmbeddedPlayer"] {
iframe[src^="https://bandcamp.com/EmbeddedPlayer"]
{
// show playlist
height: 350px;
}
iframe[src^="https://bandcamp.com/EmbeddedPlayer/track"] {
iframe[src^="https://bandcamp.com/EmbeddedPlayer/track"]
{
// hide playlist
height: 120px;
}
iframe[src^="https://genius.com/songs"] {
iframe[src^="https://genius.com/songs"]
{
height: 65px;
}

View file

@ -6,7 +6,7 @@
text-align: center;
.title {
background: url('../img/searxng.png') no-repeat;
background: url("../img/searxng.png") no-repeat;
min-height: 4rem;
margin: 4rem auto;
background-position: center;

View file

@ -9,7 +9,7 @@
display: none;
}
input[type=checked] {
input[type="checked"] {
position: absolute;
}

View file

@ -48,6 +48,14 @@ table {
}
}
div.pref-group {
width: 100%;
font-weight: normal;
padding: 1rem 0.5rem;
.ltr-text-align-left();
background: var(--color-settings-table-group-background);
}
.value {
margin: 0;
padding: 0;

View file

@ -0,0 +1,35 @@
/*
Layout of the KeyValue result class
*/
#main_results .result-keyvalue {
caption {
padding: 0.8rem 0.5rem;
font-style: italic;
caption-side: bottom;
background-color: var(--color-result-keyvalue-table);
}
.col-key {
width: 25%;
}
table {
word-break: break-word;
table-layout: fixed;
width: 100%;
background-color: var(--color-result-keyvalue-table);
}
tr.odd {
background-color: var(--color-result-keyvalue-odd);
}
tr.even {
background-color: var(--color-result-keyvalue-even);
}
th,
td {
padding: 0.3rem 0.5rem;
}
}

View file

@ -15,8 +15,7 @@
background: var(--color-header-background);
border-bottom: 1px solid var(--color-header-border);
display: grid;
column-gap: 1.2rem;
row-gap: 1rem;
gap: 1rem 1.2rem;
grid-template-columns: 3rem 1fr;
grid-template-areas:
"logo search"
@ -84,7 +83,9 @@ button.category_button {
}
// only used when JavaScript is disabled
.no-js #categories_container:has(button.category_button:focus-within) button.category_button {
.no-js
#categories_container:has(button.category_button:focus-within)
button.category_button {
&.selected {
color: var(--color-base-font);
border-bottom: none;
@ -130,7 +131,7 @@ button.category_button {
}
#search_view {
padding: 0.5rem 0.3rem 0 0.5rem;
padding: 0.5rem @search-padding-horizontal 0 @search-padding-horizontal;
grid-area: search;
body.results_endpoint & {
@ -140,7 +141,8 @@ button.category_button {
.search_box {
border-radius: 0.8rem;
width: @search-width;
width: 100%;
max-width: @search-width;
display: inline-flex;
flex-direction: row;
white-space: nowrap;
@ -159,7 +161,7 @@ button.category_button {
outline: none;
color: var(--color-search-font);
font-size: 1.1rem;
z-index: 10000;
z-index: 1000;
&:hover {
color: var(--color-search-background-hover);
@ -184,7 +186,7 @@ html.no-js #clear_search.hide_if_nojs {
outline: none;
color: var(--color-search-font);
font-size: 1.1rem;
z-index: 2;
z-index: 100;
}
#q {
@ -268,8 +270,7 @@ html.no-js #clear_search.hide_if_nojs {
#categories {
width: 100%;
.ltr-text-align-left();
overflow-x: scroll;
overflow-y: hidden;
overflow: scroll hidden;
-webkit-overflow-scrolling: touch;
}
}
@ -280,8 +281,7 @@ html.no-js #clear_search.hide_if_nojs {
width: 100%;
margin: 0;
padding: 0.1rem 0 0 0;
column-gap: 0;
row-gap: 0;
gap: 0 0;
grid-template-areas:
"logo search"
"categories categories";
@ -292,8 +292,7 @@ html.no-js #clear_search.hide_if_nojs {
}
.search_box {
width: 98%;
display: flex;
width: 100%;
}
#q {
@ -335,7 +334,7 @@ html.no-js #clear_search.hide_if_nojs {
top: 0;
height: 100%;
width: 100%;
z-index: 10000;
z-index: 2000;
.search_box {
border-bottom: 1px solid var(--color-search-border);

View file

@ -14,7 +14,7 @@ on the /search URL and when the "center alignment" preference is enabled.
}
}
@media screen and (min-width: 62rem) {
@media screen and (width >= 62rem) {
.center-alignment-yes #main_results {
--center-page-width: 60rem;
}
@ -63,9 +63,11 @@ on the /search URL and when the "center alignment" preference is enabled.
}
#search_header {
grid-template-columns: calc(50% - 4.5rem - var(--center-page-width) / 2) 3rem var(--center-page-width);
grid-template-columns:
calc(50% - 4.5rem - var(--center-page-width) / 2)
3rem var(--center-page-width);
grid-template-areas: "na logo search" "na spacer categories";
column-gap: 1.2rem; // from search.less
column-gap: 1.2rem; // from search.less
width: 100%;
padding-left: 0;
padding-right: 0;
@ -91,10 +93,12 @@ on the /search URL and when the "center alignment" preference is enabled.
align-self: flex-start;
}
&:not(.only_template_images):not(.image-detail-open) {
&:not(.only_template_images, .image-detail-open) {
// the gap is set in style.less
.ltr-margin-left(1.5rem);
grid-template-columns: calc(var(--center-page-width) - @results-gap - @results-sidebar-width) @results-sidebar-width;
grid-template-columns:
calc(var(--center-page-width) - @results-gap - @results-sidebar-width)
@results-sidebar-width;
#backToTop {
.ltr-left(calc(50% - @results-sidebar-width - @results-gap + 1rem + var(--center-page-width) / 2));

View file

@ -109,7 +109,11 @@
}
// Image detail
#results.image-detail-open article.result-images[data-vim-selected] .detail .result-images-labels p {
#results.image-detail-open
article.result-images[data-vim-selected]
.detail
.result-images-labels
p {
direction: rtl;
&.result-url {
@ -125,7 +129,13 @@
}
// select HTML element
@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
@supports (
(background-position-x: 100%) and
(
(appearance: none) or (-webkit-appearance: none) or
(-moz-appearance: none)
)
) {
select {
border-width: 0 0 0 2rem;
background-position-x: -2rem;

View file

@ -32,8 +32,8 @@
// to center the results
@import "style-center.less";
// ion-icon
.ion-icon {
// sxng-icon-set
.sxng-icon-set {
display: inline-block;
vertical-align: bottom;
line-height: 1;
@ -41,16 +41,16 @@
.ltr-transform();
}
.ion-icon-small {
.sxng-icon-set-small {
width: 1rem;
height: 1rem;
.ion-icon;
.sxng-icon-set;
}
.ion-icon-big {
.sxng-icon-set-big {
width: 1.5rem;
height: 1.5rem;
.ion-icon;
.sxng-icon-set;
}
// Main LESS-Code
@ -80,6 +80,12 @@ body {
margin: 0;
}
@supports (height: 100dvh) {
body {
height: 100dvh;
}
}
main {
width: 100%;
margin-bottom: 2rem;
@ -244,9 +250,8 @@ article[data-vim-selected].category-social {
align-items: center;
font-size: 1rem;
color: var(--color-result-url-font);
flex-wrap: nowrap;
flex-flow: row nowrap;
overflow: hidden;
flex-direction: row;
margin: 0;
padding: 0;
@ -269,9 +274,7 @@ article[data-vim-selected].category-social {
.url_o2 {
overflow: hidden;
white-space: nowrap;
flex-basis: content;
flex-grow: 0;
flex-shrink: 1;
flex: 0 1 content;
text-align: right;
padding-bottom: 1px;
@ -472,7 +475,7 @@ article[data-vim-selected].category-social {
padding: 0;
border: none;
height: 100%;
width: 100%;
width: auto;
object-fit: cover;
vertical-align: bottom;
background: var(--color-result-image-background);
@ -546,14 +549,13 @@ article[data-vim-selected].category-social {
margin-bottom: 0;
.ltr-margin-left(@results-offset);
display: grid;
grid-template-columns: @results-width @results-sidebar-width;
grid-template-rows: min-content min-content 1fr min-content;
grid-template:
"corrections sidebar" min-content
"answers sidebar" min-content
"urls sidebar" 1fr
"pagination sidebar" min-content
/ @results-width @results-sidebar-width;
gap: 0 @results-gap;
grid-template-areas:
"corrections sidebar"
"answers sidebar"
"urls sidebar"
"pagination sidebar";
}
#results #sidebar *:first-child {
@ -676,10 +678,7 @@ summary.title {
}
.answer-url {
margin-left: auto;
margin-top: 5px;
margin-right: 10px;
margin-bottom: 10px;
margin: 5px 10px 10px auto;
}
}
@ -788,7 +787,7 @@ summary.title {
padding: 0.4rem;
margin-left: 0.5rem;
border-radius: 0.3rem;
display: none; // will be shown by JS.
display: none; // will be shown by JS.
}
}
@ -979,19 +978,18 @@ summary.title {
margin: 0 auto;
justify-content: center;
display: grid;
grid-template-columns: @results-width;
grid-template-rows: min-content min-content min-content 1fr min-content min-content;
grid-template:
"corrections" min-content
"answers" min-content
"sidebar" min-content
"urls" 1fr
"pagination" min-content
/ @results-width;
gap: 0;
grid-template-areas:
"corrections"
"answers"
"sidebar"
"urls"
"pagination";
}
}
@media screen and (max-width: calc(@tablet - 0.5px)) {
@media screen and (width <= calc(@tablet - 0.5px)) {
#links_on_top {
span {
display: none;
@ -999,7 +997,7 @@ summary.title {
}
}
@media screen and (max-width: 52rem) {
@media screen and (width <= 52rem) {
body.results_endpoint {
#links_on_top {
.link_on_top_about,
@ -1024,15 +1022,14 @@ summary.title {
#main_results div#results.only_template_images {
margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
display: grid;
grid-template-columns: 100%;
grid-template-rows: min-content min-content min-content 1fr min-content;
grid-template:
"corrections" min-content
"answers" min-content
"sidebar" min-content
"urls" 1fr
"pagination" min-content
/ 100%;
gap: 0;
grid-template-areas:
"corrections"
"answers"
"sidebar"
"urls"
"pagination";
#sidebar {
display: none;
@ -1167,3 +1164,6 @@ summary.title {
pre code {
white-space: pre-wrap;
}
// import layouts of the Result types
@import "result_types/keyvalue.less";

View file

@ -203,7 +203,7 @@ div.selectable_url {
left: 50%;
margin: 0 auto;
transform: translate(-50%, -50%);
z-index: 10000000;
z-index: 5000;
h3 {
margin-top: 0;
@ -217,8 +217,7 @@ div.selectable_url {
//
.scrollx {
overflow-x: auto;
overflow-y: hidden;
overflow: auto hidden;
display: block;
padding: 0;
margin: 0;
@ -250,7 +249,7 @@ ul.tabs {
order: 2;
}
& > input[type=radio] {
& > input[type="radio"] {
display: none;
}
@ -340,7 +339,7 @@ select {
padding: 0.2rem !important;
color: var(--color-search-font);
font-size: 0.9rem;
z-index: 2;
z-index: 100;
&:hover,
&:focus {
@ -348,14 +347,21 @@ select {
}
}
@supports ((background-position-x: 100%) and ((appearance: none) or (-webkit-appearance: none) or (-moz-appearance: none))) {
@supports (
(background-position-x: 100%) and
(
(appearance: none) or (-webkit-appearance: none) or
(-moz-appearance: none)
)
) {
select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
border-width: 0 2rem 0 0;
border-color: transparent;
background: data-uri('image/svg+xml;charset=UTF-8', @select-light-svg-path) no-repeat;
background: data-uri("image/svg+xml;charset=UTF-8", @select-light-svg-path)
no-repeat;
background-position-x: calc(100% + 2rem);
background-size: 2rem;
background-origin: content-box;
@ -377,12 +383,18 @@ select {
@media (prefers-color-scheme: dark) {
html.theme-auto select,
html.theme-dark select {
background-image: data-uri('image/svg+xml;charset=UTF-8', @select-dark-svg-path);
background-image: data-uri(
"image/svg+xml;charset=UTF-8",
@select-dark-svg-path
);
}
}
html.theme-dark select {
background-image: data-uri('image/svg+xml;charset=UTF-8', @select-dark-svg-path);
background-image: data-uri(
"image/svg+xml;charset=UTF-8",
@select-dark-svg-path
);
}
}
@ -414,7 +426,7 @@ input.checkbox-onoff[type="checkbox"] {
border: 1px solid var(--color-btn-background);
border-radius: 12px;
box-shadow: var(--color-btn-background) 0 0 3px;
z-index: 10000;
z-index: 1200;
top: -0.55em;
left: -0.6em;
}
@ -462,7 +474,7 @@ input.checkbox-onoff.reversed-checkbox[type="checkbox"] {
/* -- checkbox -- */
@supports (transform: rotate(-45deg)) {
input[type=checkbox]:not(.checkbox-onoff) {
input[type="checkbox"]:not(.checkbox-onoff) {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
@ -477,7 +489,7 @@ input.checkbox-onoff.reversed-checkbox[type="checkbox"] {
.rounded-corners(0.3em);
&::after {
content: '';
content: "";
width: 9px;
height: 5px;
position: absolute;
@ -498,14 +510,18 @@ input.checkbox-onoff.reversed-checkbox[type="checkbox"] {
}
// disabled : can't be focused, show only the check mark
input[type=checkbox][disabled]:not(.checkbox-onoff) {
input[type="checkbox"][disabled]:not(.checkbox-onoff) {
border: inherit;
background-color: transparent !important;
cursor: inherit;
}
// if not checked and possible to checked then display a "light" check mark on hover
input.checkbox[type=checkbox]:not(:checked):not([disabled]):not(.checkbox-onoff):hover::after {
input.checkbox[type="checkbox"]:not(
:checked,
[disabled],
.checkbox-onoff
):hover::after {
opacity: 0.5;
}
}
@ -574,7 +590,7 @@ input.checkbox-onoff.reversed-checkbox[type="checkbox"] {
background: var(--color-toolkit-engine-tooltip-background);
font-size: 14px;
font-weight: normal;
z-index: 1000000;
z-index: 5000;
text-align: left;
.rounded-corners;
}
@ -593,8 +609,7 @@ td:hover .engine-tooltip,
width: -moz-available;
width: -webkit-fill-available;
width: fill;
flex-direction: row;
flex-wrap: nowrap;
flex-flow: row nowrap;
align-items: center;
display: inline-flex;
}

View file

@ -14,33 +14,16 @@
border-right: 1.1em solid var(--color-loading-indicator);
border-bottom: 1.1em solid var(--color-loading-indicator);
border-left: 1.1em solid var(--color-loading-indicator-gap);
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation: load8 1.1s infinite linear;
animation: load8 1.1s infinite linear;
}
@-webkit-keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes load8 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<path fill="#58f" d="M11 20.85a.92.92 0 0 1-1.1.93A10 10 0 0 1 2.06 13c-.06-.55.4-1 .95-1h3a1 1 0 0 1 1 1 3 3 0 0 0 3 3 1 1 0 0 1 1 1v3.85Zm6-1.92c0 .77.83 1.23 1.42.74a10 10 0 0 0 2.03-2.32c.39-.61-.09-1.35-.81-1.35H18a1 1 0 0 0-1 1v1.93ZM12 2a10 10 0 0 1 6.65 2.53c.61.55.17 1.47-.65 1.47h-.15A2.85 2.85 0 0 0 15 8.85c0 .33-.18.62-.47.77l-.08.04a1 1 0 0 1-.9 0l-.08-.04a.85.85 0 0 1-.47-.77A2.85 2.85 0 0 0 10.15 6H10a1 1 0 0 1-1-1V3.2c0-.44.28-.84.7-.94C10.45 2.1 11.22 2 12 2Z"/>
<path fill="#58f" d="M3.42 10c-.63 0-1.1-.58-.9-1.18.6-1.8 1.7-3.36 3.12-4.53C6.2 3.82 7 4.26 7 5a3 3 0 0 0 3 3h.15c.47 0 .85.38.85.85 0 1.09.61 2.07 1.58 2.56l.08.04a3 3 0 0 0 2.68 0l.08-.04A2.85 2.85 0 0 0 17 8.85c0-.47.38-.85.85-.85h2.66c.4 0 .77.23.9.6a9.98 9.98 0 0 1 .52 4.6.94.94 0 0 1-.95.8H18a3 3 0 0 0-3 3v3.8c0 .44-.28.84-.7.94l-.2.04a.92.92 0 0 1-1.1-.93V17a3 3 0 0 0-3-3 1 1 0 0 1-1-1 3 3 0 0 0-3-3H3.42Z"/>
</svg>

After

Width:  |  Height:  |  Size: 989 B

View file

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path d="M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184 184-82.39 184-184S349.61 64 248 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 220h32v116"/>
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M208 340h88"/>
<path d="M248 130a26 26 0 1026 26 26 26 0 00-26-26z" fill="currentColor" stroke="currentColor" stroke-miterlimit="10" stroke-width="1"/>
</svg>

After

Width:  |  Height:  |  Size: 648 B

View file

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path d="M368 415.86V72a24.07 24.07 0 00-24-24H72a24.07 24.07 0 00-24 24v352a40.12 40.12 0 0040 40h328" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/>
<path d="M416 464h0a48 48 0 01-48-48V128h72a24 24 0 0124 24v264a48 48 0 01-48 48z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/>
<path d="M240 128h64M240 192h64M112 256h192M112 320h192M112 384h192" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/>
<path d="M176 208h-64a16 16 0 01-16-16v-64a16 16 0 0116-16h64a16 16 0 0116 16v64a16 16 0 01-16 16z" fill="currentColor" stroke="currentColor" stroke-linejoin="round" stroke-width="1" />
</svg>

After

Width:  |  Height:  |  Size: 787 B

View file

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 196 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

Before After
Before After

2
client/simple/static/.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
leaflet.css -diff
leaflet.js -diff

View file

@ -0,0 +1,84 @@
/**
* Generate icons.html for the jinja templates of the simple theme.
*/
import { argv } from "node:process";
import { dirname, resolve } from "node:path";
import { jinja_svg_sets } from "./tools/jinja_svg_catalog.js";
const HERE = dirname(argv[1]) + "/";
const dest = resolve(HERE, "../../searx/templates/simple/icons.html");
/** @type import("./tools/jinja_svg_catalog.js").JinjaMacro[] */
const searxng_jinja_macros = [
{ name: "icon", class: "sxng-icon-set" },
{ name: "icon_small", class: "sxng-icon-set-small" },
{ name: "icon_big", class: "sxng-icon-set-big" },
];
const sxng_icon_opts ={
multipass: true,
plugins: [
{ name: "removeTitle" },
{ name: "removeXMLNS" },
{ name: "addAttributesToSVGElement",
params: {
attributes: [
{
"aria-hidden": "true",
}]}}]
};
/** @type import("./tools/jinja_svg_catalog.js").IconSet */
const simple_icons = [
{
base: resolve(HERE, "node_modules/ionicons/dist/svg"),
set: {
"alert": "alert-outline.svg",
"appstore": "apps-outline.svg",
"book": "book-outline.svg",
"close": "close-outline.svg",
"download": "download-outline.svg",
"ellipsis-vertical": "ellipsis-vertical-outline.svg",
"file-tray-full": "file-tray-full-outline.svg",
"film": "film-outline.svg",
"globe": "globe-outline.svg",
"heart": "heart-outline.svg",
"image": "image-outline.svg",
"layers": "layers-outline.svg",
"leecher": "arrow-down.svg",
"location": "location-outline.svg",
"magnet": "magnet-outline.svg",
"musical-notes": "musical-notes-outline.svg",
"navigate-down": "chevron-down-outline.svg",
"navigate-left": "chevron-back-outline.svg",
"navigate-right": "chevron-forward-outline.svg",
"navigate-up": "chevron-up-outline.svg",
"people": "people-outline.svg",
"play": "play-outline.svg",
"radio": "radio-outline.svg",
"save": "save-outline.svg",
"school": "school-outline.svg",
"search": "search-outline.svg",
"seeder": "swap-vertical.svg",
"settings": "settings-outline.svg",
"tv": "tv-outline.svg",
},
svgo_opts: sxng_icon_opts,
},
// some of the ionicons are not suitable for a dark theme, we fixed the svg
// manually in src/svg/ionicons
// - https://github.com/searxng/searxng/pull/4284#issuecomment-2680550342
{
base: resolve(HERE, "src/svg/ionicons"),
set: {
"information-circle": "information-circle-outline.svg",
"newspaper": "newspaper-outline.svg",
},
svgo_opts: sxng_icon_opts,
}
];
jinja_svg_sets(dest, searxng_jinja_macros, simple_icons);

View file

@ -0,0 +1,78 @@
import fs from "fs";
import path from "path";
import sharp from "sharp";
import { optimize as svgo } from "svgo";
/**
* @typedef {object} Src2Dest - Mapping of src to dest
* @property {string} src - Name of the source file.
* @property {string} dest - Name of the destination file.
*/
/**
* Convert a list of SVG files to PNG.
*
* @param {Src2Dest[]} items - Array of SVG files (src: SVG, dest:PNG) to convert.
*/
async function svg2png (items) {
items.forEach(
async (item) => {
try {
fs.mkdir(path.dirname(item.dest), { recursive: true }, (err) => {
if (err)
throw err;
});
const info = await sharp(item.src).png({
force: true,
compressionLevel: 9,
palette: true,
}).toFile(item.dest);
console.log(
`[svg2png] created ${item.dest} -- bytes: ${info.size}, w:${info.width}px, h:${info.height}px`
);
} catch (err) {
console.error(`ERROR: ${item.dest} -- ${err}`);
throw(err);
}
}
);
}
/**
* Optimize SVG images for WEB.
*
* @param {import('svgo').Config} svgo_opts - Options passed to svgo.
* @param {Src2Dest[]} items - Array of SVG files (src:SVG, dest:SVG) to optimize.
*/
async function svg2svg(svgo_opts, items) {
items.forEach(
async (item) => {
try {
fs.mkdir(path.dirname(item.dest), { recursive: true }, (err) => {
if (err)
throw err;
});
const raw = fs.readFileSync(item.src, "utf8");
const opt = svgo(raw, svgo_opts);
fs.writeFileSync(item.dest, opt.data);
console.log(
`[svg2svg] optimized: ${item.dest} -- src: ${item.src}`
);
} catch (err) {
console.error(`ERROR: optimize src: ${item.src} -- ${err}`);
throw(err);
}
}
);
}
export { svg2png, svg2svg };

View file

@ -0,0 +1,26 @@
{{--
This is a EDGE https://edgejs.dev/ template to generate a HTML Jinja template
for the backend. Example output of this EDGE template:
- https://github.com/searxng/searxng/blob/master/searx/templates/simple/icons.html
--}}
{#
Catalog of SVG symbols that can be inserted into the HTML output of a Jinja
template. This file from:
client/simple/tools/icon_catalog.edge.html
#}
{%-
set catalog = {
@each((svg, name) in svg_catalog)
'{{{name}}}' : '{{{svg}}}',
@end
}
-%}
@each(macro in macros)
{% macro {{ macro.name }}(action, alt) -%}
{{ open_curly_brace }} catalog[action] | replace("{{__jinja_class_placeholder__}}", "{{ macro.class }}") | safe {{ close_curly_brace }}
{%- endmacro %}
@end

View file

@ -0,0 +1,132 @@
import fs from "fs";
import { resolve, dirname } from "path";
import { Edge } from 'edge.js';
import { optimize as svgo } from "svgo";
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const __jinja_class_placeholder__ = "__jinja_class_placeholder__";
// -- types
/**
* @typedef {object} IconSet - A set of icons
* @property {object[]} set - Array of SVG icons, where property name is the
* name of the icon and value is the src of the SVG (relative to base).
* @property {string} base - Folder in which the SVG src files are located.
* @property {import("svgo").Config} svgo_opts - svgo options for this set.
*/
/**
* @typedef {object} IconSVG - Mapping of icon name to SVG source file.
* @property {string} name - Name of the icon isource file.
* @property {string} src - Name of the destination file.
* @property {import("svgo").Config} svgo_opts - Options passed to svgo.
*/
/**
* @typedef {object} JinjaMacro - Arguments to create a jinja macro
* @property {string} name - Name of the jinja macro.
* @property {string} class - SVG's class name (value of XML class attribute)
*/
// -- functions
/**
* Generate a jinja template with a catalog of SVG icons that can be
* used in in other HTML jinja templates.
*
* @param {string} dest - filename of the generate jinja template.
* @param {JinjaMacro} macros - Jinja macros to create.
* @param {IconSVG[]} items - Array of SVG items.
*/
function jinja_svg_catalog(dest, macros, items) {
const svg_catalog = {};
const edge_template = resolve(__dirname, "jinja_svg_catalog.html.edge");
items.forEach(
(item) => {
/** @type {import("svgo").Config} */
// JSON.stringify & JSON.parse are used to create a deep copy of the
// item.svgo_opts object
const svgo_opts = JSON.parse(JSON.stringify(item.svgo_opts));
svgo_opts.plugins.push({
name: "addClassesToSVGElement",
params: {
classNames: [__jinja_class_placeholder__]
}}
);
try {
const raw = fs.readFileSync(item.src, "utf8");
const opt = svgo(raw, svgo_opts);
svg_catalog[item.name] = opt.data;
} catch (err) {
console.error(`ERROR: jinja_svg_catalog processing ${item.name} src: ${item.src} -- ${err}`);
throw(err);
}
}
);
fs.mkdir(dirname(dest), { recursive: true }, (err) => {
if (err) throw err;
});
const ctx = {
svg_catalog: svg_catalog,
macros: macros,
edge_template: edge_template,
__jinja_class_placeholder__: __jinja_class_placeholder__,
// see https://github.com/edge-js/edge/issues/162
open_curly_brace : "{{",
close_curly_brace : "}}"
};
const jinjatmpl = Edge.create().renderRawSync(
fs.readFileSync(edge_template, "utf-8"),
ctx
);
fs.writeFileSync(dest, jinjatmpl);
console.log(`[jinja_svg_catalog] created: ${dest}`);
}
/**
* Calls jinja_svg_catalog for a collection of icon sets where each set has its
* own parameters.
*
* @param {string} dest - filename of the generate jinja template.
* @param {JinjaMacro} macros - Jinja macros to create.
* @param {IconSet[]} sets - Array of SVG sets.
*/
function jinja_svg_sets(dest, macros, sets) {
/** @type IconSVG[] */
const items = [];
const all = [];
for (const obj of sets) {
for (const [name, file] of Object.entries(obj.set)) {
if (all.includes(name)) {
throw new Error(`ERROR: ${name} has already been defined`);
}
items.push({
name: name,
src: resolve(obj.base, file),
svgo_opts: obj.svgo_opts,
});
}
jinja_svg_catalog(dest, macros, items);
}
}
// -- exports
export {
jinja_svg_sets,
jinja_svg_catalog,
};

View file

@ -0,0 +1,41 @@
/**
* Custom vite plugins to build the web-client components of the simple theme.
*
* HINT:
*
* This is an inital implementation for the migration of the build process
* from grunt to vite. For fully support (vite: build & serve) more work is
* needed.
*/
import { svg2png } from "./img.js";
import { svg2svg } from "./img.js";
/**
* Vite plugin to convert a list of SVG files to PNG.
*
* @param {import('./img.js').Src2Dest} items - Array of SVG files (src: SVG, dest:PNG) to convert.
*/
function plg_svg2png(items) {
return {
name: 'searxng-simple-svg2png',
apply: 'build', // or 'serve'
async writeBundle() { svg2png(items); },
};
}
/**
* Vite plugin to optimize SVG images for WEB.
*
* @param {import('svgo').Config} svgo_opts - Options passed to svgo.
* @param {import('./img.js').Src2Dest} items - Array of SVG files (src:SVG, dest:SVG) to optimize.
*/
function plg_svg2svg(svgo_opts, items) {
return {
name: 'searxng-simple-svg2png',
apply: 'build', // or 'serve'
async writeBundle() { svg2svg(items, svgo_opts); },
};
}
export { plg_svg2png, plg_svg2svg };

View file

@ -0,0 +1,185 @@
/**
* CONFIG: https://vite.dev/config/
*/
import { resolve } from "node:path";
import { defineConfig } from "vite";
import stylelint from "vite-plugin-stylelint";
import { viteStaticCopy } from "vite-plugin-static-copy";
import { plg_svg2png } from "./tools/plg.js";
import { plg_svg2svg } from "./tools/plg.js";
const ROOT = "../.."; // root of the git reposetory
const PATH = {
dist: resolve(ROOT, "searx/static/themes/simple"),
// dist: resolve(ROOT, "client/simple/dist"),
src: "src",
modules: "node_modules",
brand: "src/brand",
static: resolve(ROOT, "client/simple/static"),
leaflet: resolve(ROOT, "client/simple/node_modules/leaflet/dist"),
templates: resolve(ROOT, "searx/templates/simple"),
};
const svg2svg_opts = {
plugins: [
{ name: "preset-default" },
"sortAttrs",
"convertStyleToAttrs",
]
};
const svg2svg_favicon_opts = {
plugins: [
{ name: "preset-default" },
"sortAttrs",
]
};
export default defineConfig({
root: PATH.src,
mode: "production",
// mode: "development",
// FIXME: missing CCS sourcemaps!!
// see: https://github.com/vitejs/vite/discussions/13845#discussioncomment-11992084
//
// what I have tried so far (see config below):
//
// - build.sourcemap
// - esbuild.sourcemap
// - css.preprocessorOptions.less.sourceMap
css: {
devSourcemap: true,
preprocessorOptions: {
less: {
// FIXME: missing CCS sourcemaps!!
sourceMap: {
outputSourceFiles: true,
sourceMapURL: (name) => { const s = name.split('/'); return s[s.length - 1] + '.map'; },
},
// env: 'development',
// relativeUrls: true,
// javascriptEnabled: true,
},
},
}, // end: css
esbuild : {
// FIXME: missing CCS sourcemaps!!
sourcemap: true
},
build: {
manifest: "manifest.json",
emptyOutDir: true,
assetsDir: "",
outDir: PATH.dist,
// FIXME: missing CCS sourcemaps!!
sourcemap: true,
// https://vite.dev/config/build-options.html#build-cssminify
cssMinify: true,
// cssMinify: "esbuild",
minify: "esbuild",
rollupOptions: {
input: {
// build CSS files
"css/searxng.min.css": PATH.src + "/less/style-ltr.less",
"css/searxng-rtl.min.css": PATH.src + "/less/style-rtl.less",
"css/rss.min.css": PATH.src + "/less/rss.less",
// build JS files
"js/searxng.head.min": PATH.src + "/js/searxng.head.js",
"js/searxng.min": PATH.src + "/js/searxng.js",
},
// file naming conventions / pathnames are relative to outDir (PATH.dist)
output: {
entryFileNames: "[name].js",
chunkFileNames: "[name].js",
assetFileNames: "[name].[ext]",
// Vite does not support "rollupOptions.output.sourcemap".
// Please use "build.sourcemap" instead.
// sourcemap: true,
},
},
}, // end: build
plugins: [
stylelint({
build: true,
emitWarningAsError: true,
fix: true,
}),
// Leaflet
viteStaticCopy({
targets: [
{ src: PATH.leaflet + "/leaflet.{js,js.map}", dest: PATH.dist + "/js" },
{ src: PATH.leaflet + "/images/*.png", dest: PATH.dist + "/css/images/" },
{ src: PATH.leaflet + "/*.{css,css.map}", dest: PATH.dist + "/css" },
{ src: PATH.static + "/**/*", dest: PATH.dist },
]
}),
// -- svg images
plg_svg2svg(
[
{ src: PATH.src + "/svg/empty_favicon.svg", dest: PATH.dist + "/img/empty_favicon.svg" },
{ src: PATH.src + "/svg/select-dark.svg", dest: PATH.dist + "/img/select-dark.svg" },
{ src: PATH.src + "/svg/select-light.svg", dest: PATH.dist + "/img/select-light.svg" },
],
svg2svg_opts,
),
// SearXNG brand (static)
plg_svg2png(
[
{ src: PATH.brand + "/searxng-wordmark.svg", dest: PATH.dist + "/img/favicon.png" },
{ src: PATH.brand + "/searxng.svg", dest: PATH.dist + "/img/searxng.png" },
],
),
// -- svg
plg_svg2svg(
[
{ src: PATH.brand + "/searxng.svg", dest: PATH.dist + "/img/searxng.svg" },
{ src: PATH.brand + "/img_load_error.svg", dest: PATH.dist + "/img/img_load_error.svg" },
],
svg2svg_opts,
),
// -- favicon
plg_svg2svg(
[ { src: PATH.brand + "/searxng-wordmark.svg", dest: PATH.dist + "/img/favicon.svg" } ],
svg2svg_favicon_opts,
),
// -- simple templates
plg_svg2svg(
[
{ src: PATH.brand + "/searxng-wordmark.svg", dest: PATH.templates + "/searxng-wordmark.min.svg" },
],
svg2svg_opts
),
] // end: plugins
});

65
container/Dockerfile Normal file
View file

@ -0,0 +1,65 @@
FROM ghcr.io/searxng/base:searxng-builder AS builder
COPY ./requirements.txt ./requirements.txt
RUN --mount=type=cache,id=pip,target=/root/.cache/pip python -m venv ./venv \
&& . ./venv/bin/activate \
&& pip install -r requirements.txt \
&& pip install "uwsgi~=2.0"
COPY ./searx/ ./searx/
ARG TIMESTAMP_SETTINGS="0"
RUN python -m compileall -q searx \
&& touch -c --date=@$TIMESTAMP_SETTINGS ./searx/settings.yml \
&& find ./searx/static \
\( -name "*.html" -o -name "*.css" -o -name "*.js" -o -name "*.svg" -o -name "*.ttf" -o -name "*.eot" \) \
-type f -exec gzip -9 -k {} + -exec brotli --best {} +
FROM ghcr.io/searxng/base:searxng AS dist
ARG LABEL_DATE="0001-01-01T00:00:00Z"
ARG GIT_URL="unspecified"
ARG SEARXNG_GIT_VERSION="unspecified"
ARG LABEL_VCS_REF="unspecified"
ARG LABEL_VCS_URL="unspecified"
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/venv/ ./venv/
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/searx/ ./searx/
COPY --chown=searxng:searxng ./container/config/ ./.template/
COPY --chown=searxng:searxng ./container/entrypoint.sh ./entrypoint.sh
ARG TIMESTAMP_UWSGI="0"
RUN touch -c --date=@$TIMESTAMP_UWSGI ./.template/uwsgi.ini
LABEL org.opencontainers.image.authors="searxng <$GIT_URL>" \
org.opencontainers.image.created="$LABEL_DATE" \
org.opencontainers.image.description="A privacy-respecting, hackable metasearch engine" \
org.opencontainers.image.documentation="https://github.com/searxng/searxng-docker" \
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
org.opencontainers.image.revision="$LABEL_VCS_REF" \
org.opencontainers.image.source="$LABEL_VCS_URL" \
org.opencontainers.image.title="searxng" \
org.opencontainers.image.url="$LABEL_VCS_URL" \
org.opencontainers.image.version="$SEARXNG_GIT_VERSION"
ENV SEARXNG_VERSION="$SEARXNG_GIT_VERSION" \
INSTANCE_NAME="SearXNG" \
AUTOCOMPLETE="" \
BASE_URL="" \
BIND_ADDRESS="[::]:8080" \
SEARXNG_SETTINGS_PATH="$CONFIG_PATH/settings.yml" \
UWSGI_SETTINGS_PATH="$CONFIG_PATH/uwsgi.ini" \
UWSGI_WORKERS="%k" \
UWSGI_THREADS="4"
VOLUME $CONFIG_PATH
VOLUME $DATA_PATH
EXPOSE 8080
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1
ENTRYPOINT ["/usr/local/searxng/entrypoint.sh"]

View file

@ -0,0 +1,25 @@
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://packages.wolfi.dev/os
packages:
- wolfi-base
- build-base
- python-3.13-dev
- py3-pip
- brotli
entrypoint:
command: /bin/sh -l
work-dir: /usr/local/searxng/
environment:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
HISTFILE: /dev/null
archs:
- x86_64
- aarch64

61
container/base.yml Normal file
View file

@ -0,0 +1,61 @@
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://packages.wolfi.dev/os
packages:
- wolfi-baselayout
- ca-certificates-bundle
- busybox
- python-3.13
# healthcheck
- wget
# uwsgi
- mailcap
entrypoint:
command: /bin/sh -l
work-dir: /usr/local/searxng/
accounts:
groups:
- groupname: searxng
gid: 977
users:
- username: searxng
uid: 977
shell: /bin/ash
environment:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
HISTFILE: /dev/null
CONFIG_PATH: /etc/searxng
DATA_PATH: /var/cache/searxng
paths:
# Workdir
- path: /usr/local/searxng/
type: directory
uid: 977
gid: 977
permissions: 0o755
# Config volume
- path: /etc/searxng/
type: directory
uid: 977
gid: 977
permissions: 0o755
# Data volume
- path: /var/cache/searxng/
type: directory
uid: 977
gid: 977
permissions: 0o755
archs:
- x86_64
- aarch64

View file

@ -1,4 +1,8 @@
[uwsgi]
# Listening address
# default value: [::]:8080 (see Dockerfile)
http-socket = $(BIND_ADDRESS)
# Who will run the code
uid = searxng
gid = searxng
@ -17,7 +21,6 @@ chmod-socket = 666
# Plugin to use and interpreter config
single-interpreter = true
master = true
plugin = python3
lazy-apps = true
enable-threads = true
@ -48,7 +51,5 @@ die-on-term
# uwsgi serves the static files
static-map = /static=/usr/local/searxng/searx/static
# expires set to one day
static-expires = /* 86400
static-gzip-all = True
offload-threads = %k

166
container/entrypoint.sh Executable file
View file

@ -0,0 +1,166 @@
#!/bin/sh
# shellcheck shell=dash
set -u
check_file() {
local target="$1"
if [ ! -f "$target" ]; then
cat <<EOF
!!!
!!! ERROR
!!! "$target" is not a valid file, exiting...
!!!
EOF
exit 127
fi
}
check_directory() {
local target="$1"
if [ ! -d "$target" ]; then
cat <<EOF
!!!
!!! ERROR
!!! "$target" is not a valid directory, exiting...
!!!
EOF
exit 127
fi
}
setup_ownership() {
local target="$1"
local type="$2"
case "$type" in
file | directory) ;;
*)
cat <<EOF
!!!
!!! ERROR
!!! "$type" is not a valid type, exiting...
!!!
EOF
exit 1
;;
esac
if [ "$(stat -c %U:%G "$target")" != "searxng:searxng" ]; then
if [ "$(id -u)" -eq 0 ]; then
chown -R searxng:searxng "$target"
else
cat <<EOF
!!!
!!! WARNING
!!! "$target" $type is not owned by "searxng"
!!! This may cause issues when running SearXNG
!!!
!!! Run the container as root to fix this issue automatically
!!! Alternatively, you can chown the $type manually:
!!! $ chown -R searxng:searxng "$target"
!!!
EOF
fi
fi
}
# Apply envs to uwsgi.ini
setup_uwsgi() {
local timestamp
timestamp=$(stat -c %Y "$UWSGI_SETTINGS_PATH")
sed -i \
-e "s|workers = .*|workers = ${UWSGI_WORKERS:-%k}|g" \
-e "s|threads = .*|threads = ${UWSGI_THREADS:-4}|g" \
"$UWSGI_SETTINGS_PATH"
# Restore timestamp
touch -c -d "@$timestamp" "$UWSGI_SETTINGS_PATH"
}
# Apply envs to settings.yml
setup_searxng() {
local timestamp
timestamp=$(stat -c %Y "$SEARXNG_SETTINGS_PATH")
# Ensure trailing slash in BASE_URL
# https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion
export BASE_URL="${BASE_URL%/}/"
sed -i \
-e "s|base_url: false|base_url: ${BASE_URL:-false}|g" \
-e "s/instance_name: \"SearXNG\"/instance_name: \"${INSTANCE_NAME:-SearXNG}\"/g" \
-e "s/autocomplete: \"\"/autocomplete: \"${AUTOCOMPLETE:-}\"/g" \
-e "s/ultrasecretkey/$(head -c 24 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9')/g" \
"$SEARXNG_SETTINGS_PATH"
# Restore timestamp
touch -c -d "@$timestamp" "$SEARXNG_SETTINGS_PATH"
}
# Handle volume mounts
volume_handler() {
local target="$1"
# Check if it's a valid directory
check_directory "$target"
setup_ownership "$target" "directory"
}
# Handle configuration file updates
config_handler() {
local target="$1"
local template="$2"
local new_template_target="$target.new"
# Create/Update the configuration file
if [ -f "$target" ]; then
setup_ownership "$target" "file"
if [ "$template" -nt "$target" ]; then
cp -pfT "$template" "$new_template_target"
cat <<EOF
...
... INFORMATION
... Update available for "$target"
... It is recommended to update the configuration file to ensure proper functionality
...
... New version placed at "$new_template_target"
... Please review and merge changes
...
EOF
fi
else
cat <<EOF
...
... INFORMATION
... "$target" does not exist, creating from template...
...
EOF
cp -pfT "$template" "$target"
fi
# Check if it's a valid file
check_file "$target"
}
echo "SearXNG $SEARXNG_VERSION"
# Check for volume mounts
volume_handler "$CONFIG_PATH"
volume_handler "$DATA_PATH"
# Check for updates in files
config_handler "$UWSGI_SETTINGS_PATH" "/usr/local/searxng/.template/uwsgi.ini"
config_handler "$SEARXNG_SETTINGS_PATH" "/usr/local/searxng/searx/settings.yml"
# Update files
setup_uwsgi
setup_searxng
exec /usr/local/searxng/venv/bin/uwsgi --http-socket "$BIND_ADDRESS" "$UWSGI_SETTINGS_PATH"

107
container/legacy/Dockerfile Normal file
View file

@ -0,0 +1,107 @@
FROM docker.io/library/python:3.13-slim AS builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
brotli \
# lxml
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
# uwsgi
libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/local/searxng/
COPY ./requirements.txt ./requirements.txt
RUN --mount=type=cache,id=pip,target=/root/.cache/pip python -m venv ./venv \
&& . ./venv/bin/activate \
&& pip install -r requirements.txt \
&& pip install "uwsgi~=2.0"
COPY ./searx/ ./searx/
ARG TIMESTAMP_SETTINGS=0
RUN python -m compileall -q searx \
&& touch -c --date=@$TIMESTAMP_SETTINGS ./searx/settings.yml \
&& find /usr/local/searxng/searx/static \
\( -name '*.html' -o -name '*.css' -o -name '*.js' -o -name '*.svg' -o -name '*.ttf' -o -name '*.eot' \) \
-type f -exec gzip -9 -k {} + -exec brotli --best {} +
ARG SEARXNG_UID=977
ARG SEARXNG_GID=977
RUN grep -m1 root /etc/group > /tmp/.searxng.group \
&& grep -m1 root /etc/passwd > /tmp/.searxng.passwd \
&& echo "searxng:x:$SEARXNG_GID:" >> /tmp/.searxng.group \
&& echo "searxng:x:$SEARXNG_UID:$SEARXNG_GID:searxng:/usr/local/searxng:/bin/bash" >> /tmp/.searxng.passwd
FROM docker.io/library/python:3.13-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
# healthcheck
wget \
# lxml (ARMv7)
libxslt1.1 \
# uwsgi
libpcre3 \
libxml2 \
mailcap \
&& rm -rf /var/lib/apt/lists/*
COPY --chown=root:root --from=builder /tmp/.searxng.passwd /etc/passwd
COPY --chown=root:root --from=builder /tmp/.searxng.group /etc/group
ARG LABEL_DATE="0001-01-01T00:00:00Z"
ARG GIT_URL="unspecified"
ARG SEARXNG_GIT_VERSION="unspecified"
ARG LABEL_VCS_REF="unspecified"
ARG LABEL_VCS_URL="unspecified"
WORKDIR /usr/local/searxng/
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/venv/ ./venv/
COPY --chown=searxng:searxng --from=builder /usr/local/searxng/searx/ ./searx/
COPY --chown=searxng:searxng ./container/config/ ./.template/
COPY --chown=searxng:searxng ./container/entrypoint.sh ./entrypoint.sh
ARG TIMESTAMP_UWSGI="0"
RUN touch -c --date=@$TIMESTAMP_UWSGI ./.template/uwsgi.ini
LABEL org.opencontainers.image.authors="searxng <$GIT_URL>" \
org.opencontainers.image.created=$LABEL_DATE \
org.opencontainers.image.description="A privacy-respecting, hackable metasearch engine" \
org.opencontainers.image.documentation="https://github.com/searxng/searxng-docker" \
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
org.opencontainers.image.revision=$LABEL_VCS_REF \
org.opencontainers.image.source=$LABEL_VCS_URL \
org.opencontainers.image.title="searxng" \
org.opencontainers.image.url=$LABEL_VCS_URL \
org.opencontainers.image.version=$SEARXNG_GIT_VERSION
ENV CONFIG_PATH=/etc/searxng \
DATA_PATH=/var/cache/searxng
ENV SEARXNG_VERSION=$SEARXNG_GIT_VERSION \
INSTANCE_NAME=searxng \
AUTOCOMPLETE="" \
BASE_URL="" \
BIND_ADDRESS=[::]:8080 \
SEARXNG_SETTINGS_PATH=$CONFIG_PATH/settings.yml \
UWSGI_SETTINGS_PATH=$CONFIG_PATH/uwsgi.ini \
UWSGI_WORKERS=%k \
UWSGI_THREADS=4
VOLUME $CONFIG_PATH
VOLUME $DATA_PATH
EXPOSE 8080
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1
ENTRYPOINT ["/usr/local/searxng/entrypoint.sh"]

View file

@ -1,178 +0,0 @@
#!/bin/sh
help() {
cat <<EOF
Command line:
-h Display this help
-d Dry run to update the configuration files.
-f Always update on the configuration files (existing files are renamed with
the .old suffix). Without this option, the new configuration files are
copied with the .new suffix
Environment variables:
INSTANCE_NAME settings.yml : general.instance_name
AUTOCOMPLETE settings.yml : search.autocomplete
BASE_URL settings.yml : server.base_url
MORTY_URL settings.yml : result_proxy.url
MORTY_KEY settings.yml : result_proxy.key
BIND_ADDRESS uwsgi bind to the specified TCP socket using HTTP protocol.
Default value: ${DEFAULT_BIND_ADDRESS}
Volume:
/etc/searxng the docker entry point copies settings.yml and uwsgi.ini in
this directory (see the -f command line option)"
EOF
}
export DEFAULT_BIND_ADDRESS="0.0.0.0:8080"
export BIND_ADDRESS="${BIND_ADDRESS:-${DEFAULT_BIND_ADDRESS}}"
# Parse command line
FORCE_CONF_UPDATE=0
DRY_RUN=0
while getopts "fdh" option
do
case $option in
f) FORCE_CONF_UPDATE=1 ;;
d) DRY_RUN=1 ;;
h)
help
exit 0
;;
*)
echo "unknow option ${option}"
exit 42
;;
esac
done
get_searxng_version(){
su searxng -c \
'python3 -c "import six; import searx.version; six.print_(searx.version.VERSION_STRING)"' \
2>/dev/null
}
SEARXNG_VERSION="$(get_searxng_version)"
export SEARXNG_VERSION
echo "SearXNG version ${SEARXNG_VERSION}"
# helpers to update the configuration files
patch_uwsgi_settings() {
CONF="$1"
# update uwsg.ini
sed -i \
-e "s|workers = .*|workers = ${UWSGI_WORKERS:-%k}|g" \
-e "s|threads = .*|threads = ${UWSGI_THREADS:-4}|g" \
"${CONF}"
}
patch_searxng_settings() {
CONF="$1"
# Make sure that there is trailing slash at the end of BASE_URL
# see https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion
export BASE_URL="${BASE_URL%/}/"
# update settings.yml
sed -i \
-e "s|base_url: false|base_url: ${BASE_URL}|g" \
-e "s/instance_name: \"SearXNG\"/instance_name: \"${INSTANCE_NAME}\"/g" \
-e "s/autocomplete: \"\"/autocomplete: \"${AUTOCOMPLETE}\"/g" \
-e "s/ultrasecretkey/$(openssl rand -hex 32)/g" \
"${CONF}"
# Morty configuration
if [ -n "${MORTY_KEY}" ] && [ -n "${MORTY_URL}" ]; then
sed -i -e "s/image_proxy: false/image_proxy: true/g" \
"${CONF}"
cat >> "${CONF}" <<-EOF
# Morty configuration
result_proxy:
url: ${MORTY_URL}
key: !!binary "${MORTY_KEY}"
EOF
fi
}
update_conf() {
FORCE_CONF_UPDATE=$1
CONF="$2"
NEW_CONF="${2}.new"
OLD_CONF="${2}.old"
REF_CONF="$3"
PATCH_REF_CONF="$4"
if [ -f "${CONF}" ]; then
if [ "${REF_CONF}" -nt "${CONF}" ]; then
# There is a new version
if [ "$FORCE_CONF_UPDATE" -ne 0 ]; then
# Replace the current configuration
printf '⚠️ Automatically update %s to the new version\n' "${CONF}"
if [ ! -f "${OLD_CONF}" ]; then
printf 'The previous configuration is saved to %s\n' "${OLD_CONF}"
mv "${CONF}" "${OLD_CONF}"
fi
cp "${REF_CONF}" "${CONF}"
$PATCH_REF_CONF "${CONF}"
else
# Keep the current configuration
printf '⚠️ Check new version %s to make sure SearXNG is working properly\n' "${NEW_CONF}"
cp "${REF_CONF}" "${NEW_CONF}"
$PATCH_REF_CONF "${NEW_CONF}"
fi
else
printf 'Use existing %s\n' "${CONF}"
fi
else
printf 'Create %s\n' "${CONF}"
cp "${REF_CONF}" "${CONF}"
$PATCH_REF_CONF "${CONF}"
fi
}
# searx compatibility: copy /etc/searx/* to /etc/searxng/*
SEARX_CONF=0
if [ -f "/etc/searx/settings.yml" ]; then
if [ ! -f "${SEARXNG_SETTINGS_PATH}" ]; then
printf '⚠️ /etc/searx/settings.yml is copied to /etc/searxng\n'
cp "/etc/searx/settings.yml" "${SEARXNG_SETTINGS_PATH}"
fi
SEARX_CONF=1
fi
if [ -f "/etc/searx/uwsgi.ini" ]; then
printf '⚠️ /etc/searx/uwsgi.ini is ignored. Use the volume /etc/searxng\n'
SEARX_CONF=1
fi
if [ "$SEARX_CONF" -eq "1" ]; then
printf '⚠️ The deprecated volume /etc/searx is mounted. Please update your configuration to use /etc/searxng ⚠️\n'
cat << EOF > /etc/searx/deprecated_volume_read_me.txt
This Docker image uses the volume /etc/searxng
Update your configuration:
* remove uwsgi.ini (or very carefully update your existing uwsgi.ini using https://github.com/searxng/searxng/blob/master/dockerfiles/uwsgi.ini )
* mount /etc/searxng instead of /etc/searx
EOF
fi
# end of searx compatibility
# make sure there are uwsgi settings
update_conf "${FORCE_CONF_UPDATE}" "${UWSGI_SETTINGS_PATH}" "/usr/local/searxng/dockerfiles/uwsgi.ini" "patch_uwsgi_settings"
# make sure there are searxng settings
update_conf "${FORCE_CONF_UPDATE}" "${SEARXNG_SETTINGS_PATH}" "/usr/local/searxng/searx/settings.yml" "patch_searxng_settings"
# dry run (to update configuration files, then inspect them)
if [ $DRY_RUN -eq 1 ]; then
printf 'Dry run\n'
exit
fi
unset MORTY_KEY
# Start uwsgi
printf 'Listen on %s\n' "${BIND_ADDRESS}"
exec uwsgi --master --uid searxng --gid searxng --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"

View file

@ -6,7 +6,7 @@ digraph G {
browser [label="browser", shape=tab, fillcolor=aliceblue];
rp [label="reverse proxy"];
static [label="static files", shape=folder, href="url to configure static files", fillcolor=lightgray];
uwsgi [label="uwsgi", shape=parallelogram href="https://docs.searxng.org/utils/searx.sh.html"]
uwsgi [label="uwsgi", shape=parallelogram href="https://docs.searxng.org/utils/searxng.sh.html"]
redis [label="redis DB", shape=cylinder];
searxng1 [label="SearXNG #1", fontcolor=blue3];
searxng2 [label="SearXNG #2", fontcolor=blue3];

View file

@ -145,13 +145,6 @@ shell inside container
- `How to make bash scripts work in dash <http://mywiki.wooledge.org/Bashism>`_
- `Checking for Bashisms <https://dev.to/bowmanjd/writing-bash-scripts-that-are-not-only-bash-checking-for-bashisms-and-testing-with-dash-1bli>`_
Like in many other distributions, Alpine's `/bin/sh
<https://wiki.ubuntu.com/DashAsBinSh>`__ is :man:`dash`. Dash is meant to be
`POSIX-compliant <https://pubs.opengroup.org/onlinepubs/9699919799>`__.
Compared to debian, in the Alpine image :man:`bash` is not installed. The
:origin:`dockerfiles/docker-entrypoint.sh` script is checked *against dash*
(``make tests.shell``).
To open a shell inside the container:
.. code:: sh
@ -188,10 +181,10 @@ Command line
<https://docs.docker.com/engine/reference/run/#foreground>`__.
In the :origin:`Dockerfile` the ENTRYPOINT_ is defined as
:origin:`dockerfiles/docker-entrypoint.sh`
:origin:`container/entrypoint.sh`
.. code:: sh
docker run --rm -it searxng/searxng -h
.. program-output:: ../dockerfiles/docker-entrypoint.sh -h
.. program-output:: ../container/entrypoint.sh -h

View file

@ -96,7 +96,7 @@ Modify the ``/etc/searxng/settings.yml`` to your needs:
.. literalinclude:: ../../utils/templates/etc/searxng/settings.yml
:language: yaml
:end-before: # hostnames:
:end-before: # preferences:
To see the entire file jump to :origin:`utils/templates/etc/searxng/settings.yml`

View file

@ -1,16 +1,13 @@
.. _plugins generic:
.. _plugins admin:
===============
Plugins builtin
List of plugins
===============
.. sidebar:: Further reading ..
Further reading ..
- :ref:`dev plugin`
Configuration defaults (at built time):
:DO: Default on
- :ref:`SearXNG settings <settings plugins>`
- :ref:`dev plugin`
.. _configured plugins:
@ -22,18 +19,13 @@ Configuration defaults (at built time):
:widths: 3 1 9
* - Name
- DO
- Active
- Description
JS & CSS dependencies
{% for plg in plugins %}
{% for plgin in plugins %}
* - {{plgin.name}}
- {{(plgin.default_on and "y") or ""}}
- {{plgin.description}}
{% for dep in (plgin.js_dependencies + plgin.css_dependencies) %}
| ``{{dep}}`` {% endfor %}
* - {{plg.info.name}}
- {{(plg.active and "yes") or "no"}}
- {{plg.info.description}}
{% endfor %}

View file

@ -93,15 +93,13 @@ TOML_ configuration is created in the file ``/etc/searxng/favicons.toml``.
:py:obj:`cache.db_url <.FaviconCacheConfig.db_url>`:
The path to the (SQLite_) database file. The default path is in the `/tmp`_
folder, which is deleted on every reboot and is therefore unsuitable for a
production environment. The FHS_ provides the folder for the
application cache
production environment. The FHS_ provides the folder `/var/cache`_ for the
cache of applications, so a suitable storage location of SearXNG's caches is
folder ``/var/cache/searxng``.
The FHS_ provides the folder `/var/cache`_ for the cache of applications, so a
suitable storage location of SearXNG's caches is folder ``/var/cache/searxng``.
In container systems, a volume should be mounted for this folder and in a
standard installation (compare :ref:`create searxng user`), the folder must be
created and the user under which the SearXNG process is running must be given
write permission to this folder.
In a standard installation (compare :ref:`create searxng user`), the folder
must be created and the user under which the SearXNG process is running must
be given write permission to this folder.
.. code:: bash
@ -109,6 +107,10 @@ TOML_ configuration is created in the file ``/etc/searxng/favicons.toml``.
$ sudo chown root:searxng /var/cache/searxng/
$ sudo chmod g+w /var/cache/searxng/
In container systems, a volume should be mounted for this folder. Check
whether the process in the container has read/write access to the mounted
folder.
:py:obj:`cache.LIMIT_TOTAL_BYTES <.FaviconCacheConfig.LIMIT_TOTAL_BYTES>`:
Maximum of bytes stored in the cache of all blobs. The limit is only reached
at each maintenance interval after which the oldest BLOBs are deleted; the

View file

@ -13,7 +13,7 @@ Settings
:maxdepth: 2
settings
settings_engine
settings_engines
settings_brand
settings_general
settings_search
@ -22,6 +22,6 @@ Settings
settings_redis
settings_outgoing
settings_categories_as_tabs
settings_plugins

View file

@ -59,7 +59,7 @@ and can relied on the default configuration :origin:`searx/settings.yml` using:
use_default_settings: true
server:
secret_key: "ultrasecretkey" # change this!
bind_address: "0.0.0.0"
bind_address: "[::]"
``engines:``
With ``use_default_settings: true``, each settings can be override in a

View file

@ -1,14 +1,30 @@
.. _settings engine:
.. _settings engines:
===========
``engine:``
===========
============
``engines:``
============
.. sidebar:: Further reading ..
- :ref:`configured engines`
- :ref:`engines-dev`
In the section ``engines:`` is a list of the engines that are to be made
available in the instance. Each list entry is in turn a key/value mapping.
.. code:: yaml
engines:
- name: dummy.online
engine: dummy
..
- name: dummy.offline
engine: dummy-offline
..
..
In the code example below a *full fledged* example of a YAML setup from a dummy
engine is shown. Most of the options have a default value or even are optional.
@ -19,7 +35,7 @@ engine is shown. Most of the options have a default value or even are optional.
.. code:: yaml
- name: example engine
- name: example
engine: example
shortcut: demo
base_url: 'https://{language}.example.com/'
@ -132,6 +148,8 @@ engine is shown. Most of the options have a default value or even are optional.
``display_error_messages`` : default ``true``
When an engine returns an error, the message is displayed on the user interface.
.. _engine network:
``network`` : optional
Use the network configuration from another engine.
In addition, there are two default networks:
@ -241,4 +259,3 @@ Example configuration in settings.yml for a German and English speaker:
When searching, the default google engine will return German results and
"google english" will return English results.

View file

@ -16,8 +16,14 @@
open_metrics: ''
``debug`` : ``$SEARXNG_DEBUG``
Allow a more detailed log if you run SearXNG directly. Display *detailed* error
messages in the browser too, so this must be deactivated in production.
In debug mode, the server provides an interactive debugger, will reload when
code is changed and activates a verbose logging.
.. attention::
The debug setting is intended for local development server. Don't
activate debug (don't use a development server) when deploying to
production.
``donation_url`` :
Set value to ``true`` to use your own donation page written in the

View file

@ -43,7 +43,7 @@ Communication with search engines.
Global timeout of the requests made to others engines in seconds. A bigger
timeout will allow to wait for answers from slow engines, but in consequence
will slow SearXNG reactivity (the result page may take the time specified in the
timeout to load). Can be override by ``timeout`` in the :ref:`settings engine`.
timeout to load). Can be override by ``timeout`` in the :ref:`settings engines`.
``useragent_suffix`` :
Suffix to the user-agent SearXNG uses to send requests to others engines. If an
@ -105,6 +105,6 @@ Communication with search engines.
``using_tor_proxy`` :
Using tor proxy (``true``) or not (``false``) for all engines. The default is
``false`` and can be overwritten in the :ref:`settings engine`
``false`` and can be overwritten in the :ref:`settings engines`

View file

@ -0,0 +1,77 @@
.. _settings plugins:
============
``plugins:``
============
.. attention::
The ``enabled_plugins:`` section in SearXNG's settings no longer exists.
There is no longer a distinction between built-in and external plugin, all
plugins are registered via the settings in the ``plugins:`` section.
.. sidebar:: Further reading ..
- :ref:`plugins admin`
- :ref:`dev plugin`
In SearXNG, plugins can be registered in the :py:obj:`PluginStore
<searx.plugins.PluginStorage>` via a fully qualified class name.
A configuration (:py:obj:`PluginCfg <searx.plugins.PluginCfg>`) can be
transferred to the plugin, e.g. to activate it by default / *opt-in* or
*opt-out* from user's point of view.
Please note that some plugins, such as the :ref:`hostnames plugin` plugin,
require further configuration before they can be made available for selection.
built-in plugins
================
The built-in plugins are all located in the namespace `searx.plugins`.
.. code:: yaml
plugins:
searx.plugins.calculator.SXNGPlugin:
active: true
searx.plugins.hash_plugin.SXNGPlugin:
active: true
searx.plugins.self_info.SXNGPlugin:
active: true
searx.plugins.tracker_url_remover.SXNGPlugin:
active: true
searx.plugins.unit_converter.SXNGPlugin:
active: true
searx.plugins.ahmia_filter.SXNGPlugin:
active: true
searx.plugins.hostnames.SXNGPlugin:
active: true
searx.plugins.oa_doi_rewrite.SXNGPlugin:
active: false
searx.plugins.tor_check.SXNGPlugin:
active: false
.. _settings external_plugins:
external plugins
================
.. _Only show green hosted results:
https://github.com/return42/tgwf-searx-plugins/
SearXNG supports *external plugins* / there is no need to install one, SearXNG
runs out of the box.
- `Only show green hosted results`_
- ..

View file

@ -12,6 +12,7 @@
favicon_resolver: ""
default_lang: ""
ban_time_on_fail: 5
max_page: 0
max_ban_time_on_fail: 120
suspended_times:
SearxEngineAccessDenied: 86400
@ -33,14 +34,22 @@
``autocomplete``:
Existing autocomplete backends, leave blank to turn it off.
- ``360search``
- ``baidu``
- ``brave``
- ``dbpedia``
- ``duckduckgo``
- ``google``
- ``mwmbl``
- ``startpage``
- ``swisscows``
- ``naver``
- ``quark``
- ``qwant``
- ``seznam``
- ``sogou``
- ``stract``
- ``swisscows``
- ``wikipedia``
- ``yandex``
``favicon_resolver``:
To activate favicons in SearXNG's result list select a default
@ -49,11 +58,11 @@
``default_lang``:
Default search language - leave blank to detect from browser information or
use codes from :origin:`searx/languages.py`.
use codes from :origin:`searx/sxng_locales.py`.
``languages``:
List of available languages - leave unset to use all codes from
:origin:`searx/languages.py`. Otherwise list codes of available languages.
:origin:`searx/sxng_locales.py`. Otherwise list codes of available languages.
The ``all`` value is shown as the ``Default language`` in the user interface
(in most cases, it is meant to send the query without a language parameter ;
in some cases, it means the English language) Example:
@ -69,6 +78,11 @@
- fr
- fr-BE
``max_page``:
If engine supports paging, 0 means unlimited numbers of pages. The value
is only applied if the engine itself does not have a max value that is
lower than this one.
``ban_time_on_fail``:
Ban time in seconds after engine errors.

View file

@ -14,13 +14,14 @@
limiter: false
public_instance: false
image_proxy: false
method: "POST"
default_http_headers:
X-Content-Type-Options : nosniff
X-Download-Options : noopen
X-Robots-Tag : noindex, nofollow
Referrer-Policy : no-referrer
``base_url`` : ``$SEARXNG_URL``
``base_url`` : ``$SEARXNG_BASE_URL``
The base URL where SearXNG is deployed. Used to create correct inbound links.
``port`` & ``bind_address``: ``$SEARXNG_PORT`` & ``$SEARXNG_BIND_ADDRESS``
@ -28,6 +29,8 @@
directly using ``python searx/webapp.py``. Doesn't apply to a SearXNG
services running behind a proxy and using socket communications.
.. _server.secret_key:
``secret_key`` : ``$SEARXNG_SECRET``
Used for cryptography purpose.
@ -50,6 +53,11 @@
``image_proxy`` : ``$SEARXNG_IMAGE_PROXY``
Allow your instance of SearXNG of being able to proxy images. Uses memory space.
.. _method:
``method`` : ``$SEARXNG_METHOD``
Whether to use ``GET`` or ``POST`` HTTP method when searching.
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
``default_http_headers`` :

View file

@ -44,7 +44,7 @@
``center_alignment`` : default ``false``
When enabled, the results are centered instead of being in the left (or RTL)
side of the screen. This setting only affects the *desktop layout*
(:origin:`min-width: @tablet <searx/static/themes/simple/src/less/definitions.less>`)
(:origin:`min-width: @tablet <client/simple/src/less/definitions.less>`)
.. cache_url:

View file

@ -58,9 +58,6 @@ and then, to name just a few:
- Bot protection has been switched from filtron to SearXNG's :ref:`limiter
<limiter>`, this requires a :ref:`Redis <settings redis>` database.
- The image proxy morty is no longer needed, it has been replaced by the
:ref:`image proxy <image_proxy>` from SearXNG.
- To save bandwidth :ref:`cache busting <static_use_hash>` has been implemented.
To get in use, the ``static-expires`` needs to be set in the :ref:`uwsgi
setup`.
@ -71,12 +68,6 @@ examples show, this is not always enough, sometimes services have to be set up
or reconfigured and sometimes services that are no longer needed should be
uninstalled.
.. hint::
First of all: SearXNG is installed by the script :ref:`searxng.sh`. If you
have old filtron, morty or searx setup you should consider complete
uninstall/reinstall.
Here you will find a list of changes that affect the infrastructure. Please
check to what extent it is necessary to update your installations:
@ -85,39 +76,6 @@ check to what extent it is necessary to update your installations:
file manually.
remove obsolete services
------------------------
If your searx instance was installed *"Step by step"* or by the *"Installation
scripts"*, you need to undo the installation procedure completely. If you have
morty & filtron installed, it is recommended to uninstall these services also.
In case of scripts, to uninstall use the scripts from the origin you installed
searx from or try::
$ sudo -H ./utils/filtron.sh remove all
$ sudo -H ./utils/morty.sh remove all
$ sudo -H ./utils/searx.sh remove all
.. hint::
If you are migrate from searx take into account that the ``.config.sh`` is no
longer used.
If you upgrade from searx or from before :pull:`1332` has been merged and you
have filtron and/or morty installed, don't forget to remove HTTP sites.
Apache::
$ sudo -H ./utils/filtron.sh apache remove
$ sudo -H ./utils/morty.sh apache remove
nginx::
$ sudo -H ./utils/filtron.sh nginx remove
$ sudo -H ./utils/morty.sh nginx remove
Check after Installation
------------------------
@ -130,9 +88,6 @@ to see if there are some left overs. In this example there exists a *old*
SearXNG checks
--------------
ERROR: settings.yml in /etc/searx/ is deprecated, move file to folder /etc/searxng/
INFO: [OK] (old) account 'searx' does not exists
INFO: [OK] (old) account 'filtron' does not exists
INFO: [OK] (old) account 'morty' does not exists
...
INFO searx.redisdb : connecting to Redis db=0 path='/usr/local/searxng-redis/run/redis.sock'
INFO searx.redisdb : connected to Redis

View file

@ -54,7 +54,7 @@ searx.engines.load_engines(searx.settings['engines'])
jinja_contexts = {
'searx': {
'engines': searx.engines.engines,
'plugins': searx.plugins.plugins,
'plugins': searx.plugins.STORAGE,
'version': {
'node': os.getenv('NODE_MINIMUM_VERSION')
},
@ -127,11 +127,11 @@ extensions = [
"sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
'myst_parser', # https://www.sphinx-doc.org/en/master/usage/markdown.html
'notfound.extension', # https://github.com/readthedocs/sphinx-notfound-page
'sphinxcontrib.autodoc_pydantic', # https://github.com/mansenfranzen/autodoc_pydantic
]
# autodoc_typehints = "description"
autodoc_default_options = {
'member-order': 'groupwise',
'member-order': 'bysource',
}
myst_enable_extensions = [
@ -143,10 +143,10 @@ suppress_warnings = ['myst.domains']
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"babel" : ("https://babel.readthedocs.io/en/latest/", None),
"flask": ("https://flask.palletsprojects.com/", None),
"flask": ("https://flask.palletsprojects.com/en/stable/", None),
"flask_babel": ("https://python-babel.github.io/flask-babel/", None),
# "werkzeug": ("https://werkzeug.palletsprojects.com/", None),
"jinja": ("https://jinja.palletsprojects.com/", None),
"werkzeug": ("https://werkzeug.palletsprojects.com/en/stable/", None),
"jinja": ("https://jinja.palletsprojects.com/en/stable/", None),
"linuxdoc" : ("https://return42.github.io/linuxdoc/", None),
"sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
"redis": ('https://redis.readthedocs.io/en/stable/', None),
@ -161,7 +161,7 @@ issues_github_path = "searxng/searxng"
notfound_urls_prefix = '/'
sys.path.append(os.path.abspath('_themes'))
sys.path.insert(0, os.path.abspath("../utils/"))
sys.path.insert(0, os.path.abspath("../"))
html_theme_path = ['_themes']
html_theme = "searxng"
@ -197,7 +197,7 @@ html_sidebars = {
],
}
singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
html_logo = "../src/brand/searxng-wordmark.svg"
html_logo = "../client/simple/src/brand/searxng-wordmark.svg"
html_title = "SearXNG Documentation ({})".format(VERSION_STRING)
html_show_sourcelink = True

View file

@ -0,0 +1,11 @@
.. _builtin answerers:
==================
Built-in Answerers
==================
.. toctree::
:maxdepth: 1
random
statistics

View file

@ -0,0 +1,7 @@
.. _dev answerers:
====================
Answerer Development
====================
.. automodule:: searx.answerers

View file

@ -0,0 +1,9 @@
=========
Answerers
=========
.. toctree::
:maxdepth: 2
development
builtins

View file

@ -0,0 +1,8 @@
.. _answerer.random:
======
Random
======
.. autoclass:: searx.answerers.random.SXNGAnswerer
:members:

View file

@ -0,0 +1,8 @@
.. _answerer.statistics:
==========
Statistics
==========
.. autoclass:: searx.answerers.statistics.SXNGAnswerer
:members:

Some files were not shown because too many files have changed in this diff Show more