summaryrefslogtreecommitdiff
path: root/searx/engines/recoll.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-06-30 18:07:02 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-07-01 22:45:19 +0200
commit5720844fcdc8601798e10544e2fd25ce4f2ad099 (patch)
treeaf611e4aef436253f4fda9504d06e05e2621114d /searx/engines/recoll.py
parent8e8d8dabe9b17c9db8db7432c6bc063d9ae980d1 (diff)
downloadsearxng-5720844fcdc8601798e10544e2fd25ce4f2ad099.tar.gz
searxng-5720844fcdc8601798e10544e2fd25ce4f2ad099.zip
[doc] rearranges Settings & Engines docs for better readability
We have built up detailed documentation of the *settings* and the *engines* over the past few years. However, this documentation was still spread over various chapters and was difficult to navigate in its entirety. This patch rearranges the Settings & Engines documentation for better readability. To review new ordered docs:: make docs.clean docs.live Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/recoll.py')
-rw-r--r--searx/engines/recoll.py51
1 files changed, 48 insertions, 3 deletions
diff --git a/searx/engines/recoll.py b/searx/engines/recoll.py
index ebcd83b8d..c11e197ed 100644
--- a/searx/engines/recoll.py
+++ b/searx/engines/recoll.py
@@ -1,6 +1,51 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
-"""
- Recoll (local search engine)
+# lint: pylint
+""".. sidebar:: info
+
+ - `Recoll <https://www.lesbonscomptes.com/recoll/>`_
+ - `recoll-webui <https://framagit.org/medoc92/recollwebui.git>`_
+ - :origin:`searx/engines/recoll.py`
+
+Recoll_ is a desktop full-text search tool based on Xapian. By itself Recoll_
+does not offer WEB or API access, this can be achieved using recoll-webui_
+
+Configuration
+=============
+
+You must configure the following settings:
+
+``base_url``:
+ Location where recoll-webui can be reached.
+
+``mount_prefix``:
+ Location where the file hierarchy is mounted on your *local* filesystem.
+
+``dl_prefix``:
+ Location where the file hierarchy as indexed by recoll can be reached.
+
+``search_dir``:
+ Part of the indexed file hierarchy to be search, if empty the full domain is
+ searched.
+
+Example
+=======
+
+Scenario:
+
+#. Recoll indexes a local filesystem mounted in ``/export/documents/reference``,
+#. the Recoll search interface can be reached at https://recoll.example.org/ and
+#. the contents of this filesystem can be reached though https://download.example.org/reference
+
+.. code:: yaml
+
+ base_url: https://recoll.example.org/
+ mount_prefix: /export/documents
+ dl_prefix: https://download.example.org
+ search_dir: ''
+
+Implementations
+===============
+
"""
from datetime import date, timedelta
@@ -33,7 +78,7 @@ embedded_url = '<{ttype} controls height="166px" ' + 'src="{url}" type="{mtype}"
# helper functions
def get_time_range(time_range):
- sw = {'day': 1, 'week': 7, 'month': 30, 'year': 365}
+ sw = {'day': 1, 'week': 7, 'month': 30, 'year': 365} # pylint: disable=invalid-name
offset = sw.get(time_range, 0)
if not offset: