8 Commits

Author SHA1 Message Date
Markus Heiser
9371658531 [mod] typification of SearXNG: add new result type File
This PR adds a new result type: File

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

Class 'File' (singular) replaces template 'files.html' (plural).  The renaming
was carried out because there is only one file (singular) in a result. Not to be
confused with the category 'files' where in multiple results can exist.

As mentioned in issue [1], the class '.category-files' was removed from the CSS
and the stylesheet was adopted in result_types/file.less (there based on the
templates and no longer based on the category).

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

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-10-20 10:18:33 +02:00
Markus Heiser
81cbe0befe
[upd] pypi: Bump black from 24.3.0 to 25.9.0 (#5251)
In 25.1.0 [2] an old bug has been fixed: "Docstring formatting does not apply to
module docstrings" [3].

[1] https://github.com/psf/black/blob/main/CHANGES.md#2590
[2] https://github.com/psf/black/blob/main/CHANGES.md#2510
[3] https://github.com/psf/black/issues/4094

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-26 12:35:57 +02:00
Markus Heiser
7b6b772e34 [fix] wikicommons engine: remove HTML tags from result items
BTW: humanize filesize (Bytes) to KB, MB, GB ..

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-11-28 06:05:45 +01:00
Bnyro
78077126f2 [feat] wikimedia commons: support for videos, audio and other files 2024-05-04 06:23:04 +02:00
Markus Heiser
8205f170ff [mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11 14:55:38 +01:00
Bnyro
e76ab1a4b3 [refactor] images: add resolution, image format and filesize fields
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 16:22:37 +01:00
Markus Heiser
01be9e0e20 [fix] engine: wikicommons - don't quoute ':|' in URL parameters
From [1]: It seems to be because of [2] For some reason it gets url encoded
twice, resulting in

- ``filetype%253Abitmap%257Cdrawing+birds`` instead of
- ``filetype:bitmap%7Cdrawing+birds``

[1] https://github.com/searxng/searxng/issues/2707
[2] https://github.com/searxng/searxng/blob/master/searx/engines/wikicommons.py#L43

Closes: #2707
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-03 18:45:39 +02:00
Bnyro
9c4e9d3814 [feat] implementation of Wikimedia commons for images 2023-09-01 18:39:24 +02:00