Deploying to gh-pages from @ f7706a5c7f 🚀

This commit is contained in:
asciimoo 2021-04-23 17:02:01 +00:00
parent e900e35bc2
commit 14556c13eb
25 changed files with 495 additions and 358 deletions

4
.buildinfo Normal file
View File

@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 136e2f2a5b4be30afcaa05306b334941
tags: 645f666f9bcd5a90fca523b33c5a78b7

104
404.html
View File

@ -1 +1,103 @@
<html><head><META http-equiv='refresh' content='0;URL=index.html'></head></html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page Not Found &#8212; Searx Documentation (Searx-1.0.0.tex)</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/searx.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/tabs.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = './';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Page Not Found</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1 id="notfound">Page Not Found</h1>
<p>
The page you requested does not exist. You may have followed a bad
link, or the page may have been moved or removed.
<p>
Go to the <a href="index.html">overview</a> or
<a href="search.html">search</a>.
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/searx/searx">Source</a>
<li><a href="https://github.com/searx/searx/wiki">Wiki</a>
<li><a href="https://searx.space">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
<li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="index.html">Overview</a>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.5.4.
</div>
<script src="_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -15,8 +15,8 @@ generated and deployed at :docs:`github.io <.>`. For build prerequisites read
:ref:`docs build`. :ref:`docs build`.
The source files of Searx's documentation are located at :origin:`docs`. Sphinx The source files of Searx's documentation are located at :origin:`docs`. Sphinx
assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs-live assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs.live
<make docs-live>` to build HTML while editing. <make docs.live>` to build HTML while editing.
.. sidebar:: Further reading .. sidebar:: Further reading
@ -1276,13 +1276,12 @@ Templating
.. sidebar:: Build environment .. sidebar:: Build environment
All *generic-doc* tasks are running in the :ref:`build environment <make All *generic-doc* tasks are running in the :ref:`make install`.
pyenv>`.
Templating is suitable for documentation which is created generic at the build Templating is suitable for documentation which is created generic at the build
time. The sphinx-jinja_ extension evaluates jinja_ templates in the :ref:`build time. The sphinx-jinja_ extension evaluates jinja_ templates in the :ref:`make
environment <make pyenv>` (with searx modules installed). We use this e.g. to install` (with searx modules installed). We use this e.g. to build chapter:
build chapter: :ref:`engines generic`. Below the jinja directive from the :ref:`engines generic`. Below the jinja directive from the
:origin:`docs/admin/engines.rst` is shown: :origin:`docs/admin/engines.rst` is shown:
.. literalinclude:: ../admin/engines.rst .. literalinclude:: ../admin/engines.rst

View File

@ -49,9 +49,9 @@ Build docs
- dvisvgm_ - dvisvgm_
Most of the sphinx requirements are installed from :origin:`setup.py` and the Most of the sphinx requirements are installed from :origin:`setup.py` and the
docs can be build from scratch with ``make docs``. For better math and image docs can be build from scratch with ``make docs.html``. For better math and
processing additional packages are needed. The XeTeX_ needed not only for PDF image processing additional packages are needed. The XeTeX_ needed not only for
creation, its also needed for :ref:`math` when HTML output is build. PDF creation, its also needed for :ref:`math` when HTML output is build.
To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
as images (``sphinx.ext.imgmath`` extension). as images (``sphinx.ext.imgmath`` extension).
@ -64,7 +64,7 @@ to ``imgmath``:
:start-after: # sphinx.ext.imgmath setup :start-after: # sphinx.ext.imgmath setup
:end-before: # sphinx.ext.imgmath setup END :end-before: # sphinx.ext.imgmath setup END
If your docs build (``make docs``) shows warnings like this:: If your docs build (``make docs.html``) shows warnings like this::
WARNING: dot(1) not found, for better output quality install \ WARNING: dot(1) not found, for better output quality install \
graphviz from https://www.graphviz.org graphviz from https://www.graphviz.org

View File

@ -51,7 +51,7 @@ It's also possible to build searx from the embedded Dockerfile.
git clone https://github.com/searx/searx.git git clone https://github.com/searx/searx.git
cd searx cd searx
make docker make docker.build
Public instance Public instance

View File

@ -31,7 +31,7 @@ might fail in some aspects we should not overlook.
The environment in which we run all our development processes matters! The environment in which we run all our development processes matters!
The :ref:`makefile` and the :ref:`make pyenv` encapsulate a lot for us, but they The :ref:`makefile` and the :ref:`make install` encapsulate a lot for us, but they
do not have access to all prerequisites. For example, there may have do not have access to all prerequisites. For example, there may have
dependencies on packages that are installed on the developer's desktop, but dependencies on packages that are installed on the developer's desktop, but
usually are not preinstalled on a server or client system. Another examples usually are not preinstalled on a server or client system. Another examples
@ -356,7 +356,7 @@ daily usage:
.. code:: sh .. code:: sh
$ sudo -H ./utils/lxc.sh cmd searx-archlinux \ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
make docs make docs.html
.. _blog-lxcdev-202006 abstract: .. _blog-lxcdev-202006 abstract:
@ -407,7 +407,7 @@ To get remarks from the suite of the archlinux container we can use:
... ...
[searx-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx [searx-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx
[searx-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/ [searx-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/
[searx-archlinux] INFO: (eth0) docs-live: http://10.174.184.156:8080/ [searx-archlinux] INFO: (eth0) docs.live: http://10.174.184.156:8080/
[searx-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65] [searx-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65]
... ...

View File

@ -132,11 +132,11 @@ Here is an example which makes a complete rebuild:
.. code:: sh .. code:: sh
$ make docs-clean docs $ make docs.clean docs.html
... ...
The HTML pages are in dist/docs. The HTML pages are in dist/docs.
.. _make docs-live: .. _make docs.live:
live build live build
---------- ----------
@ -144,19 +144,19 @@ live build
.. _sphinx-autobuild: .. _sphinx-autobuild:
https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md
.. sidebar:: docs-clean .. sidebar:: docs.clean
It is recommended to assert a complete rebuild before deploying (use It is recommended to assert a complete rebuild before deploying (use
``docs-clean``). ``docs.clean``).
Live build is like WYSIWYG. If you want to edit the documentation, its Live build is like WYSIWYG. If you want to edit the documentation, its
recommended to use. The Makefile target ``docs-live`` builds the docs, opens recommended to use. The Makefile target ``docs.live`` builds the docs, opens
URL in your favorite browser and rebuilds every time a reST file has been URL in your favorite browser and rebuilds every time a reST file has been
changed. changed.
.. code:: sh .. code:: sh
$ make docs-live $ make docs.live
... ...
The HTML pages are in dist/docs. The HTML pages are in dist/docs.
... Serving on http://0.0.0.0:8000 ... Serving on http://0.0.0.0:8000
@ -169,7 +169,7 @@ argument. E.g to find and use a free port, use:
.. code:: sh .. code:: sh
$ SPHINXOPTS="--port 0" make docs-live $ SPHINXOPTS="--port 0" make docs.live
... ...
... Serving on http://0.0.0.0:50593 ... Serving on http://0.0.0.0:50593
... ...
@ -180,21 +180,10 @@ argument. E.g to find and use a free port, use:
deploy on github.io deploy on github.io
------------------- -------------------
To deploy documentation at :docs:`github.io <.>` use Makefile target To deploy documentation at :docs:`github.io <.>` use Makefile target :ref:`make
:ref:`make gh-pages`, which will builds the documentation, clones searx into a sub docs.gh-pages`, which builds the documentation and runs all the needed git add,
folder ``gh-pages``, cleans it, copies the doc build into and runs all the commit and push:
needed git add, commit and push:
.. code:: sh .. code:: sh
$ make docs-clean gh-pages $ make docs.clean docs.gh-pages
...
SPHINX docs --> file://<...>/dist/docs
The HTML pages are in dist/docs.
...
Cloning into 'gh-pages' ...
...
cd gh-pages; git checkout gh-pages >/dev/null
Switched to a new branch 'gh-pages'
...
doc available at --> https://searx.github.io/searx

View File

@ -1,33 +1,33 @@
.. _makefile: .. _makefile:
================ ========
Makefile Targets Makefile
================ ========
.. _gnu-make: https://www.gnu.org/software/make/manual/make.html#Introduction .. _gnu-make: https://www.gnu.org/software/make/manual/make.html#Introduction
.. sidebar:: build environment .. sidebar:: build environment
Before looking deeper at the targets, first read about :ref:`make pyenv`. Before looking deeper at the targets, first read about :ref:`make
install`.
To install system requirements follow :ref:`buildhosts`. To install system requirements follow :ref:`buildhosts`.
With the aim to simplify development cycles, started with :pull:`1756` a All relevant build tasks are implemented in :origin:`manage.sh` and for CI or
``Makefile`` based boilerplate was added. If you are not familiar with IDE integration a small ``Makefile`` wrapper is available. If you are not
Makefiles, we recommend to read gnu-make_ introduction. familiar with Makefiles, we recommend to read gnu-make_ introduction.
The usage is simple, just type ``make {target-name}`` to *build* a target. The usage is simple, just type ``make {target-name}`` to *build* a target.
Calling the ``help`` target gives a first overview (``make help``): Calling the ``help`` target gives a first overview (``make help``):
.. program-output:: bash -c "cd ..; make --no-print-directory help" .. program-output:: bash -c "cd ..; make --no-print-directory help"
.. contents:: Contents .. contents:: Contents
:depth: 2 :depth: 2
:local: :local:
:backlinks: entry :backlinks: entry
.. _make pyenv: .. _make install:
Python environment Python environment
================== ==================
@ -36,31 +36,42 @@ Python environment
``source ./local/py3/bin/activate`` ``source ./local/py3/bin/activate``
With Makefile we do no longer need to build up the virtualenv manually (as We do no longer need to build up the virtualenv manually. Jump into your git
described in the :ref:`devquickstart` guide). Jump into your git working tree working tree and release a ``make install`` to get a virtualenv with a
and release a ``make pyenv``: *developer install* of searx (:origin:`setup.py`). ::
.. code:: sh
$ cd ~/searx-clone $ cd ~/searx-clone
$ make pyenv $ make install
PYENV usage: source ./local/py3/bin/activate PYENV [virtualenv] installing ./requirements*.txt into local/py3
... ...
PYENV OK
PYENV [install] pip install -e 'searx[test]'
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
With target ``pyenv`` a development environment (aka virtualenv) was build up in If you release ``make install`` multiple times the installation will only
``./local/py3/``. To make a *developer install* of searx (:origin:`setup.py`) rebuild if the sha256 sum of the *requirement files* fails. With other words:
into this environment, use make target ``install``: the check fails if you edit the requirements listed in
:origin:`requirements-dev.txt` and :origin:`requirements.txt`). ::
.. code:: sh
$ make install $ make install
PYENV usage: source ./local/py3/bin/activate PYENV OK
PYENV using virtualenv from ./local/py3 PYENV [virtualenv] requirements.sha256 failed
PYENV install . [virtualenv] - 6cea6eb6def9e14a18bf32f8a3e... ./requirements-dev.txt
[virtualenv] - 471efef6c73558e391c3adb35f4... ./requirements.txt
You have never to think about intermediate targets like ``pyenv`` or ...
``install``, the ``Makefile`` chains them as requisites. Just run your main PYENV [virtualenv] installing ./requirements*.txt into local/py3
target. ...
PYENV OK
PYENV [install] pip install -e 'searx[test]'
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
.. sidebar:: drop environment .. sidebar:: drop environment
@ -68,10 +79,7 @@ target.
<make clean>` first. <make clean>` first.
If you think, something goes wrong with your ./local environment or you change If you think, something goes wrong with your ./local environment or you change
the :origin:`setup.py` file (or the requirements listed in the :origin:`setup.py` file, you have to call :ref:`make clean`.
:origin:`requirements-dev.txt` and :origin:`requirements.txt`), you have to call
:ref:`make clean`.
.. _make run: .. _make run:
@ -81,77 +89,44 @@ the :origin:`setup.py` file (or the requirements listed in
To get up a running a developer instance simply call ``make run``. This enables To get up a running a developer instance simply call ``make run``. This enables
*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py`` *debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
instance, disables *debug* option again and opens the URL in your favorite WEB instance, disables *debug* option again and opens the URL in your favorite WEB
browser (:man:`xdg-open`): browser (:man:`xdg-open`)::
.. code:: sh $ make run
PYENV OK
$ make run SEARX_DEBUG=1 ./manage.sh pyenv.cmd python ./searx/webapp.py
PYENV usage: source ./local/py3/bin/activate ...
PYENV install . INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
./local/py3/bin/python ./searx/webapp.py
...
INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
...
.. _make clean: .. _make clean:
``make clean`` ``make clean``
============== ==============
Drop all intermediate files, all builds, but keep sources untouched. Includes Drop all intermediate files, all builds, but keep sources untouched. Before
target ``pyclean`` which drops ./local environment. Before calling ``make calling ``make clean`` stop all processes using :ref:`make install`. ::
clean`` stop all processes using :ref:`make pyenv`.
.. code:: sh
$ make clean $ make clean
CLEAN pyclean CLEAN pyenv
CLEAN clean PYENV [virtualenv] drop ./local/py3
CLEAN docs -- ./build/docs ./dist/docs
CLEAN locally installed npm dependencies
CLEAN test stuff
CLEAN common files
.. _make docs: .. _make docs:
``make docs docs-live docs-clean`` ``make docs docs.autobuild docs.clean``
================================== =======================================
We describe the usage of the ``doc*`` targets in the :ref:`How to contribute / We describe the usage of the ``doc.*`` targets in the :ref:`How to contribute /
Documentation <contrib docs>` section. If you want to edit the documentation Documentation <contrib docs>` section. If you want to edit the documentation
read our :ref:`make docs-live` section. If you are working in your own brand, read our :ref:`make docs.live` section. If you are working in your own brand,
adjust your :ref:`settings global`. adjust your :ref:`settings global`.
.. _make books: .. _make docs.gh-pages:
``make books/{name}.html books/{name}.pdf`` ``make docs.gh-pages``
=========================================== ======================
.. _intersphinx: https://www.sphinx-doc.org/en/stable/ext/intersphinx.html
.. _XeTeX: https://tug.org/xetex/
.. sidebar:: info
To build PDF a XeTeX_ is needed, see :ref:`buildhosts`.
The ``books/{name}.*`` targets are building *books*. A *book* is a
sub-directory containing a ``conf.py`` file. One example is the user handbook
which can deployed separately (:origin:`docs/user/conf.py`). Such ``conf.py``
do inherit from :origin:`docs/conf.py` and overwrite values to fit *book's*
needs.
With the help of Intersphinx_ (:ref:`reST smart ref`) the links to searxs
documentation outside of the book will be bound by the object inventory of
``DOCS_URL``. Take into account that URLs will be picked from the inventary at
documentation's build time.
Use ``make docs-help`` to see which books available:
.. program-output:: bash -c "cd ..; make --no-print-directory docs-help"
:ellipsis: 0,-6
.. _make gh-pages:
``make gh-pages``
=================
To deploy on github.io first adjust your :ref:`settings global`. For any To deploy on github.io first adjust your :ref:`settings global`. For any
further read :ref:`deploy on github.io`. further read :ref:`deploy on github.io`.
@ -161,37 +136,66 @@ further read :ref:`deploy on github.io`.
``make test`` ``make test``
============= =============
Runs a series of tests: ``test.pep8``, ``test.unit``, ``test.robot`` and does Runs a series of tests: :ref:`make test.pylint`, ``test.pep8``, ``test.unit``
additional :ref:`pylint checks <make pylint>`. You can run tests selective, and ``test.robot``. You can run tests selective, e.g.::
e.g.:
.. code:: sh
$ make test.pep8 test.unit test.sh $ make test.pep8 test.unit test.sh
. ./local/py3/bin/activate; ./manage.sh pep8_check TEST test.pep8 OK
[!] Running pep8 check ...
. ./local/py3/bin/activate; ./manage.sh unit_tests TEST test.unit OK
[!] Running unit tests ...
TEST test.sh OK
.. _make pylint: .. _make test.sh:
``make pylint`` ``make test.sh``
=============== ================
:ref:`sh lint` / if you have changed some bash scripting run this test before
commit.
.. _make test.pylint:
``make test.pylint``
====================
.. _Pylint: https://www.pylint.org/ .. _Pylint: https://www.pylint.org/
Before commiting its recommend to do some (more) linting. Pylint_ is known as Pylint_ is known as one of the best source-code, bug and quality checker for the
one of the best source-code, bug and quality checker for the Python programming Python programming language. The pylint profile we use at searx project is
language. Pylint_ is not yet a quality gate within our searx project (like found in project's root folder :origin:`.pylintrc`.
:ref:`test.pep8 <make test>` it is), but Pylint_ can help to improve code
quality anyway. The pylint profile we use at searx project is found in
project's root folder :origin:`.pylintrc`.
Code quality is a ongoing process. Don't try to fix all messages from Pylint, .. _make search.checker:
run Pylint and check if your changed lines are bringing up new messages. If so,
fix it. By this, code quality gets incremental better and if there comes the ``search.checker.{engine name}``
day, the linting is balanced out, we might decide to add Pylint as a quality ================================
gate.
To check all engines::
make search.checker
To check a engine with whitespace in the name like *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
.. _3xx: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection
To filter out HTTP redirects (3xx_)::
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
--
``make pybuild`` ``make pybuild``
@ -200,9 +204,7 @@ gate.
.. _PyPi: https://pypi.org/ .. _PyPi: https://pypi.org/
.. _twine: https://twine.readthedocs.io/en/latest/ .. _twine: https://twine.readthedocs.io/en/latest/
Build Python packages in ``./dist/py``. Build Python packages in ``./dist/py``::
.. code:: sh
$ make pybuild $ make pybuild
... ...
@ -210,9 +212,11 @@ Build Python packages in ``./dist/py``.
running sdist running sdist
running egg_info running egg_info
... ...
$ ls ./dist/py/ running bdist_wheel
searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
To upload packages to PyPi_, there is also a ``upload-pypi`` target. It needs $ ls ./dist
twine_ to be installed. Since you are not the owner of :pypi:`searx` you will searx-0.18.0-py3-none-any.whl searx-0.18.0.tar.gz
never need the latter.
To upload packages to PyPi_, there is also a ``pypi.upload`` target (to test use
``pypi.upload.test``). Since you are not the owner of :pypi:`searx` you will
never need to upload.

View File

@ -15,8 +15,8 @@ generated and deployed at :docs:`github.io <.>`. For build prerequisites read
:ref:`docs build`. :ref:`docs build`.
The source files of Searx's documentation are located at :origin:`docs`. Sphinx The source files of Searx's documentation are located at :origin:`docs`. Sphinx
assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs-live assumes source files to be encoded in UTF-8 by defaul. Run :ref:`make docs.live
<make docs-live>` to build HTML while editing. <make docs.live>` to build HTML while editing.
.. sidebar:: Further reading .. sidebar:: Further reading
@ -1276,13 +1276,12 @@ Templating
.. sidebar:: Build environment .. sidebar:: Build environment
All *generic-doc* tasks are running in the :ref:`build environment <make All *generic-doc* tasks are running in the :ref:`make install`.
pyenv>`.
Templating is suitable for documentation which is created generic at the build Templating is suitable for documentation which is created generic at the build
time. The sphinx-jinja_ extension evaluates jinja_ templates in the :ref:`build time. The sphinx-jinja_ extension evaluates jinja_ templates in the :ref:`make
environment <make pyenv>` (with searx modules installed). We use this e.g. to install` (with searx modules installed). We use this e.g. to build chapter:
build chapter: :ref:`engines generic`. Below the jinja directive from the :ref:`engines generic`. Below the jinja directive from the
:origin:`docs/admin/engines.rst` is shown: :origin:`docs/admin/engines.rst` is shown:
.. literalinclude:: ../admin/engines.rst .. literalinclude:: ../admin/engines.rst

View File

@ -119,15 +119,15 @@ of coffee).::
To build (live) documentation inside a archlinux_ container:: To build (live) documentation inside a archlinux_ container::
sudo -H ./utils/lxc.sh cmd searx-archlinux make docs-clean docs-live sudo -H ./utils/lxc.sh cmd searx-archlinux make docs.clean docs.live
... ...
[I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080 [I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080
To get IP of the container and the port number *live docs* is listening:: To get IP of the container and the port number *live docs* is listening::
$ sudo ./utils/lxc.sh show suite | grep docs-live $ sudo ./utils/lxc.sh show suite | grep docs.live
... ...
[searx-archlinux] INFO: (eth0) docs-live: http://n.n.n.12:8080/ [searx-archlinux] INFO: (eth0) docs.live: http://n.n.n.12:8080/
.. _lxc.sh help: .. _lxc.sh help:

View File

@ -124,9 +124,9 @@ on build hosts (see <a class="reference internal" href="../utils/searx.sh.html#s
</ul> </ul>
</div> </div>
<p>Most of the sphinx requirements are installed from <a class="reference external" href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a> and the <p>Most of the sphinx requirements are installed from <a class="reference external" href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a> and the
docs can be build from scratch with <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code>. For better math and image docs can be build from scratch with <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.html</span></code>. For better math and
processing additional packages are needed. The <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> needed not only for PDF image processing additional packages are needed. The <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> needed not only for
creation, its also needed for <a class="reference internal" href="../dev/reST.html#math"><span class="std std-ref">Math equations</span></a> when HTML output is build.</p> PDF creation, its also needed for <a class="reference internal" href="../dev/reST.html#math"><span class="std std-ref">Math equations</span></a> when HTML output is build.</p>
<p>To be able to do <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/math.html#math-support" title="(in Sphinx v5.0.0+)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered <p>To be able to do <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/math.html#math-support" title="(in Sphinx v5.0.0+)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered
as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension).</p> as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension).</p>
<p>Here is the extract from the <a class="reference external" href="https://github.com/searx/searx/blob/master/docs/conf.py">git://docs/conf.py</a> file, setting math renderer <p>Here is the extract from the <a class="reference external" href="https://github.com/searx/searx/blob/master/docs/conf.py">git://docs/conf.py</a> file, setting math renderer
@ -136,7 +136,7 @@ to <code class="docutils literal notranslate"><span class="pre">imgmath</span></
<span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span> <span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span>
</pre></div> </pre></div>
</div> </div>
<p>If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code>) shows warnings like this:</p> <p>If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.html</span></code>) shows warnings like this:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>WARNING: dot(1) not found, for better output quality install \ <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>WARNING: dot(1) not found, for better output quality install \
graphviz from https://www.graphviz.org graphviz from https://www.graphviz.org
.. ..

View File

@ -106,7 +106,7 @@ Volume:
<p>Its also possible to build searx from the embedded Dockerfile.</p> <p>Its also possible to build searx from the embedded Dockerfile.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/searx/searx.git <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/searx/searx.git
<span class="nb">cd</span> searx <span class="nb">cd</span> searx
make docker make docker.build
</pre></div> </pre></div>
</div> </div>
</div> </div>

View File

@ -77,7 +77,7 @@ might fail in some aspects we should not overlook.</p>
<blockquote> <blockquote>
<div><p>The environment in which we run all our development processes matters!</p> <div><p>The environment in which we run all our development processes matters!</p>
</div></blockquote> </div></blockquote>
<p>The <a class="reference internal" href="../dev/makefile.html#makefile"><span class="std std-ref">Makefile Targets</span></a> and the <a class="reference internal" href="../dev/makefile.html#make-pyenv"><span class="std std-ref">Python environment</span></a> encapsulate a lot for us, but they <p>The <a class="reference internal" href="../dev/makefile.html#makefile"><span class="std std-ref">Makefile</span></a> and the <a class="reference internal" href="../dev/makefile.html#make-install"><span class="std std-ref">Python environment</span></a> encapsulate a lot for us, but they
do not have access to all prerequisites. For example, there may have do not have access to all prerequisites. For example, there may have
dependencies on packages that are installed on the developers desktop, but dependencies on packages that are installed on the developers desktop, but
usually are not preinstalled on a server or client system. Another examples usually are not preinstalled on a server or client system. Another examples
@ -301,7 +301,7 @@ daily usage:</p>
./utils/searx.sh inspect service ./utils/searx.sh inspect service
</pre></div> </pre></div>
</div> </div>
<p>Run <a class="reference internal" href="../dev/makefile.html#makefile"><span class="std std-ref">Makefile Targets</span></a>, e.g. to test inside the container:</p> <p>Run <a class="reference internal" href="../dev/makefile.html#makefile"><span class="std std-ref">Makefile</span></a>, e.g. to test inside the container:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh cmd searx-archlinux <span class="se">\</span> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh cmd searx-archlinux <span class="se">\</span>
make <span class="nb">test</span> make <span class="nb">test</span>
</pre></div> </pre></div>
@ -313,7 +313,7 @@ daily usage:</p>
</div> </div>
<p>To build the docs on a buildhost <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>:</p> <p>To build the docs on a buildhost <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh cmd searx-archlinux <span class="se">\</span> <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh cmd searx-archlinux <span class="se">\</span>
make docs make docs.html
</pre></div> </pre></div>
</div> </div>
</div></div> </div></div>
@ -348,7 +348,7 @@ $ systemctl restart uwsgi@searx
... ...
<span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx <span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx
<span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> morty: http://10.174.184.156:3000/ <span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> morty: http://10.174.184.156:3000/
<span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> docs-live: http://10.174.184.156:8080/ <span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> docs.live: http://10.174.184.156:8080/
<span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> IPv6: http://<span class="o">[</span>fd42:573b:e0b3:e97e:216:3eff:fea5:9b65<span class="o">]</span> <span class="o">[</span>searx-archlinux<span class="o">]</span> INFO: <span class="o">(</span>eth0<span class="o">)</span> IPv6: http://<span class="o">[</span>fd42:573b:e0b3:e97e:216:3eff:fea5:9b65<span class="o">]</span>
... ...
</pre></div> </pre></div>

View File

@ -159,9 +159,9 @@ code.</p></li>
</div> </div>
<p>The documentation is built using <a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a>. So in order to be able to generate <p>The documentation is built using <a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a>. So in order to be able to generate
the required files, you have to install it on your system. Much easier, use the required files, you have to install it on your system. Much easier, use
our <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile Targets</span></a>.</p> our <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile</span></a>.</p>
<p>Here is an example which makes a complete rebuild:</p> <p>Here is an example which makes a complete rebuild:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs-clean docs <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs.clean docs.html
... ...
The HTML pages are <span class="k">in</span> dist/docs. The HTML pages are <span class="k">in</span> dist/docs.
</pre></div> </pre></div>
@ -169,15 +169,15 @@ The HTML pages are <span class="k">in</span> dist/docs.
<div class="section" id="live-build"> <div class="section" id="live-build">
<span id="make-docs-live"></span><h3><a class="toc-backref" href="#id8">live build</a><a class="headerlink" href="#live-build" title="Permalink to this headline"></a></h3> <span id="make-docs-live"></span><h3><a class="toc-backref" href="#id8">live build</a><a class="headerlink" href="#live-build" title="Permalink to this headline"></a></h3>
<div class="sidebar"> <div class="sidebar">
<p class="sidebar-title">docs-clean</p> <p class="sidebar-title">docs.clean</p>
<p>It is recommended to assert a complete rebuild before deploying (use <p>It is recommended to assert a complete rebuild before deploying (use
<code class="docutils literal notranslate"><span class="pre">docs-clean</span></code>).</p> <code class="docutils literal notranslate"><span class="pre">docs.clean</span></code>).</p>
</div> </div>
<p>Live build is like WYSIWYG. If you want to edit the documentation, its <p>Live build is like WYSIWYG. If you want to edit the documentation, its
recommended to use. The Makefile target <code class="docutils literal notranslate"><span class="pre">docs-live</span></code> builds the docs, opens recommended to use. The Makefile target <code class="docutils literal notranslate"><span class="pre">docs.live</span></code> builds the docs, opens
URL in your favorite browser and rebuilds every time a reST file has been URL in your favorite browser and rebuilds every time a reST file has been
changed.</p> changed.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs-live <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs.live
... ...
The HTML pages are <span class="k">in</span> dist/docs. The HTML pages are <span class="k">in</span> dist/docs.
... Serving on http://0.0.0.0:8000 ... Serving on http://0.0.0.0:8000
@ -188,7 +188,7 @@ The HTML pages are <span class="k">in</span> dist/docs.
<code class="docutils literal notranslate"><span class="pre">$(SPHINXOPTS)</span></code> to pass arguments to the <a class="reference external" href="https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md">sphinx-autobuild</a> command. Except <code class="docutils literal notranslate"><span class="pre">$(SPHINXOPTS)</span></code> to pass arguments to the <a class="reference external" href="https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md">sphinx-autobuild</a> command. Except
option <code class="docutils literal notranslate"><span class="pre">--host</span></code> (which is always set to <code class="docutils literal notranslate"><span class="pre">0.0.0.0</span></code>) you can pass any option <code class="docutils literal notranslate"><span class="pre">--host</span></code> (which is always set to <code class="docutils literal notranslate"><span class="pre">0.0.0.0</span></code>) you can pass any
argument. E.g to find and use a free port, use:</p> argument. E.g to find and use a free port, use:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nv">SPHINXOPTS</span><span class="o">=</span><span class="s2">&quot;--port 0&quot;</span> make docs-live <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nv">SPHINXOPTS</span><span class="o">=</span><span class="s2">&quot;--port 0&quot;</span> make docs.live
... ...
... Serving on http://0.0.0.0:50593 ... Serving on http://0.0.0.0:50593
... ...
@ -197,21 +197,9 @@ argument. E.g to find and use a free port, use:</p>
</div> </div>
<div class="section" id="deploy-on-github-io"> <div class="section" id="deploy-on-github-io">
<span id="id2"></span><h3><a class="toc-backref" href="#id9">deploy on github.io</a><a class="headerlink" href="#deploy-on-github-io" title="Permalink to this headline"></a></h3> <span id="id2"></span><h3><a class="toc-backref" href="#id9">deploy on github.io</a><a class="headerlink" href="#deploy-on-github-io" title="Permalink to this headline"></a></h3>
<p>To deploy documentation at <a class="reference external" href="https://searx.github.io/searx/.">github.io</a> use Makefile target <p>To deploy documentation at <a class="reference external" href="https://searx.github.io/searx/.">github.io</a> use Makefile target <a class="reference internal" href="makefile.html#make-docs-gh-pages"><span class="std std-ref">make docs.gh-pages</span></a>, which builds the documentation and runs all the needed git add,
<a class="reference internal" href="makefile.html#make-gh-pages"><span class="std std-ref">make gh-pages</span></a>, which will builds the documentation, clones searx into a sub commit and push:</p>
folder <code class="docutils literal notranslate"><span class="pre">gh-pages</span></code>, cleans it, copies the doc build into and runs all the <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs.clean docs.gh-pages
needed git add, commit and push:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make docs-clean gh-pages
...
SPHINX docs --&gt; file://&lt;...&gt;/dist/docs
The HTML pages are <span class="k">in</span> dist/docs.
...
Cloning into <span class="s1">&#39;gh-pages&#39;</span> ...
...
<span class="nb">cd</span> gh-pages<span class="p">;</span> git checkout gh-pages &gt;/dev/null
Switched to a new branch <span class="s1">&#39;gh-pages&#39;</span>
...
doc available at --&gt; https://searx.github.io/searx
</pre></div> </pre></div>
</div> </div>
</div> </div>

View File

@ -82,15 +82,16 @@
<li class="toctree-l2"><a class="reference internal" href="translation.html#update-translations">Update translations</a></li> <li class="toctree-l2"><a class="reference internal" href="translation.html#update-translations">Update translations</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="makefile.html">Makefile Targets</a><ul> <li class="toctree-l1"><a class="reference internal" href="makefile.html">Makefile</a><ul>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#python-environment">Python environment</a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#python-environment">Python environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-run"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#make-run"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#make-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-docs-docs-live-docs-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#make-docs-docs-autobuild-docs-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs.autobuild</span> <span class="pre">docs.clean</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-books-name-html-books-name-pdf"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">books/{name}.html</span> <span class="pre">books/{name}.pdf</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#make-docs-gh-pages"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-gh-pages"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-test"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#make-test"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-pylint"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#make-test-sh"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.sh</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-test-pylint"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#search-checker-engine-name"><code class="docutils literal notranslate"><span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-pybuild"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="makefile.html#make-pybuild"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></li>
</ul> </ul>
</li> </li>

View File

@ -6,7 +6,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Makefile Targets &#8212; Searx Documentation (Searx-1.0.0.tex)</title> <title>Makefile &#8212; Searx Documentation (Searx-1.0.0.tex)</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/searx.css" type="text/css" /> <link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/tabs.css" /> <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
@ -38,7 +38,7 @@
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li> <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Makefile Targets</a></li> <li class="nav-item nav-item-this"><a href="">Makefile</a></li>
</ul> </ul>
</div> </div>
@ -47,196 +47,248 @@
<div class="bodywrapper"> <div class="bodywrapper">
<div class="body" role="main"> <div class="body" role="main">
<div class="section" id="makefile-targets"> <div class="section" id="makefile">
<span id="makefile"></span><h1>Makefile Targets<a class="headerlink" href="#makefile-targets" title="Permalink to this headline"></a></h1> <span id="id1"></span><h1>Makefile<a class="headerlink" href="#makefile" title="Permalink to this headline"></a></h1>
<div class="sidebar"> <div class="sidebar">
<p class="sidebar-title">build environment</p> <p class="sidebar-title">build environment</p>
<p>Before looking deeper at the targets, first read about <a class="reference internal" href="#make-pyenv"><span class="std std-ref">Python environment</span></a>.</p> <p>Before looking deeper at the targets, first read about <a class="reference internal" href="#make-install"><span class="std std-ref">Python environment</span></a>.</p>
<p>To install system requirements follow <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>.</p> <p>To install system requirements follow <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>.</p>
</div> </div>
<p>With the aim to simplify development cycles, started with <a class="reference external" href="https://github.com/searx/searx/pull/1756">PR 1756</a> a <p>All relevant build tasks are implemented in <a class="reference external" href="https://github.com/searx/searx/blob/master/manage.sh">git://manage.sh</a> and for CI or
<code class="docutils literal notranslate"><span class="pre">Makefile</span></code> based boilerplate was added. If you are not familiar with IDE integration a small <code class="docutils literal notranslate"><span class="pre">Makefile</span></code> wrapper is available. If you are not
Makefiles, we recommend to read <a class="reference external" href="https://www.gnu.org/software/make/manual/make.html#Introduction">gnu-make</a> introduction.</p> familiar with Makefiles, we recommend to read <a class="reference external" href="https://www.gnu.org/software/make/manual/make.html#Introduction">gnu-make</a> introduction.</p>
<p>The usage is simple, just type <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">{target-name}</span></code> to <em>build</em> a target. <p>The usage is simple, just type <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">{target-name}</span></code> to <em>build</em> a target.
Calling the <code class="docutils literal notranslate"><span class="pre">help</span></code> target gives a first overview (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">help</span></code>):</p> Calling the <code class="docutils literal notranslate"><span class="pre">help</span></code> target gives a first overview (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">help</span></code>):</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span> test - run developer tests <div class="highlight-text notranslate"><div class="highlight"><pre><span></span>buildenv
docs - build documentation rebuild ./utils/brand.env
docs-live - autobuild HTML documentation while editing babel.compile
run - run developer instance pybabel compile ./searx/translations
install - developer install (./local) data.*
uninstall - uninstall (./local) all : update searx/languages.py and ./data/*
gh-pages - build docs &amp; deploy on gh-pages branch languages : update searx/data/engines_languages.json &amp; searx/languages.py
clean - drop builds and environments useragents: update searx/data/useragents.json with the most recent versions of Firefox.
project - re-build generic files of the searx project docs.*
buildenv - re-build environment files (aka brand) html : build HTML documentation
themes - re-build build the source of the themes live : autobuild HTML documentation while editing
docker - build Docker image gh-pages : deploy on gh-pages branch
node.env - download &amp; install npm dependencies locally prebuild : build reST include files (./build/docs/includes)
clean : clean documentation build
make V=0|1 [targets] 0 =&gt; quiet build (default), 1 =&gt; verbose build docker
make V=2 [targets] 2 =&gt; give reason for rebuild of target build : build docker image
push : build and push docker image
to get more help: make help-all gecko.driver
download &amp; install geckodriver if not already installed (required for
robot_tests)
node.*
env : download &amp; install npm dependencies locally
clean : drop npm installations
py.*
build : Build python packages at ./dist
clean : delete virtualenv and intermediate py files
pyenv.* :
install : developer install of searx into virtualenv
uninstall : uninstall developer installation
cmd ... : run command ... in virtualenv
OK : test if virtualenv is OK
pypi.upload:
Upload python packages to PyPi (to test use pypi.upload.test)
test.* :
pylint : lint PYLINT_FILES, searx/engines, searx &amp; tests
pep8 : pycodestyle (pep8) for all files except PYLINT_FILES
unit : run unit tests
coverage : run unit tests with coverage
robot : run robot test
clean : clean intermediate test stuff
themes.* :
all : build all themes
oscar : build oscar theme
simple : build simple theme
----
run - run developer instance
install - developer install of searx into virtualenv
uninstall - uninstall developer installation
clean - clean up working tree
search.checker - check search engines
test - run shell &amp; CI tests
test.sh - test shell scripts
ci.test - run CI tests
</pre></div> </pre></div>
</div> </div>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
<p class="topic-title">Contents</p> <p class="topic-title">Contents</p>
<ul class="simple"> <ul class="simple">
<li><p><a class="reference internal" href="#python-environment" id="id6">Python environment</a></p></li> <li><p><a class="reference internal" href="#python-environment" id="id8">Python environment</a></p></li>
<li><p><a class="reference internal" href="#make-run" id="id7"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></p></li> <li><p><a class="reference internal" href="#make-run" id="id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-clean" id="id8"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></p></li> <li><p><a class="reference internal" href="#make-clean" id="id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-docs-docs-live-docs-clean" id="id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a></p></li> <li><p><a class="reference internal" href="#make-docs-docs-autobuild-docs-clean" id="id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs.autobuild</span> <span class="pre">docs.clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-books-name-html-books-name-pdf" id="id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">books/{name}.html</span> <span class="pre">books/{name}.pdf</span></code></a></p></li> <li><p><a class="reference internal" href="#make-docs-gh-pages" id="id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-gh-pages" id="id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a></p></li> <li><p><a class="reference internal" href="#make-test" id="id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-test" id="id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p></li> <li><p><a class="reference internal" href="#make-test-sh" id="id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.sh</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pylint" id="id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a></p></li> <li><p><a class="reference internal" href="#make-test-pylint" id="id15"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pybuild" id="id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></p></li> <li><p><a class="reference internal" href="#search-checker-engine-name" id="id16"><code class="docutils literal notranslate"><span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pybuild" id="id17"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></p></li>
</ul> </ul>
</div> </div>
<div class="section" id="python-environment"> <div class="section" id="python-environment">
<span id="make-pyenv"></span><h2><a class="toc-backref" href="#id6">Python environment</a><a class="headerlink" href="#python-environment" title="Permalink to this headline"></a></h2> <span id="make-install"></span><h2><a class="toc-backref" href="#id8">Python environment</a><a class="headerlink" href="#python-environment" title="Permalink to this headline"></a></h2>
<div class="sidebar"> <div class="sidebar">
<p class="sidebar-title">activate environment</p> <p class="sidebar-title">activate environment</p>
<p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">./local/py3/bin/activate</span></code></p> <p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">./local/py3/bin/activate</span></code></p>
</div> </div>
<p>With Makefile we do no longer need to build up the virtualenv manually (as <p>We do no longer need to build up the virtualenv manually. Jump into your git
described in the <a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a> guide). Jump into your git working tree working tree and release a <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code> to get a virtualenv with a
and release a <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pyenv</span></code>:</p> <em>developer install</em> of searx (<a class="reference external" href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a>).</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> ~/searx-clone <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ cd ~/searx-clone
$ make pyenv $ make install
PYENV usage: <span class="nb">source</span> ./local/py3/bin/activate PYENV [virtualenv] installing ./requirements*.txt into local/py3
... ...
PYENV OK
PYENV [install] pip install -e &#39;searx[test]&#39;
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
</pre></div> </pre></div>
</div> </div>
<p>With target <code class="docutils literal notranslate"><span class="pre">pyenv</span></code> a development environment (aka virtualenv) was build up in <p>If you release <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code> multiple times the installation will only
<code class="docutils literal notranslate"><span class="pre">./local/py3/</span></code>. To make a <em>developer install</em> of searx (<a class="reference external" href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a>) rebuild if the sha256 sum of the <em>requirement files</em> fails. With other words:
into this environment, use make target <code class="docutils literal notranslate"><span class="pre">install</span></code>:</p> the check fails if you edit the requirements listed in
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make install <a class="reference external" href="https://github.com/searx/searx/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <a class="reference external" href="https://github.com/searx/searx/blob/master/requirements.txt">git://requirements.txt</a>).</p>
PYENV usage: <span class="nb">source</span> ./local/py3/bin/activate <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make install
PYENV using virtualenv from ./local/py3 PYENV OK
PYENV install . PYENV [virtualenv] requirements.sha256 failed
[virtualenv] - 6cea6eb6def9e14a18bf32f8a3e... ./requirements-dev.txt
[virtualenv] - 471efef6c73558e391c3adb35f4... ./requirements.txt
...
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV OK
PYENV [install] pip install -e &#39;searx[test]&#39;
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
</pre></div> </pre></div>
</div> </div>
<p>You have never to think about intermediate targets like <code class="docutils literal notranslate"><span class="pre">pyenv</span></code> or
<code class="docutils literal notranslate"><span class="pre">install</span></code>, the <code class="docutils literal notranslate"><span class="pre">Makefile</span></code> chains them as requisites. Just run your main
target.</p>
<div class="sidebar"> <div class="sidebar">
<p class="sidebar-title">drop environment</p> <p class="sidebar-title">drop environment</p>
<p>To get rid of the existing environment before re-build use <a class="reference internal" href="#make-clean"><span class="std std-ref">clean target</span></a> first.</p> <p>To get rid of the existing environment before re-build use <a class="reference internal" href="#make-clean"><span class="std std-ref">clean target</span></a> first.</p>
</div> </div>
<p>If you think, something goes wrong with your ./local environment or you change <p>If you think, something goes wrong with your ./local environment or you change
the <a class="reference external" href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a> file (or the requirements listed in the <a class="reference external" href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a> file, you have to call <a class="reference internal" href="#make-clean"><span class="std std-ref">make clean</span></a>.</p>
<a class="reference external" href="https://github.com/searx/searx/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <a class="reference external" href="https://github.com/searx/searx/blob/master/requirements.txt">git://requirements.txt</a>), you have to call
<a class="reference internal" href="#make-clean"><span class="std std-ref">make clean</span></a>.</p>
</div> </div>
<div class="section" id="make-run"> <div class="section" id="make-run">
<span id="id1"></span><h2><a class="toc-backref" href="#id7"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Permalink to this headline"></a></h2> <span id="id2"></span><h2><a class="toc-backref" href="#id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Permalink to this headline"></a></h2>
<p>To get up a running a developer instance simply call <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code>. This enables <p>To get up a running a developer instance simply call <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code>. This enables
<em>debug</em> option in <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>, starts a <code class="docutils literal notranslate"><span class="pre">./searx/webapp.py</span></code> <em>debug</em> option in <a class="reference external" href="https://github.com/searx/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>, starts a <code class="docutils literal notranslate"><span class="pre">./searx/webapp.py</span></code>
instance, disables <em>debug</em> option again and opens the URL in your favorite WEB instance, disables <em>debug</em> option again and opens the URL in your favorite WEB
browser (<a class="reference external" href="https://manpages.debian.org/jump?q=xdg-open">xdg-open</a>):</p> browser (<a class="reference external" href="https://manpages.debian.org/jump?q=xdg-open">xdg-open</a>):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make run <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make run
PYENV usage: <span class="nb">source</span> ./local/py3/bin/activate PYENV OK
PYENV install . SEARX_DEBUG=1 ./manage.sh pyenv.cmd python ./searx/webapp.py
./local/py3/bin/python ./searx/webapp.py
...
INFO:werkzeug: * Running on http://127.0.0.1:8888/ <span class="o">(</span>Press CTRL+C to quit<span class="o">)</span>
... ...
INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
</pre></div> </pre></div>
</div> </div>
</div> </div>
<div class="section" id="make-clean"> <div class="section" id="make-clean">
<span id="id2"></span><h2><a class="toc-backref" href="#id8"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Permalink to this headline"></a></h2> <span id="id3"></span><h2><a class="toc-backref" href="#id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Permalink to this headline"></a></h2>
<p>Drop all intermediate files, all builds, but keep sources untouched. Includes <p>Drop all intermediate files, all builds, but keep sources untouched. Before
target <code class="docutils literal notranslate"><span class="pre">pyclean</span></code> which drops ./local environment. Before calling <code class="docutils literal notranslate"><span class="pre">make</span> calling <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code> stop all processes using <a class="reference internal" href="#make-install"><span class="std std-ref">Python environment</span></a>.</p>
<span class="pre">clean</span></code> stop all processes using <a class="reference internal" href="#make-pyenv"><span class="std std-ref">Python environment</span></a>.</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make clean
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make clean CLEAN pyenv
CLEAN pyclean PYENV [virtualenv] drop ./local/py3
CLEAN clean CLEAN docs -- ./build/docs ./dist/docs
CLEAN locally installed npm dependencies
CLEAN test stuff
CLEAN common files
</pre></div> </pre></div>
</div> </div>
</div> </div>
<div class="section" id="make-docs-docs-live-docs-clean"> <div class="section" id="make-docs-docs-autobuild-docs-clean">
<span id="make-docs"></span><h2><a class="toc-backref" href="#id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a><a class="headerlink" href="#make-docs-docs-live-docs-clean" title="Permalink to this headline"></a></h2> <span id="make-docs"></span><h2><a class="toc-backref" href="#id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs.autobuild</span> <span class="pre">docs.clean</span></code></a><a class="headerlink" href="#make-docs-docs-autobuild-docs-clean" title="Permalink to this headline"></a></h2>
<p>We describe the usage of the <code class="docutils literal notranslate"><span class="pre">doc*</span></code> targets in the <a class="reference internal" href="contribution_guide.html#contrib-docs"><span class="std std-ref">How to contribute / <p>We describe the usage of the <code class="docutils literal notranslate"><span class="pre">doc.*</span></code> targets in the <a class="reference internal" href="contribution_guide.html#contrib-docs"><span class="std std-ref">How to contribute /
Documentation</span></a> section. If you want to edit the documentation Documentation</span></a> section. If you want to edit the documentation
read our <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">live build</span></a> section. If you are working in your own brand, read our <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">live build</span></a> section. If you are working in your own brand,
adjust your <a class="reference internal" href="../admin/settings.html#settings-global"><span class="std std-ref">Global Settings</span></a>.</p> adjust your <a class="reference internal" href="../admin/settings.html#settings-global"><span class="std std-ref">Global Settings</span></a>.</p>
</div> </div>
<div class="section" id="make-books-name-html-books-name-pdf"> <div class="section" id="make-docs-gh-pages">
<span id="make-books"></span><h2><a class="toc-backref" href="#id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">books/{name}.html</span> <span class="pre">books/{name}.pdf</span></code></a><a class="headerlink" href="#make-books-name-html-books-name-pdf" title="Permalink to this headline"></a></h2> <span id="id4"></span><h2><a class="toc-backref" href="#id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a><a class="headerlink" href="#make-docs-gh-pages" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">info</p>
<p>To build PDF a <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> is needed, see <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>.</p>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">books/{name}.*</span></code> targets are building <em>books</em>. A <em>book</em> is a
sub-directory containing a <code class="docutils literal notranslate"><span class="pre">conf.py</span></code> file. One example is the user handbook
which can deployed separately (<a class="reference external" href="https://github.com/searx/searx/blob/master/docs/user/conf.py">git://docs/user/conf.py</a>). Such <code class="docutils literal notranslate"><span class="pre">conf.py</span></code>
do inherit from <a class="reference external" href="https://github.com/searx/searx/blob/master/docs/conf.py">git://docs/conf.py</a> and overwrite values to fit <em>books</em>
needs.</p>
<p>With the help of <a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">Intersphinx</a> (<a class="reference internal" href="reST.html#rest-smart-ref"><span class="std std-ref">Smart refs</span></a>) the links to searxs
documentation outside of the book will be bound by the object inventory of
<code class="docutils literal notranslate"><span class="pre">DOCS_URL</span></code>. Take into account that URLs will be picked from the inventary at
documentations build time.</p>
<p>Use <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs-help</span></code> to see which books available:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>...
books/{name}.html : build only the HTML of document {name}
valid values for books/{name}.html are:
books/user.html
books/{name}.pdf : build only the PDF of document {name}
valid values for books/{name}.pdf are:
books/user.pdf
</pre></div>
</div>
</div>
<div class="section" id="make-gh-pages">
<span id="id3"></span><h2><a class="toc-backref" href="#id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a><a class="headerlink" href="#make-gh-pages" title="Permalink to this headline"></a></h2>
<p>To deploy on github.io first adjust your <a class="reference internal" href="../admin/settings.html#settings-global"><span class="std std-ref">Global Settings</span></a>. For any <p>To deploy on github.io first adjust your <a class="reference internal" href="../admin/settings.html#settings-global"><span class="std std-ref">Global Settings</span></a>. For any
further read <a class="reference internal" href="contribution_guide.html#deploy-on-github-io"><span class="std std-ref">deploy on github.io</span></a>.</p> further read <a class="reference internal" href="contribution_guide.html#deploy-on-github-io"><span class="std std-ref">deploy on github.io</span></a>.</p>
</div> </div>
<div class="section" id="make-test"> <div class="section" id="make-test">
<span id="id4"></span><h2><a class="toc-backref" href="#id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Permalink to this headline"></a></h2> <span id="id5"></span><h2><a class="toc-backref" href="#id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Permalink to this headline"></a></h2>
<p>Runs a series of tests: <code class="docutils literal notranslate"><span class="pre">test.pep8</span></code>, <code class="docutils literal notranslate"><span class="pre">test.unit</span></code>, <code class="docutils literal notranslate"><span class="pre">test.robot</span></code> and does <p>Runs a series of tests: <a class="reference internal" href="#make-test-pylint"><span class="std std-ref">make test.pylint</span></a>, <code class="docutils literal notranslate"><span class="pre">test.pep8</span></code>, <code class="docutils literal notranslate"><span class="pre">test.unit</span></code>
additional <a class="reference internal" href="#make-pylint"><span class="std std-ref">pylint checks</span></a>. You can run tests selective, and <code class="docutils literal notranslate"><span class="pre">test.robot</span></code>. You can run tests selective, e.g.:</p>
e.g.:</p> <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit test.sh
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit test.sh TEST test.pep8 OK
. ./local/py3/bin/activate<span class="p">;</span> ./manage.sh pep8_check ...
<span class="o">[</span>!<span class="o">]</span> Running pep8 check TEST test.unit OK
. ./local/py3/bin/activate<span class="p">;</span> ./manage.sh unit_tests ...
<span class="o">[</span>!<span class="o">]</span> Running unit tests TEST test.sh OK
</pre></div> </pre></div>
</div> </div>
</div> </div>
<div class="section" id="make-pylint"> <div class="section" id="make-test-sh">
<span id="id5"></span><h2><a class="toc-backref" href="#id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a><a class="headerlink" href="#make-pylint" title="Permalink to this headline"></a></h2> <span id="id6"></span><h2><a class="toc-backref" href="#id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.sh</span></code></a><a class="headerlink" href="#make-test-sh" title="Permalink to this headline"></a></h2>
<p>Before commiting its recommend to do some (more) linting. <a class="reference external" href="https://www.pylint.org/">Pylint</a> is known as <p><a class="reference internal" href="../admin/buildhosts.html#sh-lint"><span class="std std-ref">Lint shell scripts</span></a> / if you have changed some bash scripting run this test before
one of the best source-code, bug and quality checker for the Python programming commit.</p>
language. <a class="reference external" href="https://www.pylint.org/">Pylint</a> is not yet a quality gate within our searx project (like </div>
<a class="reference internal" href="#make-test"><span class="std std-ref">test.pep8</span></a> it is), but <a class="reference external" href="https://www.pylint.org/">Pylint</a> can help to improve code <div class="section" id="make-test-pylint">
quality anyway. The pylint profile we use at searx project is found in <span id="id7"></span><h2><a class="toc-backref" href="#id15"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a><a class="headerlink" href="#make-test-pylint" title="Permalink to this headline"></a></h2>
projects root folder <a class="reference external" href="https://github.com/searx/searx/blob/master/.pylintrc">git://.pylintrc</a>.</p> <p><a class="reference external" href="https://www.pylint.org/">Pylint</a> is known as one of the best source-code, bug and quality checker for the
<p>Code quality is a ongoing process. Dont try to fix all messages from Pylint, Python programming language. The pylint profile we use at searx project is
run Pylint and check if your changed lines are bringing up new messages. If so, found in projects root folder <a class="reference external" href="https://github.com/searx/searx/blob/master/.pylintrc">git://.pylintrc</a>.</p>
fix it. By this, code quality gets incremental better and if there comes the </div>
day, the linting is balanced out, we might decide to add Pylint as a quality <div class="section" id="search-checker-engine-name">
gate.</p> <span id="make-search-checker"></span><h2><a class="toc-backref" href="#id16"><code class="docutils literal notranslate"><span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a><a class="headerlink" href="#search-checker-engine-name" title="Permalink to this headline"></a></h2>
<p>To check all engines:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>make search.checker
</pre></div>
</div>
<p>To check a engine with whitespace in the name like <em>google news</em> replace space
by underline:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>make search.checker.google_news
</pre></div>
</div>
<p>To see HTTP requests and more use SEARX_DEBUG:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>make SEARX_DEBUG=1 search.checker.google_news
</pre></div>
</div>
<p>To filter out HTTP redirects (<a class="reference external" href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection">3xx</a>):</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>make SEARX_DEBUG=1 search.checker.google_news | grep -A1 &quot;HTTP/1.1\&quot; 3[0-9][0-9]&quot;
...
Engine google news Checking
https://news.google.com:443 &quot;GET /search?q=life&amp;hl=en&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US%3Aen&amp;gl=US HTTP/1.1&quot; 302 0
https://news.google.com:443 &quot;GET /search?q=life&amp;hl=en-US&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US:en&amp;gl=US HTTP/1.1&quot; 200 None
--
https://news.google.com:443 &quot;GET /search?q=computer&amp;hl=en&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US%3Aen&amp;gl=US HTTP/1.1&quot; 302 0
https://news.google.com:443 &quot;GET /search?q=computer&amp;hl=en-US&amp;lr=lang_en&amp;ie=utf8&amp;oe=utf8&amp;ceid=US:en&amp;gl=US HTTP/1.1&quot; 200 None
--
</pre></div>
</div>
</div> </div>
<div class="section" id="make-pybuild"> <div class="section" id="make-pybuild">
<h2><a class="toc-backref" href="#id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a><a class="headerlink" href="#make-pybuild" title="Permalink to this headline"></a></h2> <h2><a class="toc-backref" href="#id17"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a><a class="headerlink" href="#make-pybuild" title="Permalink to this headline"></a></h2>
<p>Build Python packages in <code class="docutils literal notranslate"><span class="pre">./dist/py</span></code>.</p> <p>Build Python packages in <code class="docutils literal notranslate"><span class="pre">./dist/py</span></code>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make pybuild <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make pybuild
... ...
BUILD pybuild BUILD pybuild
running sdist running sdist
running egg_info running egg_info
... ...
$ ls ./dist/py/ running bdist_wheel
searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
$ ls ./dist
searx-0.18.0-py3-none-any.whl searx-0.18.0.tar.gz
</pre></div> </pre></div>
</div> </div>
<p>To upload packages to <a class="reference external" href="https://pypi.org/">PyPi</a>, there is also a <code class="docutils literal notranslate"><span class="pre">upload-pypi</span></code> target. It needs <p>To upload packages to <a class="reference external" href="https://pypi.org/">PyPi</a>, there is also a <code class="docutils literal notranslate"><span class="pre">pypi.upload</span></code> target (to test use
<a class="reference external" href="https://twine.readthedocs.io/en/latest/">twine</a> to be installed. Since you are not the owner of <a class="reference external" href="https://pypi.org/project/searx">PyPi: searx</a> you will <code class="docutils literal notranslate"><span class="pre">pypi.upload.test</span></code>). Since you are not the owner of <a class="reference external" href="https://pypi.org/project/searx">PyPi: searx</a> you will
never need the latter.</p> never need to upload.</p>
</div> </div>
</div> </div>

View File

@ -17,7 +17,7 @@
<link rel="index" title="Index" href="../genindex.html" /> <link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" /> <link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Tooling box searx_extra for developers and users" href="../searx_extra/index.html" /> <link rel="next" title="Tooling box searx_extra for developers and users" href="../searx_extra/index.html" />
<link rel="prev" title="Makefile Targets" href="makefile.html" /> <link rel="prev" title="Makefile" href="makefile.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script> <script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body> </head><body>
@ -34,7 +34,7 @@
<a href="../searx_extra/index.html" title="Tooling box searx_extra for developers and users" <a href="../searx_extra/index.html" title="Tooling box searx_extra for developers and users"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="makefile.html" title="Makefile Targets" <a href="makefile.html" title="Makefile"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li> <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.0.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li> <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
@ -59,7 +59,7 @@ documentation, with the builders from the <a class="reference external" href="ht
generated and deployed at <a class="reference external" href="https://searx.github.io/searx/.">github.io</a>. For build prerequisites read generated and deployed at <a class="reference external" href="https://searx.github.io/searx/.">github.io</a>. For build prerequisites read
<a class="reference internal" href="../admin/buildhosts.html#docs-build"><span class="std std-ref">Build docs</span></a>.</p> <a class="reference internal" href="../admin/buildhosts.html#docs-build"><span class="std std-ref">Build docs</span></a>.</p>
<p>The source files of Searxs documentation are located at <a class="reference external" href="https://github.com/searx/searx/blob/master/docs">git://docs</a>. Sphinx <p>The source files of Searxs documentation are located at <a class="reference external" href="https://github.com/searx/searx/blob/master/docs">git://docs</a>. Sphinx
assumes source files to be encoded in UTF-8 by defaul. Run <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">make docs-live</span></a> to build HTML while editing.</p> assumes source files to be encoded in UTF-8 by defaul. Run <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">make docs.live</span></a> to build HTML while editing.</p>
<div class="sidebar"> <div class="sidebar">
<p class="sidebar-title">Further reading</p> <p class="sidebar-title">Further reading</p>
<ul class="simple"> <ul class="simple">
@ -1406,12 +1406,11 @@ kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p></td>
<h2><a class="toc-backref" href="#id49">Templating</a><a class="headerlink" href="#templating" title="Permalink to this headline"></a></h2> <h2><a class="toc-backref" href="#id49">Templating</a><a class="headerlink" href="#templating" title="Permalink to this headline"></a></h2>
<div class="sidebar"> <div class="sidebar">
<p class="sidebar-title">Build environment</p> <p class="sidebar-title">Build environment</p>
<p>All <em>generic-doc</em> tasks are running in the <a class="reference internal" href="makefile.html#make-pyenv"><span class="std std-ref">build environment</span></a>.</p> <p>All <em>generic-doc</em> tasks are running in the <a class="reference internal" href="makefile.html#make-install"><span class="std std-ref">Python environment</span></a>.</p>
</div> </div>
<p>Templating is suitable for documentation which is created generic at the build <p>Templating is suitable for documentation which is created generic at the build
time. The <a class="reference external" href="https://github.com/tardyp/sphinx-jinja">sphinx-jinja</a> extension evaluates <a class="reference external" href="https://jinja.palletsprojects.com/">jinja</a> templates in the <a class="reference internal" href="makefile.html#make-pyenv"><span class="std std-ref">build time. The <a class="reference external" href="https://github.com/tardyp/sphinx-jinja">sphinx-jinja</a> extension evaluates <a class="reference external" href="https://jinja.palletsprojects.com/">jinja</a> templates in the <a class="reference internal" href="makefile.html#make-install"><span class="std std-ref">Python environment</span></a> (with searx modules installed). We use this e.g. to build chapter:
environment</span></a> (with searx modules installed). We use this e.g. to <a class="reference internal" href="../admin/engines.html#engines-generic"><span class="std std-ref">General Engine Settings</span></a>. Below the jinja directive from the
build chapter: <a class="reference internal" href="../admin/engines.html#engines-generic"><span class="std std-ref">General Engine Settings</span></a>. Below the jinja directive from the
<a class="reference external" href="https://github.com/searx/searx/blob/master/docs/admin/engines.rst">git://docs/admin/engines.rst</a> is shown:</p> <a class="reference external" href="https://github.com/searx/searx/blob/master/docs/admin/engines.rst">git://docs/admin/engines.rst</a> is shown:</p>
<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">jinja</span><span class="p">::</span> searx <div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">jinja</span><span class="p">::</span> searx
@ -1586,7 +1585,7 @@ gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<ul> <ul>
<li><a href="index.html">Developer documentation</a> <li><a href="index.html">Developer documentation</a>
<ul> <ul>
<li>Previous: <a href="makefile.html" title="previous chapter">Makefile Targets</a> <li>Previous: <a href="makefile.html" title="previous chapter">Makefile</a>
<li>Next: <a href="../searx_extra/index.html" title="next chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">searx_extra</span></code> for developers and users</a></ul> <li>Next: <a href="../searx_extra/index.html" title="next chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">searx_extra</span></code> for developers and users</a></ul>
</li> </li>
</ul> </ul>

View File

@ -16,7 +16,7 @@
<script src="../_static/doctools.js"></script> <script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" /> <link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" /> <link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Makefile Targets" href="makefile.html" /> <link rel="next" title="Makefile" href="makefile.html" />
<link rel="prev" title="Plugins" href="plugins.html" /> <link rel="prev" title="Plugins" href="plugins.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script> <script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
@ -31,7 +31,7 @@
<a href="../py-modindex.html" title="Python Module Index" <a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li> >modules</a> |</li>
<li class="right" > <li class="right" >
<a href="makefile.html" title="Makefile Targets" <a href="makefile.html" title="Makefile"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="plugins.html" title="Plugins" <a href="plugins.html" title="Plugins"
@ -132,7 +132,7 @@ create a PR.</p>
<li><a href="index.html">Developer documentation</a> <li><a href="index.html">Developer documentation</a>
<ul> <ul>
<li>Previous: <a href="plugins.html" title="previous chapter">Plugins</a> <li>Previous: <a href="plugins.html" title="previous chapter">Plugins</a>
<li>Next: <a href="makefile.html" title="next chapter">Makefile Targets</a></ul> <li>Next: <a href="makefile.html" title="next chapter">Makefile</a></ul>
</li> </li>
</ul> </ul>
</li> </li>

View File

@ -99,7 +99,7 @@ digital rights</p></li>
<li class="toctree-l2"><a class="reference internal" href="dev/search_api.html">Search API</a></li> <li class="toctree-l2"><a class="reference internal" href="dev/search_api.html">Search API</a></li>
<li class="toctree-l2"><a class="reference internal" href="dev/plugins.html">Plugins</a></li> <li class="toctree-l2"><a class="reference internal" href="dev/plugins.html">Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="dev/translation.html">Translation</a></li> <li class="toctree-l2"><a class="reference internal" href="dev/translation.html">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="dev/makefile.html">Makefile Targets</a></li> <li class="toctree-l2"><a class="reference internal" href="dev/makefile.html">Makefile</a></li>
<li class="toctree-l2"><a class="reference internal" href="dev/reST.html">reST primer</a></li> <li class="toctree-l2"><a class="reference internal" href="dev/reST.html">reST primer</a></li>
</ul> </ul>
</li> </li>

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -184,18 +184,18 @@ inspect service
show service status and log show service status and log
option option
set one of the available options set one of the available options
apache (http://fv-az121-840/searx) apache (http://fv-az180-407/searx)
:install: apache site with a reverse proxy (ProxyPass) :install: apache site with a reverse proxy (ProxyPass)
:remove: apache site searx.conf :remove: apache site searx.conf
nginx (http://fv-az121-840/searx) nginx (http://fv-az180-407/searx)
:install: nginx site with a reverse proxy (ProxyPass) :install: nginx site with a reverse proxy (ProxyPass)
:remove: nginx site searx.conf :remove: nginx site searx.conf
filtron rules: /etc/filtron/rules.json filtron rules: /etc/filtron/rules.json
If needed, set PUBLIC_URL of your WEB service in the &#39;.config.sh&#39; file:: If needed, set PUBLIC_URL of your WEB service in the &#39;.config.sh&#39; file::
PUBLIC_URL : http://fv-az121-840/searx PUBLIC_URL : http://fv-az180-407/searx
PUBLIC_HOST : fv-az121-840 PUBLIC_HOST : fv-az180-407
SERVICE_USER : filtron SERVICE_USER : filtron
FILTRON_TARGET : 127.0.0.1:8888 FILTRON_TARGET : 127.0.0.1:8888
FILTRON_API : 127.0.0.1:4005 FILTRON_API : 127.0.0.1:4005

View File

@ -146,15 +146,15 @@ of coffee).:</p>
</pre></div> </pre></div>
</div> </div>
<p>To build (live) documentation inside a <a class="reference external" href="https://www.archlinux.org/">archlinux</a> container:</p> <p>To build (live) documentation inside a <a class="reference external" href="https://www.archlinux.org/">archlinux</a> container:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd searx-archlinux make docs-clean docs-live <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd searx-archlinux make docs.clean docs.live
... ...
[I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080 [I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080
</pre></div> </pre></div>
</div> </div>
<p>To get IP of the container and the port number <em>live docs</em> is listening:</p> <p>To get IP of the container and the port number <em>live docs</em> is listening:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo ./utils/lxc.sh show suite | grep docs-live <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo ./utils/lxc.sh show suite | grep docs.live
... ...
[searx-archlinux] INFO: (eth0) docs-live: http://n.n.n.12:8080/ [searx-archlinux] INFO: (eth0) docs.live: http://n.n.n.12:8080/
</pre></div> </pre></div>
</div> </div>
</div> </div>
@ -194,7 +194,7 @@ install
:base: prepare LXC; install basic packages :base: prepare LXC; install basic packages
:suite: install LXC searx suite into all (or &lt;name&gt;) containers :suite: install LXC searx suite into all (or &lt;name&gt;) containers
LXC suite: searx --&gt; http://fv-az121-840/searx LXC suite: searx --&gt; http://fv-az180-407/searx
suite includes searx, morty &amp; filtron suite includes searx, morty &amp; filtron
suite images: suite images:
ubu1804 ubu2004 ubu2010 fedora33 archlinux centos7 ubu1804 ubu2004 ubu2010 fedora33 archlinux centos7

View File

@ -186,22 +186,22 @@ inspect service
option option
set one of the available options set one of the available options
:new-key: set new morty key :new-key: set new morty key
apache : http://fv-az121-840/morty/ apache : http://fv-az180-407/morty/
:install: apache site with a reverse proxy (ProxyPass) :install: apache site with a reverse proxy (ProxyPass)
:remove: apache site morty.conf :remove: apache site morty.conf
nginx (http://fv-az121-840/morty/) nginx (http://fv-az180-407/morty/)
:install: nginx site with a reverse proxy (ProxyPass) :install: nginx site with a reverse proxy (ProxyPass)
:remove: nginx site morty.conf :remove: nginx site morty.conf
If needed, set the environment variables in the &#39;.config.sh&#39; file:: If needed, set the environment variables in the &#39;.config.sh&#39; file::
PUBLIC_URL_MORTY: http://fv-az121-840/morty/ PUBLIC_URL_MORTY: http://fv-az180-407/morty/
MORTY_LISTEN: 127.0.0.1:3000 MORTY_LISTEN: 127.0.0.1:3000
SERVICE_USER: morty SERVICE_USER: morty
To activate result and image proxy in searx, edit settings.yml (read: To activate result and image proxy in searx, edit settings.yml (read:
https://searx.github.io/searx/admin/morty.html):: https://searx.github.io/searx/admin/morty.html)::
result_proxy: result_proxy:
url : http://fv-az121-840/morty/ url : http://fv-az180-407/morty/
server: server:
image_proxy : True image_proxy : True
</pre></div> </pre></div>

View File

@ -113,8 +113,8 @@ apache
searx settings: /etc/searx/settings.yml searx settings: /etc/searx/settings.yml
If needed, set PUBLIC_URL of your WEB service in the &#39;.config.sh&#39; file:: If needed, set PUBLIC_URL of your WEB service in the &#39;.config.sh&#39; file::
PUBLIC_URL : http://fv-az121-840/searx PUBLIC_URL : http://fv-az180-407/searx
SEARX_INSTANCE_NAME : searx@fv-az121-840 SEARX_INSTANCE_NAME : searx@fv-az180-407
SERVICE_USER : searx SERVICE_USER : searx
SEARX_INTERNAL_HTTP : http://127.0.0.1:8888 SEARX_INTERNAL_HTTP : http://127.0.0.1:8888
</pre></div> </pre></div>