From 93e6258463d67a33c956788a5552627a9798fb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Fri, 12 May 2017 22:51:48 +0200 Subject: add first blog entry on python3 support --- docs/blog/blog.rst | 7 +++++++ docs/blog/python3.rst | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ docs/blog/searxpy3.png | Bin 0 -> 30947 bytes 3 files changed, 61 insertions(+) create mode 100644 docs/blog/blog.rst create mode 100644 docs/blog/python3.rst create mode 100644 docs/blog/searxpy3.png (limited to 'docs/blog') diff --git a/docs/blog/blog.rst b/docs/blog/blog.rst new file mode 100644 index 000000000..aad448c6b --- /dev/null +++ b/docs/blog/blog.rst @@ -0,0 +1,7 @@ +Blog +==== + +.. toctree:: + :maxdepth: 1 + + python3 diff --git a/docs/blog/python3.rst b/docs/blog/python3.rst new file mode 100644 index 000000000..f9a058902 --- /dev/null +++ b/docs/blog/python3.rst @@ -0,0 +1,54 @@ +Introducing Python3 support +=========================== + +As most operation systems are coming with Python3 installed by default. So it is time for searx to support Python3. But don't worry support of Python2.7 won't be dropped. + +.. image:: hurray.png + :scale: 50 % + :alt: hurray + :align: center + + +How to run searx using Python3 +------------------------------ + +Please make sure that you run at least Python3.5. + +To run searx, first a Python3 virtualenv should be created. After entering the virtualenv, +dependencies must be installed. Then run searx with python3 instead of the usual python command. + +.. code:: sh + + virtualenv -p python3 venv3 + source venv3/bin/activate + pip3 install -r requirements.txt + python3 searx/webapp.py + + +If you want to run searx using Python2.7, you don't have to do anything differently as before. + +Fun facts +--------- + +- 115 files were changed when implementing the support for both Python versions. + +- All of the dependencies was compatible except for the robotframework used for browser tests. Thus, these tests were migrated to splinter. So from now on both versions are being tested on Travis and can be tested locally. + +If you found bugs... +-------------------- + +...please open an issue on `GitHub`_. Make sure that you mention your Python version in your issue, +so we can investigate it properly. + +.. _GitHub: https://github.com/asciimoo/searx/issues + +Acknowledgement +--------------- + +This development was sponsored by `NLnet Foundation`_. + +.. _NLnet Foundation: https://nlnet.nl/ + + +| Happy hacking. +| kvch // 2017.05.13 22:57 diff --git a/docs/blog/searxpy3.png b/docs/blog/searxpy3.png new file mode 100644 index 000000000..8eeaeec55 Binary files /dev/null and b/docs/blog/searxpy3.png differ -- cgit v1.2.3 From b92631bf8c36a8b7fa1fada219428af8e2abb566 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Mon, 12 Jun 2017 12:34:30 +0200 Subject: various mods: uwsgi setup and version update ++ py3 img src fix ++ new sphinx version - closes #939 --- docs/blog/python3.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/blog') diff --git a/docs/blog/python3.rst b/docs/blog/python3.rst index f9a058902..eb14a49eb 100644 --- a/docs/blog/python3.rst +++ b/docs/blog/python3.rst @@ -3,7 +3,7 @@ Introducing Python3 support As most operation systems are coming with Python3 installed by default. So it is time for searx to support Python3. But don't worry support of Python2.7 won't be dropped. -.. image:: hurray.png +.. image:: searxpy3.png :scale: 50 % :alt: hurray :align: center -- cgit v1.2.3 From 979dd3d96c91c0430adca7528cda18cc7e547211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Tue, 22 Aug 2017 21:30:00 +0200 Subject: blog: add post about searx-admin --- docs/blog/admin.rst | 42 ++++++++++++++++++++++++++++++++++++++ docs/blog/blog.rst | 1 + docs/blog/searx-admin-engines.png | Bin 0 -> 50840 bytes 3 files changed, 43 insertions(+) create mode 100644 docs/blog/admin.rst create mode 100644 docs/blog/searx-admin-engines.png (limited to 'docs/blog') diff --git a/docs/blog/admin.rst b/docs/blog/admin.rst new file mode 100644 index 000000000..18d5ed33b --- /dev/null +++ b/docs/blog/admin.rst @@ -0,0 +1,42 @@ +Searx admin interface: manage your instance from your browser +============================================================= + +One of the biggest advantages of searx is being extremely customizable. But at first it can be daunting to newcomers. +A barrier of taking advantage of this feature is our ugly settings file which is sometimes hard to understand and edit. + +To make self-hosting searx more accessible a new tool is introduced, called ``searx-admin``. +It is a web application which is capable of managing your instance and manipulating its settings via a web UI. +It aims to replace editing of ``settings.yml`` for less experienced administrators or people +who prefer graphical admin interfaces. + +.. figure:: searx-admin-engines.png + :scale: 50 % + :alt: Screenshot of engine list + :align: center + :figclass: align-center + + Configuration page of engines + + +Since ``searx-admin`` acts as a supervisor for searx, we have decided to implement it +as a standalone tool instead of part of searx. Another reason for making it a standalone +tool is that the codebase and dependencies of searx should not grow because of a fully optional feature, +which does not affect existing instances. + + +Installation +------------ + +Installation guide can be found in the repository of searx-admin: +https://github.com/kvch/searx-admin#installation--usage + +Acknowledgements +---------------- + +This development was sponsored by `NLnet Foundation`_. + +.. _NLnet Foundation: https://nlnet.nl/ + + +| Happy hacking. +| kvch // 2017.08.22 21:25 diff --git a/docs/blog/blog.rst b/docs/blog/blog.rst index aad448c6b..77553d5cf 100644 --- a/docs/blog/blog.rst +++ b/docs/blog/blog.rst @@ -5,3 +5,4 @@ Blog :maxdepth: 1 python3 + admin diff --git a/docs/blog/searx-admin-engines.png b/docs/blog/searx-admin-engines.png new file mode 100644 index 000000000..610bacdf7 Binary files /dev/null and b/docs/blog/searx-admin-engines.png differ -- cgit v1.2.3 From 021e1da4c9a8eca7293ad62608cc55da5dfde73f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Wed, 23 Oct 2019 13:06:19 +0200 Subject: add post about introducing offline engines --- docs/blog/blog.rst | 1 + docs/blog/intro-offline.rst | 65 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 docs/blog/intro-offline.rst (limited to 'docs/blog') diff --git a/docs/blog/blog.rst b/docs/blog/blog.rst index 77553d5cf..2ccaaa5d3 100644 --- a/docs/blog/blog.rst +++ b/docs/blog/blog.rst @@ -6,3 +6,4 @@ Blog python3 admin + intro-offline diff --git a/docs/blog/intro-offline.rst b/docs/blog/intro-offline.rst new file mode 100644 index 000000000..914521718 --- /dev/null +++ b/docs/blog/intro-offline.rst @@ -0,0 +1,65 @@ +Preparation for offline engines +=============================== + +Offline engines +--------------- + +To extend the functionality of searx, offline engines are going to be introduced. An offline engine is an engine which does not need Internet connection to perform a search and does not use HTTP to communicate. + +Offline engines can be configured as online engines, by adding those to the `engines` list of `settings.yml`. Thus, searx finds the engine file and imports it. + +Example skeleton for the new engines: + +.. code:: python + + from subprocess import PIPE, Popen + + categories = ['general'] + offline = True + + def init(settings): + pass + + def search(query, params): + process = Popen(['ls', query], stdout=PIPE) + return_code = process.wait() + if return_code != 0: + raise RuntimeError('non-zero return code', return_code) + + results = [] + line = process.stdout.readline() + while line: + result = parse_line(line) + results.append(results) + + line = process.stdout.readline() + + return results + + +Development progress +-------------------- + +First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: https://github.com/asciimoo/searx/wiki/Offline-engines + +In this development step, searx core was prepared to accept and perform offline searches. Offline search requests are scheduled together with regular offline requests. + +As offline searches can return arbitrary results depending on the engine, the current result templates were insufficient to present such results. Thus, a new template is introduced which is caplable of presenting arbitrary key value pairs as a table. You can check out the pull request for more details: https://github.com/asciimoo/searx/pull/1700 + +Next steps +---------- + +Today, it is possible to create/run an offline engine. However, it is going to be publicly available for everyone who knows the searx instance. So the next step is to introduce token based access for engines. This way administrators are able to limit the access to private engines. + +Acknowledgement +--------------- + +This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ . + +.. _Search and Discovery Fund: https://nlnet.nl/discovery +.. _NLnet Foundation: https://nlnet.nl/ + + +| Happy hacking. +| kvch // 2019.10.21 17:03 + -- cgit v1.2.3 From af2cae6d1d71859e867a9fbc5da604ef6a898794 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 4 Dec 2019 16:48:36 +0100 Subject: doc: make use of sphinx.ext.extlinks & sphinx.ext.intersphinx - add sphinx extensions - patch documentation to make use of These modules help to simplify the reST markup of external references. BTW it helps to write more readable reST and form custom brands. Signed-off-by: Markus Heiser --- docs/blog/intro-offline.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/blog') diff --git a/docs/blog/intro-offline.rst b/docs/blog/intro-offline.rst index 914521718..0def3e09a 100644 --- a/docs/blog/intro-offline.rst +++ b/docs/blog/intro-offline.rst @@ -40,7 +40,7 @@ Example skeleton for the new engines: Development progress -------------------- -First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: https://github.com/asciimoo/searx/wiki/Offline-engines +First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: :wiki:`Offline-engines`. In this development step, searx core was prepared to accept and perform offline searches. Offline search requests are scheduled together with regular offline requests. -- cgit v1.2.3 From e9fff4fde6d7a8bec3fae087d2afe1fce2145f22 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 12 Dec 2019 19:20:56 +0100 Subject: doc: proofread of the all reST sources (no content change) Normalize reST sources with best practice and KISS in mind. to name a few points: - simplify reST tables - make use of ``literal`` markup for monospace rendering - fix code-blocks for better rendering in HTML - normalize section header markup - limit all lines to a maximum of 79 characters - add option -H to the sudo command used in code blocks - drop useless indentation of lists - ... [1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html Signed-off-by: Markus Heiser --- docs/blog/admin.rst | 53 +++++++++++++++++++------------------ docs/blog/blog.rst | 1 + docs/blog/intro-offline.rst | 64 +++++++++++++++++++++++++++------------------ docs/blog/python3.rst | 48 ++++++++++++++++++++++------------ 4 files changed, 97 insertions(+), 69 deletions(-) (limited to 'docs/blog') diff --git a/docs/blog/admin.rst b/docs/blog/admin.rst index 18d5ed33b..e95316192 100644 --- a/docs/blog/admin.rst +++ b/docs/blog/admin.rst @@ -1,42 +1,43 @@ -Searx admin interface: manage your instance from your browser +============================================================= +Searx admin interface ============================================================= -One of the biggest advantages of searx is being extremely customizable. But at first it can be daunting to newcomers. -A barrier of taking advantage of this feature is our ugly settings file which is sometimes hard to understand and edit. +.. _searx-admin: https://github.com/kvch/searx-admin#searx-admin +.. _NLnet Foundation: https://nlnet.nl/ -To make self-hosting searx more accessible a new tool is introduced, called ``searx-admin``. -It is a web application which is capable of managing your instance and manipulating its settings via a web UI. -It aims to replace editing of ``settings.yml`` for less experienced administrators or people -who prefer graphical admin interfaces. + manage your instance from your browser -.. figure:: searx-admin-engines.png - :scale: 50 % - :alt: Screenshot of engine list - :align: center - :figclass: align-center - - Configuration page of engines +.. sidebar:: Installation + Installation guide can be found in the repository of searx-admin_. -Since ``searx-admin`` acts as a supervisor for searx, we have decided to implement it -as a standalone tool instead of part of searx. Another reason for making it a standalone -tool is that the codebase and dependencies of searx should not grow because of a fully optional feature, -which does not affect existing instances. +One of the biggest advantages of searx is being extremely customizable. But at +first it can be daunting to newcomers. A barrier of taking advantage of this +feature is our ugly settings file which is sometimes hard to understand and +edit. +To make self-hosting searx more accessible a new tool is introduced, called +``searx-admin``. It is a web application which is capable of managing your +instance and manipulating its settings via a web UI. It aims to replace editing +of ``settings.yml`` for less experienced administrators or people who prefer +graphical admin interfaces. -Installation ------------- +.. figure:: searx-admin-engines.png + :alt: Screenshot of engine list -Installation guide can be found in the repository of searx-admin: -https://github.com/kvch/searx-admin#installation--usage + Configuration page of engines -Acknowledgements ----------------- +Since ``searx-admin`` acts as a supervisor for searx, we have decided to +implement it as a standalone tool instead of part of searx. Another reason for +making it a standalone tool is that the codebase and dependencies of searx +should not grow because of a fully optional feature, which does not affect +existing instances. -This development was sponsored by `NLnet Foundation`_. -.. _NLnet Foundation: https://nlnet.nl/ +Acknowledgements +================ +This development was sponsored by `NLnet Foundation`_. | Happy hacking. | kvch // 2017.08.22 21:25 diff --git a/docs/blog/blog.rst b/docs/blog/blog.rst index 2ccaaa5d3..52fa3f126 100644 --- a/docs/blog/blog.rst +++ b/docs/blog/blog.rst @@ -1,3 +1,4 @@ +==== Blog ==== diff --git a/docs/blog/intro-offline.rst b/docs/blog/intro-offline.rst index 0def3e09a..f6e90de3a 100644 --- a/docs/blog/intro-offline.rst +++ b/docs/blog/intro-offline.rst @@ -1,58 +1,70 @@ +=============================== Preparation for offline engines =============================== Offline engines ---------------- +=============== -To extend the functionality of searx, offline engines are going to be introduced. An offline engine is an engine which does not need Internet connection to perform a search and does not use HTTP to communicate. +To extend the functionality of searx, offline engines are going to be +introduced. An offline engine is an engine which does not need Internet +connection to perform a search and does not use HTTP to communicate. -Offline engines can be configured as online engines, by adding those to the `engines` list of `settings.yml`. Thus, searx finds the engine file and imports it. +Offline engines can be configured as online engines, by adding those to the +`engines` list of :origin:`settings.yml `. Thus, searx +finds the engine file and imports it. Example skeleton for the new engines: .. code:: python - from subprocess import PIPE, Popen + from subprocess import PIPE, Popen - categories = ['general'] - offline = True + categories = ['general'] + offline = True - def init(settings): - pass + def init(settings): + pass - def search(query, params): - process = Popen(['ls', query], stdout=PIPE) - return_code = process.wait() - if return_code != 0: - raise RuntimeError('non-zero return code', return_code) + def search(query, params): + process = Popen(['ls', query], stdout=PIPE) + return_code = process.wait() + if return_code != 0: + raise RuntimeError('non-zero return code', return_code) - results = [] - line = process.stdout.readline() - while line: - result = parse_line(line) - results.append(results) + results = [] + line = process.stdout.readline() + while line: + result = parse_line(line) + results.append(results) - line = process.stdout.readline() + line = process.stdout.readline() - return results + return results Development progress --------------------- +==================== -First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: :wiki:`Offline-engines`. +First, a proposal has been created as a Github issue. Then it was moved to the +wiki as a design document. You can read it here: :wiki:`Offline-engines`. -In this development step, searx core was prepared to accept and perform offline searches. Offline search requests are scheduled together with regular offline requests. +In this development step, searx core was prepared to accept and perform offline +searches. Offline search requests are scheduled together with regular offline +requests. -As offline searches can return arbitrary results depending on the engine, the current result templates were insufficient to present such results. Thus, a new template is introduced which is caplable of presenting arbitrary key value pairs as a table. You can check out the pull request for more details: https://github.com/asciimoo/searx/pull/1700 +As offline searches can return arbitrary results depending on the engine, the +current result templates were insufficient to present such results. Thus, a new +template is introduced which is caplable of presenting arbitrary key value pairs +as a table. You can check out the pull request for more details see +:pull:`1700`. Next steps ----------- +========== Today, it is possible to create/run an offline engine. However, it is going to be publicly available for everyone who knows the searx instance. So the next step is to introduce token based access for engines. This way administrators are able to limit the access to private engines. Acknowledgement ---------------- +=============== This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ . diff --git a/docs/blog/python3.rst b/docs/blog/python3.rst index eb14a49eb..5bb7f1c80 100644 --- a/docs/blog/python3.rst +++ b/docs/blog/python3.rst @@ -1,7 +1,17 @@ -Introducing Python3 support -=========================== +============================ +Introducing Python 3 support +============================ -As most operation systems are coming with Python3 installed by default. So it is time for searx to support Python3. But don't worry support of Python2.7 won't be dropped. +.. _Python 2.7 clock: https://pythonclock.org/ + +.. sidebar:: Python 2.7 to 3 upgrade + + This chapter exists of historical reasons. Python 2.7 release schedule ends + (`Python 2.7 clock`_) after 11 years Python 3 exists + +As most operation systems are coming with Python3 installed by default. So it is +time for searx to support Python3. But don't worry support of Python2.7 won't be +dropped. .. image:: searxpy3.png :scale: 50 % @@ -9,13 +19,14 @@ As most operation systems are coming with Python3 installed by default. So it is :align: center -How to run searx using Python3 ------------------------------- +How to run searx using Python 3 +=============================== -Please make sure that you run at least Python3.5. +Please make sure that you run at least Python 3.5. -To run searx, first a Python3 virtualenv should be created. After entering the virtualenv, -dependencies must be installed. Then run searx with python3 instead of the usual python command. +To run searx, first a Python3 virtualenv should be created. After entering the +virtualenv, dependencies must be installed. Then run searx with python3 instead +of the usual python command. .. code:: sh @@ -25,25 +36,28 @@ dependencies must be installed. Then run searx with python3 instead of the usual python3 searx/webapp.py -If you want to run searx using Python2.7, you don't have to do anything differently as before. +If you want to run searx using Python2.7, you don't have to do anything +differently as before. Fun facts ---------- +========= - 115 files were changed when implementing the support for both Python versions. -- All of the dependencies was compatible except for the robotframework used for browser tests. Thus, these tests were migrated to splinter. So from now on both versions are being tested on Travis and can be tested locally. +- All of the dependencies was compatible except for the robotframework used for + browser tests. Thus, these tests were migrated to splinter. So from now on + both versions are being tested on Travis and can be tested locally. -If you found bugs... --------------------- +If you found bugs +================= -...please open an issue on `GitHub`_. Make sure that you mention your Python version in your issue, -so we can investigate it properly. +Please open an issue on `GitHub`_. Make sure that you mention your Python +version in your issue, so we can investigate it properly. .. _GitHub: https://github.com/asciimoo/searx/issues -Acknowledgement ---------------- +Acknowledgment +============== This development was sponsored by `NLnet Foundation`_. -- cgit v1.2.3 From 04eeeb53a1215315d8027ac99978b560f45d5521 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 12 Dec 2019 19:48:42 +0100 Subject: doc: moved reST sources in the right folder (much clearer) Signed-off-by: Markus Heiser --- docs/blog/blog.rst | 10 ---------- docs/blog/index.rst | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 docs/blog/blog.rst create mode 100644 docs/blog/index.rst (limited to 'docs/blog') diff --git a/docs/blog/blog.rst b/docs/blog/blog.rst deleted file mode 100644 index 52fa3f126..000000000 --- a/docs/blog/blog.rst +++ /dev/null @@ -1,10 +0,0 @@ -==== -Blog -==== - -.. toctree:: - :maxdepth: 1 - - python3 - admin - intro-offline diff --git a/docs/blog/index.rst b/docs/blog/index.rst new file mode 100644 index 000000000..52fa3f126 --- /dev/null +++ b/docs/blog/index.rst @@ -0,0 +1,10 @@ +==== +Blog +==== + +.. toctree:: + :maxdepth: 1 + + python3 + admin + intro-offline -- cgit v1.2.3