Commit Graph

153 Commits (master)

Author SHA1 Message Date
Michael Ilsaas 5549d58de3 Add Solid Torrents engine 3 years ago
Alexandre Flament b8cd326464 Add searx_extra package
Split the utils directory into:
* searx_extra contains update scripts, standalone_searx.py
* utils contains the files to build and setup searx.
3 years ago
Markus Heiser d48e2e7b0b [enh] google scholar - python implementation of the engine
The old xpath configuration for google scholar did not work and is replaced by a
python implementation.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament 7c1847d5f2 [mod] add utils/fetch_external_bangs.py
Based on duckduckgo bangs
Store bangs on a trie to allow autocomplete (not in this commit)
3 years ago
Markus Heiser bc1be3f0e9 [enh] add engine MediathekViewWeb (API)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 8c45f1149d [hardening] github workflows - corrupted cache
aka: ensure that 'make test' works as expected

The cache contains a copy './local' which is - under some circumstance -
corrupted.  It is not possible to clear the cache [1] (see the top of the page).

Ensure that 'make test' works as expected [2] even if

- the python interpreter is missing
- the virtualenv exists but pyyaml is missing

To hardening when the workflow cache fails, this patch adds the new target
'travis.test' into the workflow.  This target probes to import a python module
'yaml'.  If this fails the virtualenv will be completely new build.

[1] https://github.com/actions/cache/issues/2#issuecomment-673493515
[2] https://github.com/searx/searx/pull/2517#discussion_r567240235

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 923b490022 [mod] add Makfile targets for search.checker.<engine_name>
To check all engines:

    make search.checker

To check a engine 'google news' replace space by underline:

    make search.checker.google_news

To see HTTP requests and more use SEARX_DEBUG:

    make SEARX_DEBUG=1 search.checker.google_news

To filter out HTTP redirects:

    make SEARX_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]"
    ...
    Engine google news                   Checking
    https://news.google.com:443 "GET /search?q=life&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0
    https://news.google.com:443 "GET /search?q=life&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None
    --
    https://news.google.com:443 "GET /search?q=computer&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0
    https://news.google.com:443 "GET /search?q=computer&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None
    --

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 89b3050b5c [fix] revise of the google-Video engine
This revise is based on the methods developed in the revise of the google engine
(see commit 410c2f9).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser baec54c492 [fix] revise of the google-news engine
This revise is based on the methods developed in the revise of the google engine
(see commit 410c2f9).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament f7e11fd722
Merge pull request #2459 from dalf/update-python
Update python
3 years ago
Alexandre Flament d54034a5e6 [mod] add Python 3.9 support 3 years ago
Markus Heiser 9485179064 [mod] move brand options from Makefile to settings.yml
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament 14c7cc0e11 [mod] Makefile: make CONTACT_URL optional 3 years ago
BBaoVanC 19fce74443
Add link to contact instance maintainer to footer of each page (#2391) 3 years ago
Alexandre Flament 9bc1856e2b [mod] themes: remove legacy, courgette and pix-art themes 3 years ago
Markus Heiser 6b0a896f01 [mod] digg - pylint searx/engines/digg.py
Eliminate redundant file names which are tested by test.pylint and ignored by
test.pep8

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Alexandre Flament 8aa2a7556a [enh] activate pylint
There are 3 invocations:
* one with the default .pylintrc file
* one for searx/engines with some disabled checks and some additional-builtins
* one for the all the code except the engines with some disabled checks
4 years ago
Markus Heiser c71d214b0c [refactor] deviantart - improve results and clean up source code
Devian's request and response forms has been changed.

- fixed title
- fixed time_range_dict to 'popular-*-***'
- use image from <noscript> if exists
- drop obsolete "http to https, remove domain sharding"
- use query URL https://www.deviantart.com/search/deviations?page=5&q=foo
- add searx/engines/deviantart.py to pylint check (test.pylint)

Error pattern::

    There DEBUG:searx:result: invalid title: {'url': 'https://www.deviantart.com/  ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
rachmadaniHaryono 5d015b58f7 new: test: ignored warning and errors 4 years ago
rachmadaniHaryono d422f60529 chg: test: Makefile pep8 test 4 years ago
Markus Heiser 4a15d675d5 [fix] make.run - use SEARX_DEBUG=1 instead of modifing settings.yml
Reloading webapp.py when a file is changed exit with error::

    $ make run
    ....
    INFO:werkzeug: * Detected change in 'searx/searx/engines/deviantart.py', reloading
    INFO:werkzeug: * Restarting with stat
    ERROR:searx:server.secret_key is not changed. Please use something else instead of ultrasecretkey.
    make: *** [Makefile:69: run] Error 1

Patch suggested by @dalf [1]

[1] https://github.com/searx/searx/issues/2278#issuecomment-719732579

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Alexandre Flament f204e4903d [fix] migration from github.com/asciimoo/searx to github.com/searx/searx : fix URLs 4 years ago
Alexandre Flament c2a6f14516 [fix] Update Sphinx package versions
* Update call to sphinx-autobuild (remove --poll -B options, add --open-browser)
* Upgrade the Sphinx and sphinx-tabs versions.
* utils/makefile.sphinx: remove the SPHINXVERS variable.
* utils/makefile.sphinx: remove the sphinx-doc and sphinx-live targets, Sphinx is already installed by the pyenvinstall target.
4 years ago
Marc Abonce Seguin c86504b47a fix utils/fetch_languages to work with new languages 4 years ago
Dalf 1022228d95 Drop Python 2 (1/n): remove unicode string and url_utils 4 years ago
Markus Heiser f14a7add31 Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme 4 years ago
Markus Heiser 4eab5cf854
Merge branch 'master' into gigablast 4 years ago
Markus Heiser ca1c3bd15d
Merge branch 'master' into csp-oscar-theme 4 years ago
Markus Heiser 15924bcb67 [fix] buildprocess of the docs by adding sphinx-doc-prebuilds target
The sphinx-doc-prebuilds is the single point of definition for prerequisites
each doc build needs

BTW: remove $(LXC_ENV_FOLDER) offset from BOOKS_FOLDER and DOCS_FOLDER path.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser d44b4eda64 [fix] gigablaste engine: switch from pep8 to pylint test
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 4954e56b69 [fix] Makefile: node.env is a prerequisite of lessc and grunt
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 2441e24288 Merge branch 'master' of https://github.com/asciimoo/searx into filtron 4 years ago
Markus Heiser fc89c698bd make test.pylint: do not run pylint checks in py2
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 565493b57d travis: use Makefile target travis.codecov to install codecov
fix travis build error [1]::

  The command "local/py3/bin/pip install codecov" failed and exited with 127

Use the correct pip (python environment) from build environment::

  $(PY_ENV_BIN)/python -m pip

[1] https://travis-ci.org/github/asciimoo/searx/jobs/669701405#L590

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 916d8a9e46 Merge branch 'master' of https://github.com/asciimoo/searx into filtron 4 years ago
Dalf d425e26e80 [fix] fix travis build 4 years ago
Markus Heiser 4e307edb2d docs: document Makefile setup and 'buildenv' (aka brand)
Add documentation of the Makefile environment (aka brand, buildenv), introduced
in PR #1900.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser e73abd9d8a Merge PR #1900 of https://github.com/asciimoo/searx into filtron 4 years ago
Markus Heiser 1ae39787c1 Makefile: rename target 'searx.brand' to 'buildenv'
And add 'buildenv' as an first order prerequisite to the main targets:

- install
- run
- docs
- docs-live
- project
- node.env
- docker
- test

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 3e4d022d04 [fix] make test.sh: fix various shellcheck error messages
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 5e2b161379 Makefile: marginal fix
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 0742c2504d build environment: add GIT_BRANCH variable
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 7b4cf2eb48 tooling box: simplify build enviroments
- no more need for a .config.mk
- docs: use searx.brands environment
- searx.sh, filtron.sh & morty.sh are sourcing utils/brand.env

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 65b22be1f4 Merge PR #1900 of https://github.com/asciimoo/searx into filtron
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 442b27ac1b bash: use build environment from Makefile
To Makefile target brand, add creation of bash environment in::

  utils/brand.env

In bash scripts (manage.sh) source env by::

  . utils/brand.env

manage.sh help: show GIT_URL and more environment

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 8a16903a1c make themes: rename 'style' targtes to 'themes' targets
style.legacy could be renamed themes.legacy : it actually builds the files for
the legacy theme, then themes.legacy can be a dependency of themes.  Same for
the other styles.*

Debatable: about style.bootstrap, same convention : theme.bootstrap (even it is
more a toolbox for the oscar theme).

So there is no need to add the missing make styles in the help target.

thanks @dalf:

- https://github.com/asciimoo/searx/pull/1900#discussion_r399160355

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 1075f58a72 test: move tests from manage.sh to Makefile
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser e7fbefa8bd build: move build styles from manage.sh to Makefile
To build all styles use:

  make styles

To build individual styles use one of:

  make style.legacy
  make style.courgette
  make style.pixart
  make style.bootstrap

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 00251d7c66 Makefile: add target 'useragents.update' to fetch versions of Firefox
Update searx/data/useragents.json with the most recent versions of Firefox.

BTW: add 'useragents.update' to 'project' target and clean up the Makefile and
remove it from the manage.sh script.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

closes: https://github.com/asciimoo/searx/issues/1882
4 years ago
Markus Heiser 3486613a19 brands: hardcode ISSUE_URL and some links on the about-page
A *brand* of searx is a fork which might have its own design and some special
functions which might bee reasonable in a special context.

In this sense, the fork might have its own documentation but not its own issue
tracker.  The *upstream* of a brand is always https://github.com/asciimoo from
where the brand-fork pulls the master branch regularly.  A fork which has its
own issue tracker is a spin-off and out of the scope of the searx project
itself.  The conclusion is:

- hard code ISSUE_URL (in the Makefile)
- always refer to DOCS_URL
- links in the about page refer to the *upstream* (searx project)
  except DOCS_URL
- "fork me on github" ribbons refer to the *upstream*

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 3381471933 brands: add ISSUE_URL
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser d471ec86dd Makefile: add target node.env - download & install npm dependencies
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 3dbade0aed [fix] brands: add GIT_URL variable to the docker build
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 757ebb5d9f [fix] brands: add variables from build env to grunt process
We have some variables in the build environment which are also needed in the
grunt process when building themes.  Theses variables are relavant if one
creates a fork with its own branding.  We treat these variables under the term
'brands'.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 04c687403e [fix] brands: add variables from build env to jinja templating
We have some variables in the build environment which are also needed in the
templating process.  Theses variables are relavant if one creates a fork with
its own branding.  We treat these variables under the term 'brands'.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 2d956696e9 docs: building (PDF) books / build user book
BTW: cleaned up Makefile target help

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 86e79488aa LXC: utils/makefile.lxc (inital) add /.lxcenv.mk to contaiiners
Get LXC environment when building make targets.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser f5f83b8a99 shellcheck: minor fixes to support all dsitros
checked with::

  sudo ./utils/lxc.sh cmd -- make test.sh

on ubu1804, ubu1910, fedora31 and archlinux.  All checks OK except:

ubu1604: uses shellcheck v0.3.7 (from 04/2015) which is no longer supported!

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser b1e90cff23 LXC: separate lxc-suite from lxc & improved command line.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 9f1cb7a943 Merge branch 'master' of https://github.com/asciimoo/searx into filtron 4 years ago
Markus Heiser c3e4753ce9 docs: generic documentation from the installation scripts
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 491cb95a1f utils/lxc.env: separate environment that is used in containers
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 40843fe95a searx/data/engines_languages.json: sort json file (no content change)
To get meaningfull diffs, the json file has to be sorted.  Before applying any
further content patch, the json file needs a inital sort (without changing any
content).

Sorted by::

  import sys, json

  with open('engines_languages.json') as f:
      j = json.load(f)

  with open('engines_languages.json', 'w') as f:
      json.dump(j, f, indent=2, sort_keys=True)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser d5917cc029 utils/lib.sh: make uWSGI installation available for all distros
support: ubuntu, debin, fedora, archlinux

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser f5d10abc7f Merge branch 'master' of https://github.com/asciimoo/searx into filtron 4 years ago
Markus Heiser 700574357a make test: bugfix, pyenvinstall is a prerequisite for the pylint test
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 4a94b4cca6 searx/testing.py: pylint & SPDX tag (no functional change)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 179be12732 preferences.py: pylint, SPDX tag & docstrings (no functional change)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 59e4026762 searx.sh: install settings at /etc/searx/settings.yml
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 7751b29559 LXC: add LXC tooling box (initial, WIP)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 79e1f837ef utils & Makefile: add .config.mk & .config.sh for searx brands
By isolating the environment of makefiles and bash scripts into .config.mk and
.config.sh it is simple to maintain searx brands by setting some central
environments.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 3cf31528f3 utils/searx.sh: add script to install isolated searx service (WIP)
WIP: written from scratch / linted but untested

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 4139c63d23 utils/filtron.sh: add script to install filtron middleware
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 28dacee288 utils: add lib.sh containing common shell script
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser bdf392093a build requirements: add a shell script static analysis tool
ShellCheck: https://github.com/koalaman/shellcheck

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser f09459b98a doc: describe Makefile targets
With the aim to simplify development cycles, started with PR #1756 a Makefile
based boilerplate was added.  This patch adds the missing developer
documentation.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 02d5173fb2 Makefile: remove trailing '/' from DOCS_URL
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 121f696460 Makefile: gh-pages: keep history of gh-branch intact (don't drop)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 0011890043 gh-pages - build docs & deploy on gh-pages branch
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser af2cae6d1d doc: make use of sphinx.ext.extlinks & sphinx.ext.intersphinx
- add sphinx extensions
- patch documentation to make use of

These modules help to simplify the reST markup of external references.  BTW it
helps to write more readable reST and form custom brands.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser ef85943e06 Makefile: add documentation build targets docs & docs-live
BTW:
- add build & dist folder to .gitignore
- justify indentation of build messages (makefile.python)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 796197db2d boilerplate: add pylint / WIP: balance linting with pylint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
5 years ago
Markus Heiser 7e572a2453 Makefile: add test.pep8 test.unit test.robot (from manage.sh)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
5 years ago
Markus Heiser b55a8004ed boilerplate: add inital Makefile with run & install targets
Add *Makefile* boilerplate useful for python projects.  All python tasks are
using a virtualenv from ./local/py3

$ make help
  run       - run developer instance
  install   - developer install (./local)
  uninstall - uninstall (./local)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
5 years ago
Adam Tauber 53979a7bf7 [mod] remove buildout/makefile infrastructure 8 years ago
Matej Cotman d4289222f2 fix: update buildout 9 years ago
Cqoicebordel d740e7384a New Theme, Pix-art.
First commit
9 years ago
Adam Tauber df9cf9d09b Merge branch 'rtl' of github.com:Cqoicebordel/searx 9 years ago
Cqoicebordel 14447a0761 Modify courgette theme and less it. 9 years ago
Adam Tauber 410dbc573b [enh] static content generalization 9 years ago
Adam Tauber 0d36dcbf4c [enh] pep8 check added to tests 10 years ago
Adam Tauber 8151585918 [fix] static file paths 10 years ago
Thomas Pointhuber e687f5c290 [enh][oscar_template] split js-files and compile them together 10 years ago
Thomas Pointhuber f4457da0a1 oscar template: using less to generate oscar.min.css 10 years ago
Thomas Pointhuber 841f1eedfc oscar template: generate bootstrap.min.css from source 10 years ago
Gabor Nagy 8810273010 Cover searx.utils 10 years ago
Matej Cotman 08eaffe245 add multi theming support 10 years ago
Thomas Pointhuber c8a1e0bda4 move *.less files into seperate directory 10 years ago
Thomas Pointhuber 425ec3b707 Using .less instead of .css
to generate the .css file from the .less file run: $make styles
10 years ago
asciimoo 852dfc77c6 [enh] configurable localization 10 years ago