diff options
author | return42 <markus.heiser@darmarIT.de> | 2025-01-10 07:15:40 +0000 |
---|---|---|
committer | return42 <markus.heiser@darmarIT.de> | 2025-01-10 07:15:40 +0000 |
commit | bf98d6b3f17d56ff760d9da5e5b4858ea104ffa9 (patch) | |
tree | 67261a258d820bf1272e33547b975e20acdfe61e /dev | |
download | searxng-gh-pages.tar.gz searxng-gh-pages.zip |
[doc] build from commit 94a0b415ef587e013df9e7350667b752a3822e90gh-pages
Diffstat (limited to 'dev')
66 files changed, 20050 insertions, 0 deletions
diff --git a/dev/contribution_guide.html b/dev/contribution_guide.html new file mode 100644 index 000000000..1e98efb47 --- /dev/null +++ b/dev/contribution_guide.html @@ -0,0 +1,302 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>How to contribute — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Engine Implementations" href="engines/index.html" /> + <link rel="prev" title="Runtime Management" href="rtm_asdf.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="engines/index.html" title="Engine Implementations" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="rtm_asdf.html" title="Runtime Management" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">How to contribute</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="how-to-contribute"> +<span id="id1"></span><h1>How to contribute<a class="headerlink" href="#how-to-contribute" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#prime-directives-privacy-hackability" id="id3">Prime directives: Privacy, Hackability</a></p> +<ul> +<li><p><a class="reference internal" href="#privacy-by-design" id="id4">Privacy-by-design</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#code" id="id5">Code</a></p></li> +<li><p><a class="reference internal" href="#translation" id="id6">Translation</a></p></li> +<li><p><a class="reference internal" href="#documentation" id="id7">Documentation</a></p> +<ul> +<li><p><a class="reference internal" href="#live-build" id="id8">live build</a></p></li> +<li><p><a class="reference internal" href="#deploy-on-github-io" id="id9">deploy on github.io</a></p></li> +</ul> +</li> +</ul> +</nav> +<section id="prime-directives-privacy-hackability"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Prime directives: Privacy, Hackability</a><a class="headerlink" href="#prime-directives-privacy-hackability" title="Link to this heading">¶</a></h2> +<p>SearXNG has two prime directives, <strong>privacy-by-design and hackability</strong> . The +hackability comes in three levels:</p> +<ul class="simple"> +<li><p>support of search engines</p></li> +<li><p>plugins to alter search behaviour</p></li> +<li><p>hacking SearXNG itself</p></li> +</ul> +<p>Note the lack of “world domination” among the directives. SearXNG has no +intention of wide mass-adoption, rounded corners, etc. The prime directive +“privacy” deserves a separate chapter, as it’s quite uncommon unfortunately.</p> +<section id="privacy-by-design"> +<h3><a class="toc-backref" href="#id4" role="doc-backlink">Privacy-by-design</a><a class="headerlink" href="#privacy-by-design" title="Link to this heading">¶</a></h3> +<p>SearXNG was born out of the need for a <strong>privacy-respecting</strong> search tool which +can be extended easily to maximize both, its search and its privacy protecting +capabilities.</p> +<p>A few widely used features work differently or turned off by default or not +implemented at all <strong>as a consequence of privacy-by-design</strong>.</p> +<p>If a feature reduces the privacy preserving aspects of searx, it should be +switched off by default or should not implemented at all. There are plenty of +search engines already providing such features. If a feature reduces the +protection of searx, users must be informed about the effect of choosing to +enable it. Features that protect privacy but differ from the expectations of +the user should also be explained.</p> +<p>Also, if you think that something works weird with searx, it’s might be because +of the tool you use is designed in a way to interfere with the privacy respect. +Submitting a bugreport to the vendor of the tool that misbehaves might be a good +feedback to reconsider the disrespect to its customers (e.g. <code class="docutils literal notranslate"><span class="pre">GET</span></code> vs <code class="docutils literal notranslate"><span class="pre">POST</span></code> +requests in various browsers).</p> +<p>Remember the other prime directive of SearXNG is to be hackable, so if the above +privacy concerns do not fancy you, simply fork it.</p> +<blockquote> +<div><p><em>Happy hacking.</em></p> +</div></blockquote> +</section> +</section> +<section id="code"> +<h2><a class="toc-backref" href="#id5" role="doc-backlink">Code</a><a class="headerlink" href="#code" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">Create good commits!</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">Structural split of changes</a></p></li> +<li><p><a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a></p></li> +<li><p><a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages">Git Commit Good Practice</a></p></li> +<li><p>some like to use: <a class="reference external" href="https://gitmoji.carloscuesta.me/">gitmoji</a></p></li> +<li><p>not yet active: <a class="reference external" href="https://github.com/zeke/semantic-pull-requests">Semantic PR</a></p></li> +</ul> +</aside> +<p>In order to submit a patch, please follow the steps below:</p> +<ul> +<li><p>Follow coding conventions.</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP8</a> standards apply, except the convention of line length</p></li> +<li><p>Maximum line length is 120 characters</p></li> +</ul> +</li> +<li><p>The cardinal rule for creating good commits is to ensure there is only one +<em>logical change</em> per commit / read <a class="reference external" href="https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes">Structural split of changes</a></p></li> +<li><p>Check if your code breaks existing tests. If so, update the tests or fix your +code.</p></li> +<li><p>If your code can be unit-tested, add unit tests.</p></li> +<li><p>Add yourself to the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/AUTHORS.rst">git://AUTHORS.rst</a> file.</p></li> +<li><p>Choose meaningful commit messages, read <a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a></p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o"><</span><span class="nb">type</span><span class="o">></span><span class="p">[</span><span class="n">optional</span> <span class="n">scope</span><span class="p">]:</span> <span class="o"><</span><span class="n">description</span><span class="o">></span> + +<span class="p">[</span><span class="n">optional</span> <span class="n">body</span><span class="p">]</span> + +<span class="p">[</span><span class="n">optional</span> <span class="n">footer</span><span class="p">(</span><span class="n">s</span><span class="p">)]</span> +</pre></div> +</div> +</li> +<li><p>Create a pull request.</p></li> +</ul> +<p>For more help on getting started with SearXNG development, see <a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a>.</p> +</section> +<section id="translation"> +<h2><a class="toc-backref" href="#id6" role="doc-backlink">Translation</a><a class="headerlink" href="#translation" title="Link to this heading">¶</a></h2> +<p>Translation currently takes place on <a class="reference internal" href="translation.html#translation"><span class="std std-ref">weblate</span></a>.</p> +</section> +<section id="documentation"> +<span id="contrib-docs"></span><h2><a class="toc-backref" href="#id7" role="doc-backlink">Documentation</a><a class="headerlink" href="#documentation" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">The reST sources</p> +<p>has been moved from <code class="docutils literal notranslate"><span class="pre">gh-branch</span></code> into <code class="docutils literal notranslate"><span class="pre">master</span></code> (<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs">git://docs</a>).</p> +</aside> +<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 +our <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile & ./manage</span></a>.</p> +<p>Here is an example which makes a complete rebuild:</p> +<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.clean<span class="w"> </span>docs.html +... +The<span class="w"> </span>HTML<span class="w"> </span>pages<span class="w"> </span>are<span class="w"> </span><span class="k">in</span><span class="w"> </span>dist/docs. +</pre></div> +</div> +<section id="live-build"> +<span id="make-docs-live"></span><h3><a class="toc-backref" href="#id8" role="doc-backlink">live build</a><a class="headerlink" href="#live-build" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">docs.clean</p> +<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> +</aside> +<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 +URL in your favorite browser and rebuilds every time a reST file has been +changed (<a class="reference internal" href="makefile.html#make-docs-clean"><span class="std std-ref">make docs.clean docs.live</span></a>).</p> +<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.live +... +The<span class="w"> </span>HTML<span class="w"> </span>pages<span class="w"> </span>are<span class="w"> </span><span class="k">in</span><span class="w"> </span>dist/docs. +...<span class="w"> </span>Serving<span class="w"> </span>on<span class="w"> </span>http://0.0.0.0:8000 +...<span class="w"> </span>Start<span class="w"> </span>watching<span class="w"> </span>changes +</pre></div> +</div> +<p>Live builds are implemented by <a class="reference external" href="https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md">sphinx-autobuild</a>. Use environment +<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 +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="w"> </span><span class="nv">SPHINXOPTS</span><span class="o">=</span><span class="s2">"--port 0"</span><span class="w"> </span>make<span class="w"> </span>docs.live +... +...<span class="w"> </span>Serving<span class="w"> </span>on<span class="w"> </span>http://0.0.0.0:50593 +... +</pre></div> +</div> +</section> +<section id="deploy-on-github-io"> +<span id="id2"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink">deploy on github.io</a><a class="headerlink" href="#deploy-on-github-io" title="Link to this heading">¶</a></h3> +<p>To deploy documentation at <a class="extlink-docs reference external" href="https://docs.searxng.org//.">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, +commit and push:</p> +<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.clean<span class="w"> </span>docs.gh-pages +</pre></div> +</div> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>If you are working in your own brand, don’t forget to adjust your +<a class="reference internal" href="../admin/settings/settings_brand.html#settings-brand"><span class="std std-ref">brand:</span></a>.</p> +</div> +</section> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">How to contribute</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#prime-directives-privacy-hackability">Prime directives: Privacy, Hackability</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#privacy-by-design">Privacy-by-design</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#code">Code</a></li> +<li class="toctree-l3"><a class="reference internal" href="#translation">Translation</a></li> +<li class="toctree-l3"><a class="reference internal" href="#documentation">Documentation</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#live-build">live build</a></li> +<li class="toctree-l4"><a class="reference internal" href="#deploy-on-github-io">deploy on github.io</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="rtm_asdf.html" title="previous chapter">Runtime Management</a> + <li>Next: <a href="engines/index.html" title="next chapter">Engine Implementations</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/contribution_guide.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/demo/demo_offline.html b/dev/engines/demo/demo_offline.html new file mode 100644 index 000000000..f066dd5f9 --- /dev/null +++ b/dev/engines/demo/demo_offline.html @@ -0,0 +1,185 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Demo Offline Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Command Line Engines" href="../offline/command-line-engines.html" /> + <link rel="prev" title="Offline Concept" href="../offline_concept.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="../offline/command-line-engines.html" title="Command Line Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../offline_concept.html" title="Offline Concept" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Demo Offline Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="demo-offline-engine"> +<span id="id1"></span><h1>Demo Offline Engine<a class="headerlink" href="#demo-offline-engine" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.demo_offline">Within this module we implement a <em>demo offline engine</em>. Do not look to +close to the implementation, its just a simple example. To get in use of this +<em>demo</em> engine add the following entry to your engines list in <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my offline engine</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo_offline</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo</span> +<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span> +</pre></div> +</div> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.demo_offline.init"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_offline.</span></span><span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_offline.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_offline.init" title="Link to this definition">¶</a></dt> +<dd><p>Initialization of the (offline) engine. The origin of this demo engine is a +simple json string which is loaded in this example while the engine is +initialized.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.demo_offline.search"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_offline.</span></span><span class="sig-name descname"><span class="pre">search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">request_params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_offline.html#search"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_offline.search" title="Link to this definition">¶</a></dt> +<dd><p>Query (offline) engine and return results. Assemble the list of results from +your local engine. In this demo engine we ignore the ‘query’ term, usual +you would pass the ‘query’ term to your local engine to filter out the +results.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Demo Offline Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../offline/command-line-engines.html">Command Line Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../offline/nosql-engines.html">NoSQL databases</a></li> +<li class="toctree-l5"><a class="reference internal" href="../offline/search-indexer-engines.html">Local Search APIs</a></li> +<li class="toctree-l5"><a class="reference internal" href="../offline/sql-engines.html">SQL Engines</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="../offline_concept.html" title="previous chapter">Offline Concept</a> + <li>Next: <a href="../offline/command-line-engines.html" title="next chapter">Command Line Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/demo/demo_offline.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/demo/demo_online.html b/dev/engines/demo/demo_online.html new file mode 100644 index 000000000..a52d3ee82 --- /dev/null +++ b/dev/engines/demo/demo_online.html @@ -0,0 +1,228 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Demo Online Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="XPath Engine" href="../xpath.html" /> + <link rel="prev" title="Engine Overview" href="../engine_overview.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="../xpath.html" title="XPath Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../engine_overview.html" title="Engine Overview" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Demo Online Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="demo-online-engine"> +<span id="id1"></span><h1>Demo Online Engine<a class="headerlink" href="#demo-online-engine" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.demo_online">Within this module we implement a <em>demo online engine</em>. Do not look to +close to the implementation, its just a simple example which queries <a class="reference external" href="https://www.artic.edu">The Art +Institute of Chicago</a></p> +<p>To get in use of this <em>demo</em> engine add the following entry to your engines +list in <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my online engine</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo_online</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">demo</span> +<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span> +</pre></div> +</div> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.demo_online.init"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_online.</span></span><span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_online.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_online.init" title="Link to this definition">¶</a></dt> +<dd><p>Initialization of the (online) engine. If no initialization is needed, drop +this init function.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.demo_online.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_online.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_online.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_online.request" title="Link to this definition">¶</a></dt> +<dd><p>Build up the <code class="docutils literal notranslate"><span class="pre">params</span></code> for the online request. In this example we build a +URL to fetch images from <a class="reference external" href="https://artic.edu">artic.edu</a></p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.demo_online.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.demo_online.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/demo_online.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.demo_online.response" title="Link to this definition">¶</a></dt> +<dd><p>Parse out the result items from the response. In this example we parse the +response from <a class="reference external" href="https://artic.edu">api.artic.edu</a> and filter out all +images.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../online/zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="../engine_overview.html" title="previous chapter">Engine Overview</a> + <li>Next: <a href="../xpath.html" title="next chapter">XPath Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/demo/demo_online.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/engine_overview.html b/dev/engines/engine_overview.html new file mode 100644 index 000000000..bce57db0f --- /dev/null +++ b/dev/engines/engine_overview.html @@ -0,0 +1,946 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>Engine Overview — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="Demo Online Engine" href="demo/demo_online.html" /> + <link rel="prev" title="SearXNG’s engines loader" href="engines.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="demo/demo_online.html" title="Demo Online Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="engines.html" title="SearXNG’s engines loader" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Engine Overview</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="engine-overview"> +<span id="engines-dev"></span><h1>Engine Overview<a class="headerlink" href="#engine-overview" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#general-engine-configuration" id="id17">General Engine Configuration</a></p> +<ul> +<li><p><a class="reference internal" href="#engine-file" id="id18">Engine File</a></p></li> +<li><p><a class="reference internal" href="#engine-settings-yml" id="id19">Engine <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></p></li> +<li><p><a class="reference internal" href="#overrides" id="id20">Overrides</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#making-a-request" id="id21">Making a Request</a></p> +<ul> +<li><p><a class="reference internal" href="#passed-arguments-request" id="id22">Passed Arguments (request)</a></p></li> +<li><p><a class="reference internal" href="#specify-request" id="id23">Specify Request</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#result-types-template" id="id24">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a></p> +<ul> +<li><p><a class="reference internal" href="#default" id="id25"><code class="docutils literal notranslate"><span class="pre">default</span></code></a></p></li> +<li><p><a class="reference internal" href="#images" id="id26"><code class="docutils literal notranslate"><span class="pre">images</span></code></a></p></li> +<li><p><a class="reference internal" href="#videos" id="id27"><code class="docutils literal notranslate"><span class="pre">videos</span></code></a></p></li> +<li><p><a class="reference internal" href="#torrent" id="id28"><code class="docutils literal notranslate"><span class="pre">torrent</span></code></a></p></li> +<li><p><a class="reference internal" href="#map" id="id29"><code class="docutils literal notranslate"><span class="pre">map</span></code></a></p></li> +<li><p><a class="reference internal" href="#paper" id="id30"><code class="docutils literal notranslate"><span class="pre">paper</span></code></a></p></li> +<li><p><a class="reference internal" href="#packages" id="id31"><code class="docutils literal notranslate"><span class="pre">packages</span></code></a></p></li> +</ul> +</li> +</ul> +</nav> +<aside class="sidebar"> +<p class="sidebar-title">Further reading ..</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a></p></li> +<li><p><a class="reference internal" href="../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">engine:</span></a></p></li> +</ul> +</aside> +<p>SearXNG is a <a class="reference external" href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch-engine</a>, so it uses different search engines to provide +better results.</p> +<p>Because there is no general search API which could be used for every search +engine, an adapter has to be built between SearXNG and the external search +engines. Adapters are stored under the folder <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">git://searx/engines</a>.</p> +<section id="general-engine-configuration"> +<span id="id1"></span><h2><a class="toc-backref" href="#id17" role="doc-backlink">General Engine Configuration</a><a class="headerlink" href="#general-engine-configuration" title="Link to this heading">¶</a></h2> +<p>It is required to tell SearXNG the type of results the engine provides. The +arguments can be set in the engine file or in the settings file (normally +<code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>). The arguments in the settings file override the ones in the +engine file.</p> +<p>It does not matter if an option is stored in the engine file or in the settings. +However, the standard way is the following:</p> +<section id="engine-file"> +<span id="id2"></span><h3><a class="toc-backref" href="#id18" role="doc-backlink">Engine File</a><a class="headerlink" href="#engine-file" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id3" style="width: 100%"> +<caption><span class="caption-number">Table 2 </span><span class="caption-text">Common options in the engine module</span><a class="headerlink" href="#id3" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>categories</p></td> +<td><p>list</p></td> +<td><p>categories, in which the engine is working</p></td> +</tr> +<tr class="row-odd"><td><p>paging</p></td> +<td><p>boolean</p></td> +<td><p>support multiple pages</p></td> +</tr> +<tr class="row-even"><td><p>time_range_support</p></td> +<td><p>boolean</p></td> +<td><p>support search time range</p></td> +</tr> +<tr class="row-odd"><td><p>engine_type</p></td> +<td><p>str</p></td> +<td><ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">online</span></code> <a class="reference internal" href="index.html#online-engines"><span class="std std-ref">[ref]</span></a> by +default, other possibles values are:</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">offline</span></code> <a class="reference internal" href="index.html#offline-engines"><span class="std std-ref">[ref]</span></a></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">online_dictionary</span></code> <a class="reference internal" href="index.html#online-dictionary"><span class="std std-ref">[ref]</span></a></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">online_currency</span></code> <a class="reference internal" href="index.html#online-currency"><span class="std std-ref">[ref]</span></a></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">online_url_search</span></code> <a class="reference internal" href="index.html#online-url-search"><span class="std std-ref">[ref]</span></a></p></li> +</ul> +</td> +</tr> +</tbody> +</table> +</section> +<section id="engine-settings-yml"> +<span id="engine-settings"></span><h3><a class="toc-backref" href="#id19" role="doc-backlink">Engine <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a><a class="headerlink" href="#engine-settings-yml" title="Link to this heading">¶</a></h3> +<p>For a more detailed description, see <a class="reference internal" href="../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">engine:</span></a> in the <a class="reference internal" href="../../admin/settings/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a>.</p> +<table class="docutils align-default" id="id4" style="width: 100%"> +<caption><span class="caption-number">Table 3 </span><span class="caption-text">Common options in the engine setup (<code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>)</span><a class="headerlink" href="#id4" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>name</p></td> +<td><p>string</p></td> +<td><p>name of search-engine</p></td> +</tr> +<tr class="row-odd"><td><p>engine</p></td> +<td><p>string</p></td> +<td><p>name of searxng-engine (file name without <code class="docutils literal notranslate"><span class="pre">.py</span></code>)</p></td> +</tr> +<tr class="row-even"><td><p>enable_http</p></td> +<td><p>bool</p></td> +<td><p>enable HTTP (by default only HTTPS is enabled).</p></td> +</tr> +<tr class="row-odd"><td><p>shortcut</p></td> +<td><p>string</p></td> +<td><p>shortcut of search-engine</p></td> +</tr> +<tr class="row-even"><td><p>timeout</p></td> +<td><p>string</p></td> +<td><p>specific timeout for search-engine</p></td> +</tr> +<tr class="row-odd"><td><p>display_error_messages</p></td> +<td><p>boolean</p></td> +<td><p>display error messages on the web UI</p></td> +</tr> +<tr class="row-even"><td><p>proxies</p></td> +<td><p>dict</p></td> +<td><p>set proxies for a specific engine +(e.g. <code class="docutils literal notranslate"><span class="pre">proxies</span> <span class="pre">:</span> <span class="pre">{http:</span> <span class="pre">socks5://proxy:port,</span> +<span class="pre">https:</span> <span class="pre">socks5://proxy:port}</span></code>)</p></td> +</tr> +</tbody> +</table> +</section> +<section id="overrides"> +<span id="engine-overrides"></span><h3><a class="toc-backref" href="#id20" role="doc-backlink">Overrides</a><a class="headerlink" href="#overrides" title="Link to this heading">¶</a></h3> +<p>A few of the options have default values in the namespace of the engine’s python +module, but are often overwritten by the settings. If <code class="docutils literal notranslate"><span class="pre">None</span></code> is assigned to an +option in the engine file, it has to be redefined in the settings, otherwise +SearXNG will not start with that engine (global names with a leading underline can +be <code class="docutils literal notranslate"><span class="pre">None</span></code>).</p> +<p>Here is an very simple example of the global names in the namespace of engine’s +module:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># engine dependent config</span> +<span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'general'</span><span class="p">]</span> +<span class="n">paging</span> <span class="o">=</span> <span class="kc">True</span> +<span class="n">_non_overwritten_global</span> <span class="o">=</span> <span class="s1">'foo'</span> +</pre></div> +</div> +<table class="docutils align-default" id="id5" style="width: 100%"> +<caption><span class="caption-number">Table 4 </span><span class="caption-text">The naming of overrides is arbitrary / recommended overrides are:</span><a class="headerlink" href="#id5" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>base_url</p></td> +<td><p>string</p></td> +<td><p>base-url, can be overwritten to use same +engine on other URL</p></td> +</tr> +<tr class="row-odd"><td><p>number_of_results</p></td> +<td><p>int</p></td> +<td><p>maximum number of results per request</p></td> +</tr> +<tr class="row-even"><td><p>language</p></td> +<td><p>string</p></td> +<td><p>ISO code of language and country like en_US</p></td> +</tr> +<tr class="row-odd"><td><p>api_key</p></td> +<td><p>string</p></td> +<td><p>api-key if required by engine</p></td> +</tr> +</tbody> +</table> +</section> +</section> +<section id="making-a-request"> +<span id="engine-request"></span><h2><a class="toc-backref" href="#id21" role="doc-backlink">Making a Request</a><a class="headerlink" href="#making-a-request" title="Link to this heading">¶</a></h2> +<p>To perform a search an URL have to be specified. In addition to specifying an +URL, arguments can be passed to the query.</p> +<section id="passed-arguments-request"> +<span id="engine-request-arguments"></span><h3><a class="toc-backref" href="#id22" role="doc-backlink">Passed Arguments (request)</a><a class="headerlink" href="#passed-arguments-request" title="Link to this heading">¶</a></h3> +<p>These arguments can be used to construct the search query. Furthermore, +parameters with default value can be redefined for special purposes.</p> +<span id="engine-request-online"></span><table class="docutils align-default" id="id6" style="width: 100%"> +<caption><span class="caption-number">Table 5 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online.OnlineProcessor.get_params" title="searx.search.processors.online.OnlineProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online</span></code></a></span><a class="headerlink" href="#id6" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>default-value, information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>url</p></td> +<td><p>str</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">''</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>method</p></td> +<td><p>str</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">'GET'</span></code></p></td> +</tr> +<tr class="row-even"><td><p>headers</p></td> +<td><p>set</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>data</p></td> +<td><p>set</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td> +</tr> +<tr class="row-even"><td><p>cookies</p></td> +<td><p>set</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">{}</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>verify</p></td> +<td><p>bool</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">True</span></code></p></td> +</tr> +<tr class="row-even"><td><p>headers.User-Agent</p></td> +<td><p>str</p></td> +<td><p>a random User-Agent</p></td> +</tr> +<tr class="row-odd"><td><p>category</p></td> +<td><p>str</p></td> +<td><p>current category, like <code class="docutils literal notranslate"><span class="pre">'general'</span></code></p></td> +</tr> +<tr class="row-even"><td><p>safesearch</p></td> +<td><p>int</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">0</span></code>, between <code class="docutils literal notranslate"><span class="pre">0</span></code> and <code class="docutils literal notranslate"><span class="pre">2</span></code> (normal, moderate, strict)</p></td> +</tr> +<tr class="row-odd"><td><p>time_range</p></td> +<td><p>Optional[str]</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">None</span></code>, can be <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">week</span></code>, <code class="docutils literal notranslate"><span class="pre">month</span></code>, <code class="docutils literal notranslate"><span class="pre">year</span></code></p></td> +</tr> +<tr class="row-even"><td><p>pageno</p></td> +<td><p>int</p></td> +<td><p>current pagenumber</p></td> +</tr> +<tr class="row-odd"><td><p>searxng_locale</p></td> +<td><p>str</p></td> +<td><p>SearXNG’s locale selected by user. Specific language code like +<code class="docutils literal notranslate"><span class="pre">'en'</span></code>, <code class="docutils literal notranslate"><span class="pre">'en-US'</span></code>, or <code class="docutils literal notranslate"><span class="pre">'all'</span></code> if unspecified.</p></td> +</tr> +</tbody> +</table> +<span id="engine-request-online-dictionary"></span><table class="docutils align-default" id="id7" style="width: 100%"> +<caption><span class="caption-number">Table 6 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online_dictionary.OnlineDictionaryProcessor.get_params" title="searx.search.processors.online_dictionary.OnlineDictionaryProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online_dictionary</span></code></a>, + in addition to the <a class="reference internal" href="#engine-request-online"><span class="std std-ref">online</span></a> arguments:</span><a class="headerlink" href="#id7" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>default-value, information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>from_lang</p></td> +<td><p>str</p></td> +<td><p>specific language code like <code class="docutils literal notranslate"><span class="pre">'en_US'</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>to_lang</p></td> +<td><p>str</p></td> +<td><p>specific language code like <code class="docutils literal notranslate"><span class="pre">'en_US'</span></code></p></td> +</tr> +<tr class="row-even"><td><p>query</p></td> +<td><p>str</p></td> +<td><p>the text query without the languages</p></td> +</tr> +</tbody> +</table> +<span id="engine-request-online-currency"></span><table class="docutils align-default" id="id8" style="width: 100%"> +<caption><span class="caption-number">Table 7 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online_currency.OnlineCurrencyProcessor.get_params" title="searx.search.processors.online_currency.OnlineCurrencyProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online_currency</span></code></a>, + in addition to the <a class="reference internal" href="#engine-request-online"><span class="std std-ref">online</span></a> arguments:</span><a class="headerlink" href="#id8" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>default-value, information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>amount</p></td> +<td><p>float</p></td> +<td><p>the amount to convert</p></td> +</tr> +<tr class="row-odd"><td><p>from</p></td> +<td><p>str</p></td> +<td><p>ISO 4217 code</p></td> +</tr> +<tr class="row-even"><td><p>to</p></td> +<td><p>str</p></td> +<td><p>ISO 4217 code</p></td> +</tr> +<tr class="row-odd"><td><p>from_name</p></td> +<td><p>str</p></td> +<td><p>currency name</p></td> +</tr> +<tr class="row-even"><td><p>to_name</p></td> +<td><p>str</p></td> +<td><p>currency name</p></td> +</tr> +</tbody> +</table> +<span id="engine-request-online-url-search"></span><table class="docutils align-default" id="id9" style="width: 100%"> +<caption><span class="caption-number">Table 8 </span><span class="caption-text">If the <code class="docutils literal notranslate"><span class="pre">engine_type</span></code> is <a class="reference internal" href="../../src/searx.search.processors.html#searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params" title="searx.search.processors.online_url_search.OnlineUrlSearchProcessor.get_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">online_url_search</span></code></a>, + in addition to the <a class="reference internal" href="#engine-request-online"><span class="std std-ref">online</span></a> arguments:</span><a class="headerlink" href="#id9" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>default-value, information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>search_url</p></td> +<td><p>dict</p></td> +<td><p>URLs from the search query:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s1">'http'</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> + <span class="s1">'ftp'</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> + <span class="s1">'data:image'</span><span class="p">:</span> <span class="nb">str</span> +<span class="p">}</span> +</pre></div> +</div> +</td> +</tr> +</tbody> +</table> +</section> +<section id="specify-request"> +<h3><a class="toc-backref" href="#id23" role="doc-backlink">Specify Request</a><a class="headerlink" href="#specify-request" title="Link to this heading">¶</a></h3> +<p>The function <a class="reference internal" href="demo/demo_online.html#searx.engines.demo_online.request" title="searx.engines.demo_online.request"><code class="xref py py-func docutils literal notranslate"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code></a> always returns the <code class="docutils literal notranslate"><span class="pre">params</span></code> variable, the +following parameters can be used to specify a search request:</p> +<table class="docutils align-default" style="width: 100%"> +<thead> +<tr class="row-odd"><th class="head"><p>argument</p></th> +<th class="head"><p>type</p></th> +<th class="head"><p>information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>url</p></td> +<td><p>str</p></td> +<td><p>requested url</p></td> +</tr> +<tr class="row-odd"><td><p>method</p></td> +<td><p>str</p></td> +<td><p>HTTP request method</p></td> +</tr> +<tr class="row-even"><td><p>headers</p></td> +<td><p>set</p></td> +<td><p>HTTP header information</p></td> +</tr> +<tr class="row-odd"><td><p>data</p></td> +<td><p>set</p></td> +<td><p>HTTP data information</p></td> +</tr> +<tr class="row-even"><td><p>cookies</p></td> +<td><p>set</p></td> +<td><p>HTTP cookies</p></td> +</tr> +<tr class="row-odd"><td><p>verify</p></td> +<td><p>bool</p></td> +<td><p>Performing SSL-Validity check</p></td> +</tr> +<tr class="row-even"><td><p>allow_redirects</p></td> +<td><p>bool</p></td> +<td><p>Follow redirects</p></td> +</tr> +<tr class="row-odd"><td><p>max_redirects</p></td> +<td><p>int</p></td> +<td><p>maximum redirects, hard limit</p></td> +</tr> +<tr class="row-even"><td><p>soft_max_redirects</p></td> +<td><p>int</p></td> +<td><p>maximum redirects, soft limit. Record an error but don’t stop the engine</p></td> +</tr> +<tr class="row-odd"><td><p>raise_for_httperror</p></td> +<td><p>bool</p></td> +<td><p>True by default: raise an exception if the HTTP code of response is >= 300</p></td> +</tr> +</tbody> +</table> +</section> +</section> +<section id="result-types-template"> +<span id="engine-media-types"></span><span id="engine-results"></span><h2><a class="toc-backref" href="#id24" role="doc-backlink">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a><a class="headerlink" href="#result-types-template" title="Link to this heading">¶</a></h2> +<p>Each result item of an engine can be of different media-types. Currently the +following media-types are supported. To set another media-type as +<a class="reference internal" href="#template-default"><span class="std std-ref">default</span></a>, the parameter <code class="docutils literal notranslate"><span class="pre">template</span></code> must be set to the desired +type.</p> +<section id="default"> +<span id="template-default"></span><h3><a class="toc-backref" href="#id25" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">default</span></code></a><a class="headerlink" href="#default" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id10" style="width: 100%"> +<caption><span class="caption-number">Table 9 </span><span class="caption-text">Parameter of the <strong>default</strong> media type:</span><a class="headerlink" href="#id10" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>result-parameter</p></th> +<th class="head"><p>information</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>url</p></td> +<td><p>string, url of the result</p></td> +</tr> +<tr class="row-odd"><td><p>title</p></td> +<td><p>string, title of the result</p></td> +</tr> +<tr class="row-even"><td><p>content</p></td> +<td><p>string, general result-text</p></td> +</tr> +<tr class="row-odd"><td><p>publishedDate</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td> +</tr> +</tbody> +</table> +</section> +<section id="images"> +<span id="template-images"></span><h3><a class="toc-backref" href="#id26" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">images</span></code></a><a class="headerlink" href="#images" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id11" style="width: 100%"> +<caption><span class="caption-number">Table 10 </span><span class="caption-text">Parameter of the <strong>images</strong> media type</span><a class="headerlink" href="#id11" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>result-parameter</p></th> +<th class="head"><p>Python type</p></th> +<th class="head"><p>information</p></th> +</tr> +<tr class="row-even"><th class="head"><p>template</p></th> +<th class="head"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></th> +<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">images.html</span></code></p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><td><p>url</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>url to the result site</p></td> +</tr> +<tr class="row-even"><td><p>title</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>title of the result</p></td> +</tr> +<tr class="row-odd"><td><p>content</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>description of the image</p></td> +</tr> +<tr class="row-even"><td><p>publishedDate</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a></p></td> +<td><p>time of publish</p></td> +</tr> +<tr class="row-odd"><td><p>img_src</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>url to the result image</p></td> +</tr> +<tr class="row-even"><td><p>thumbnail_src</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>url to a small-preview image</p></td> +</tr> +<tr class="row-odd"><td><p>resolution</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the resolution of the image (e.g. <code class="docutils literal notranslate"><span class="pre">1920</span> <span class="pre">x</span> <span class="pre">1080</span></code> pixel)</p></td> +</tr> +<tr class="row-even"><td><p>img_format</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the format of the image (e.g. <code class="docutils literal notranslate"><span class="pre">png</span></code>)</p></td> +</tr> +<tr class="row-odd"><td><p>filesize</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>size of bytes in <code class="xref py py-obj docutils literal notranslate"><span class="pre">human</span> <span class="pre">readable</span></code> notation +(e.g. <code class="docutils literal notranslate"><span class="pre">MB</span></code> for 1024 * 1024 Bytes filesize).</p></td> +</tr> +</tbody> +</table> +</section> +<section id="videos"> +<span id="template-videos"></span><h3><a class="toc-backref" href="#id27" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">videos</span></code></a><a class="headerlink" href="#videos" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id12" style="width: 100%"> +<caption><span class="caption-number">Table 11 </span><span class="caption-text">Parameter of the <strong>videos</strong> media type:</span><a class="headerlink" href="#id12" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>result-parameter</p></th> +<th class="head"><p>information</p></th> +</tr> +<tr class="row-even"><th class="head"><p>template</p></th> +<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">videos.html</span></code></p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><td><p>url</p></td> +<td><p>string, url of the result</p></td> +</tr> +<tr class="row-even"><td><p>title</p></td> +<td><p>string, title of the result</p></td> +</tr> +<tr class="row-odd"><td><p>content</p></td> +<td><p><em>(not implemented yet)</em></p></td> +</tr> +<tr class="row-even"><td><p>publishedDate</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td> +</tr> +<tr class="row-odd"><td><p>thumbnail</p></td> +<td><p>string, url to a small-preview image</p></td> +</tr> +<tr class="row-even"><td><p>length</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.timedelta</span></code></a>, duration of result</p></td> +</tr> +<tr class="row-odd"><td><p>views</p></td> +<td><p>string, view count in humanized number format</p></td> +</tr> +</tbody> +</table> +</section> +<section id="torrent"> +<span id="template-torrent"></span><h3><a class="toc-backref" href="#id28" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">torrent</span></code></a><a class="headerlink" href="#torrent" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id13" style="width: 100%"> +<caption><span class="caption-number">Table 12 </span><span class="caption-text">Parameter of the <strong>torrent</strong> media type:</span><a class="headerlink" href="#id13" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>result-parameter</p></th> +<th class="head"><p>information</p></th> +</tr> +<tr class="row-even"><th class="head"><p>template</p></th> +<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">torrent.html</span></code></p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><td><p>url</p></td> +<td><p>string, url of the result</p></td> +</tr> +<tr class="row-even"><td><p>title</p></td> +<td><p>string, title of the result</p></td> +</tr> +<tr class="row-odd"><td><p>content</p></td> +<td><p>string, general result-text</p></td> +</tr> +<tr class="row-even"><td><p>publishedDate</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, +time of publish <em>(not implemented yet)</em></p></td> +</tr> +<tr class="row-odd"><td><p>seed</p></td> +<td><p>int, number of seeder</p></td> +</tr> +<tr class="row-even"><td><p>leech</p></td> +<td><p>int, number of leecher</p></td> +</tr> +<tr class="row-odd"><td><p>filesize</p></td> +<td><p>int, size of file in bytes</p></td> +</tr> +<tr class="row-even"><td><p>files</p></td> +<td><p>int, number of files</p></td> +</tr> +<tr class="row-odd"><td><p>magnetlink</p></td> +<td><p>string, <a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">magnetlink</a> of the result</p></td> +</tr> +<tr class="row-even"><td><p>torrentfile</p></td> +<td><p>string, torrentfile of the result</p></td> +</tr> +</tbody> +</table> +</section> +<section id="map"> +<span id="template-map"></span><h3><a class="toc-backref" href="#id29" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">map</span></code></a><a class="headerlink" href="#map" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id14" style="width: 100%"> +<caption><span class="caption-number">Table 13 </span><span class="caption-text">Parameter of the <strong>map</strong> media type:</span><a class="headerlink" href="#id14" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>result-parameter</p></th> +<th class="head"><p>information</p></th> +</tr> +<tr class="row-even"><th class="head"><p>template</p></th> +<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">map.html</span></code></p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><td><p>url</p></td> +<td><p>string, url of the result</p></td> +</tr> +<tr class="row-even"><td><p>title</p></td> +<td><p>string, title of the result</p></td> +</tr> +<tr class="row-odd"><td><p>content</p></td> +<td><p>string, general result-text</p></td> +</tr> +<tr class="row-even"><td><p>publishedDate</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a>, time of publish</p></td> +</tr> +<tr class="row-odd"><td><p>latitude</p></td> +<td><p>latitude of result (in decimal format)</p></td> +</tr> +<tr class="row-even"><td><p>longitude</p></td> +<td><p>longitude of result (in decimal format)</p></td> +</tr> +<tr class="row-odd"><td><p>boundingbox</p></td> +<td><p>boundingbox of result (array of 4. values +<code class="docutils literal notranslate"><span class="pre">[lat-min,</span> <span class="pre">lat-max,</span> <span class="pre">lon-min,</span> <span class="pre">lon-max]</span></code>)</p></td> +</tr> +<tr class="row-even"><td><p>geojson</p></td> +<td><p>geojson of result (<a class="reference external" href="https://geojson.org/">https://geojson.org/</a>)</p></td> +</tr> +<tr class="row-odd"><td><p>osm.type</p></td> +<td><p>type of osm-object (if OSM-Result)</p></td> +</tr> +<tr class="row-even"><td><p>osm.id</p></td> +<td><p>id of osm-object (if OSM-Result)</p></td> +</tr> +<tr class="row-odd"><td><p>address.name</p></td> +<td><p>name of object</p></td> +</tr> +<tr class="row-even"><td><p>address.road</p></td> +<td><p>street name of object</p></td> +</tr> +<tr class="row-odd"><td><p>address.house_number</p></td> +<td><p>house number of object</p></td> +</tr> +<tr class="row-even"><td><p>address.locality</p></td> +<td><p>city, place of object</p></td> +</tr> +<tr class="row-odd"><td><p>address.postcode</p></td> +<td><p>postcode of object</p></td> +</tr> +<tr class="row-even"><td><p>address.country</p></td> +<td><p>country of object</p></td> +</tr> +</tbody> +</table> +</section> +<section id="paper"> +<span id="template-paper"></span><h3><a class="toc-backref" href="#id30" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">paper</span></code></a><a class="headerlink" href="#paper" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id15" style="width: 100%"> +<caption><span class="caption-number">Table 14 </span><span class="caption-text">Parameter of the <strong>paper</strong> media type / + see <a class="reference external" href="https://en.wikipedia.org/wiki/BibTeX#Field_types">BibTeX field types</a> and <a class="reference external" href="https://www.bibtex.com/g/bibtex-format/">BibTeX format</a></span><a class="headerlink" href="#id15" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>result-parameter</p></th> +<th class="head"><p>Python type</p></th> +<th class="head"><p>information</p></th> +</tr> +<tr class="row-even"><th class="head"><p>template</p></th> +<th class="head"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></th> +<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">paper.html</span></code></p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><td><p>title</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>title of the result</p></td> +</tr> +<tr class="row-even"><td><p>content</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>abstract</p></td> +</tr> +<tr class="row-odd"><td><p>comments</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>free text display in italic below the content</p></td> +</tr> +<tr class="row-even"><td><p>tags</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td> +<td><p>free tag list</p></td> +</tr> +<tr class="row-odd"><td><p>publishedDate</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a></p></td> +<td><p>last publication date</p></td> +</tr> +<tr class="row-even"><td><p>type</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>short description of medium type, e.g. <em>book</em>, <em>pdf</em> or <em>html</em> …</p></td> +</tr> +<tr class="row-odd"><td><p>authors</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td> +<td><p>list of authors of the work (authors with a “s”)</p></td> +</tr> +<tr class="row-even"><td><p>editor</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>list of editors of a book</p></td> +</tr> +<tr class="row-odd"><td><p>publisher</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>name of the publisher</p></td> +</tr> +<tr class="row-even"><td><p>journal</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>name of the journal or magazine the article was +published in</p></td> +</tr> +<tr class="row-odd"><td><p>volume</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>volume number</p></td> +</tr> +<tr class="row-even"><td><p>pages</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>page range where the article is</p></td> +</tr> +<tr class="row-odd"><td><p>number</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>number of the report or the issue number for a journal article</p></td> +</tr> +<tr class="row-even"><td><p>doi</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>DOI number (like <code class="docutils literal notranslate"><span class="pre">10.1038/d41586-018-07848-2</span></code>)</p></td> +</tr> +<tr class="row-odd"><td><p>issn</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td> +<td><p>ISSN number like <code class="docutils literal notranslate"><span class="pre">1476-4687</span></code></p></td> +</tr> +<tr class="row-even"><td><p>isbn</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td> +<td><p>ISBN number like <code class="docutils literal notranslate"><span class="pre">9780201896831</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>pdf_url</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>URL to the full article, the PDF version</p></td> +</tr> +<tr class="row-even"><td><p>html_url</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>URL to full article, HTML version</p></td> +</tr> +</tbody> +</table> +</section> +<section id="packages"> +<span id="template-packages"></span><h3><a class="toc-backref" href="#id31" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">packages</span></code></a><a class="headerlink" href="#packages" title="Link to this heading">¶</a></h3> +<table class="docutils align-default" id="id16" style="width: 100%"> +<caption><span class="caption-number">Table 15 </span><span class="caption-text">Parameter of the <strong>packages</strong> media type</span><a class="headerlink" href="#id16" title="Link to this table">¶</a></caption> +<thead> +<tr class="row-odd"><th class="head"><p>result-parameter</p></th> +<th class="head"><p>Python type</p></th> +<th class="head"><p>information</p></th> +</tr> +<tr class="row-even"><th class="head"><p>template</p></th> +<th class="head"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></th> +<th class="head"><p>is set to <code class="docutils literal notranslate"><span class="pre">packages.html</span></code></p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><td><p>title</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>title of the result</p></td> +</tr> +<tr class="row-even"><td><p>content</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>abstract</p></td> +</tr> +<tr class="row-odd"><td><p>package_name</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the name of the package</p></td> +</tr> +<tr class="row-even"><td><p>version</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the current version of the package</p></td> +</tr> +<tr class="row-odd"><td><p>maintainer</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the maintainer or author of the project</p></td> +</tr> +<tr class="row-even"><td><p>publishedDate</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a></p></td> +<td><p>date of latest update or release</p></td> +</tr> +<tr class="row-odd"><td><p>tags</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code></a>[<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a>]</p></td> +<td><p>free tag list</p></td> +</tr> +<tr class="row-even"><td><p>popularity</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the popularity of the package, e.g. rating or download count</p></td> +</tr> +<tr class="row-odd"><td><p>license_name</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the name of the license</p></td> +</tr> +<tr class="row-even"><td><p>license_url</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the web location of a license copy</p></td> +</tr> +<tr class="row-odd"><td><p>homepage</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the url of the project’s homepage</p></td> +</tr> +<tr class="row-even"><td><p>source_code_url</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></p></td> +<td><p>the location of the project’s source code</p></td> +</tr> +<tr class="row-odd"><td><p>links</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p></td> +<td><p>additional links in the form of <code class="docutils literal notranslate"><span class="pre">{'link_name':</span> <span class="pre">'http://example.com'}</span></code></p></td> +</tr> +</tbody> +</table> +</section> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#">Engine Overview</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#general-engine-configuration">General Engine Configuration</a><ul> +<li class="toctree-l5"><a class="reference internal" href="#engine-file">Engine File</a></li> +<li class="toctree-l5"><a class="reference internal" href="#engine-settings-yml">Engine <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#overrides">Overrides</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="#making-a-request">Making a Request</a><ul> +<li class="toctree-l5"><a class="reference internal" href="#passed-arguments-request">Passed Arguments (request)</a></li> +<li class="toctree-l5"><a class="reference internal" href="#specify-request">Specify Request</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="#result-types-template">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a><ul> +<li class="toctree-l5"><a class="reference internal" href="#default"><code class="docutils literal notranslate"><span class="pre">default</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#images"><code class="docutils literal notranslate"><span class="pre">images</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#videos"><code class="docutils literal notranslate"><span class="pre">videos</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#torrent"><code class="docutils literal notranslate"><span class="pre">torrent</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#map"><code class="docutils literal notranslate"><span class="pre">map</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#paper"><code class="docutils literal notranslate"><span class="pre">paper</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#packages"><code class="docutils literal notranslate"><span class="pre">packages</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="index.html#engine-types">Engine Types</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="engines.html" title="previous chapter">SearXNG’s engines loader</a> + <li>Next: <a href="demo/demo_online.html" title="next chapter">Demo Online Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/engines/engine_overview.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/enginelib.html b/dev/engines/enginelib.html new file mode 100644 index 000000000..44b3b5e7e --- /dev/null +++ b/dev/engines/enginelib.html @@ -0,0 +1,568 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>Engine Library — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="SearXNG’s engines loader" href="engines.html" /> + <link rel="prev" title="Engine Implementations" href="index.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="engines.html" title="SearXNG’s engines loader" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="Engine Implementations" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Engine Library</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="engine-library"> +<span id="searx-enginelib"></span><h1>Engine Library<a class="headerlink" href="#engine-library" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#module-searx.enginelib.traits" id="id1">Engine traits</a></p></li> +</ul> +</nav> +<p id="module-searx.enginelib">Implementations of the framework for the SearXNG engines.</p> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>The long term goal is to modularize all implementations of the engine +framework here in this Python package. ToDo:</p> +<ul class="simple"> +<li><p>move implementations of the <a class="reference internal" href="engines.html#searx-engines-loader"><span class="std std-ref">SearXNG’s engines loader</span></a> to a new module in +the <a class="reference internal" href="#module-searx.enginelib" title="searx.enginelib"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.enginelib</span></code></a> namespace.</p></li> +</ul> +</div> +<dl class="py class"> +<dt class="sig sig-object py" id="searx.enginelib.Engine"> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.</span></span><span class="sig-name descname"><span class="pre">Engine</span></span><a class="reference internal" href="../../_modules/searx/enginelib.html#Engine"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.Engine" title="Link to this definition">¶</a></dt> +<dd><p>Class of engine instances build from YAML settings.</p> +<p>Further documentation see <a class="reference internal" href="engine_overview.html#general-engine-configuration"><span class="std std-ref">General Engine Configuration</span></a>.</p> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>This class is currently never initialized and only used for type hinting.</p> +</div> +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.about"> +<span class="sig-name descname"><span class="pre">about</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.about" title="Link to this definition">¶</a></dt> +<dd><p>Additional fields describing the engine.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">about</span><span class="p">:</span> +<span class="w"> </span><span class="nt">website</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://example.com</span> +<span class="w"> </span><span class="nt">wikidata_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Q306656</span> +<span class="w"> </span><span class="nt">official_api_documentation</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://example.com/api-doc</span> +<span class="w"> </span><span class="nt">use_official_api</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="nt">require_api_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="nt">results</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">HTML</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.categories"> +<span class="sig-name descname"><span class="pre">categories</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.13)"><span class="pre">List</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.Engine.categories" title="Link to this definition">¶</a></dt> +<dd><p>Specifies to which <a class="reference internal" href="../../admin/settings/settings_engine.html#engine-categories"><span class="std std-ref">categories</span></a> the engine should be added.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.disabled"> +<span class="sig-name descname"><span class="pre">disabled</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.disabled" title="Link to this definition">¶</a></dt> +<dd><p>To disable by default the engine, but not deleting it. It will allow the +user to manually activate it in the settings.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.display_error_messages"> +<span class="sig-name descname"><span class="pre">display_error_messages</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.display_error_messages" title="Link to this definition">¶</a></dt> +<dd><p>Display error messages on the web UI.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.enable_http"> +<span class="sig-name descname"><span class="pre">enable_http</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.enable_http" title="Link to this definition">¶</a></dt> +<dd><p>Enable HTTP (by default only HTTPS is enabled).</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.engine"> +<span class="sig-name descname"><span class="pre">engine</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.engine" title="Link to this definition">¶</a></dt> +<dd><p>Name of the python file used to handle requests and responses to and from +this search engine (file name from <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">git://searx/engines</a> without +<code class="docutils literal notranslate"><span class="pre">.py</span></code>).</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.engine_type"> +<span class="sig-name descname"><span class="pre">engine_type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.engine_type" title="Link to this definition">¶</a></dt> +<dd><p>Type of the engine (<a class="reference internal" href="../../src/searx.search.processors.html#searx-search-processors"><span class="std std-ref">Search processors</span></a>)</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.fetch_traits"> +<span class="sig-name descname"><span class="pre">fetch_traits</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Callable" title="(in Python v3.13)"><span class="pre">Callable</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Function to to fetch engine’s traits from origin.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.inactive"> +<span class="sig-name descname"><span class="pre">inactive</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.inactive" title="Link to this definition">¶</a></dt> +<dd><p>Remove the engine from the settings (<em>disabled & removed</em>).</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.language"> +<span class="sig-name descname"><span class="pre">language</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.language" title="Link to this definition">¶</a></dt> +<dd><p>For an engine, when there is <code class="docutils literal notranslate"><span class="pre">language:</span> <span class="pre">...</span></code> in the YAML settings the engine +does support only this one language:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google french</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">google</span> +<span class="w"> </span><span class="nt">language</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fr</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.language_support"> +<span class="sig-name descname"><span class="pre">language_support</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.language_support" title="Link to this definition">¶</a></dt> +<dd><p>Engine supports languages (locales) search.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.name"> +<span class="sig-name descname"><span class="pre">name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.name" title="Link to this definition">¶</a></dt> +<dd><p>Name that will be used across SearXNG to define this engine. In settings, on +the result page ..</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.paging"> +<span class="sig-name descname"><span class="pre">paging</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.paging" title="Link to this definition">¶</a></dt> +<dd><p>Engine supports multiple pages.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.proxies"> +<span class="sig-name descname"><span class="pre">proxies</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.proxies" title="Link to this definition">¶</a></dt> +<dd><p>Set proxies for a specific engine (YAML):</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">proxies </span><span class="p">:</span> +<span class="w"> </span><span class="nt">http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">socks5://proxy:port</span> +<span class="w"> </span><span class="nt">https</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">socks5://proxy:port</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.region"> +<span class="sig-name descname"><span class="pre">region</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.region" title="Link to this definition">¶</a></dt> +<dd><p>For an engine, when there is <code class="docutils literal notranslate"><span class="pre">region:</span> <span class="pre">...</span></code> in the YAML settings the engine +does support only this one region:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">..</span> <span class="n">code</span><span class="p">::</span> <span class="n">yaml</span> +</pre></div> +</div> +<blockquote> +<div><ul class="simple"> +<li><p>name: google belgium +engine: google +region: fr-BE</p></li> +</ul> +</div></blockquote> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.safesearch"> +<span class="sig-name descname"><span class="pre">safesearch</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.safesearch" title="Link to this definition">¶</a></dt> +<dd><p>Engine supports SafeSearch</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.send_accept_language_header"> +<span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.send_accept_language_header" title="Link to this definition">¶</a></dt> +<dd><p>When this option is activated, the language (locale) that is selected by +the user is used to build and send a <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header in the +request to the origin search engine.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.shortcut"> +<span class="sig-name descname"><span class="pre">shortcut</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.shortcut" title="Link to this definition">¶</a></dt> +<dd><p>Code used to execute bang requests (<code class="docutils literal notranslate"><span class="pre">!foo</span></code>)</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.time_range_support"> +<span class="sig-name descname"><span class="pre">time_range_support</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.time_range_support" title="Link to this definition">¶</a></dt> +<dd><p>Engine supports search time range.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.timeout"> +<span class="sig-name descname"><span class="pre">timeout</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.13)"><span class="pre">float</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.timeout" title="Link to this definition">¶</a></dt> +<dd><p>Specific timeout for search-engine.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.tokens"> +<span class="sig-name descname"><span class="pre">tokens</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.List" title="(in Python v3.13)"><span class="pre">List</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.Engine.tokens" title="Link to this definition">¶</a></dt> +<dd><p>A list of secret tokens to make this engine <em>private</em>, more details see +<a class="reference internal" href="../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.traits"> +<span class="sig-name descname"><span class="pre">traits</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.traits" title="Link to this definition">¶</a></dt> +<dd><p>Traits of the engine.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.Engine.using_tor_proxy"> +<span class="sig-name descname"><span class="pre">using_tor_proxy</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><a class="headerlink" href="#searx.enginelib.Engine.using_tor_proxy" title="Link to this definition">¶</a></dt> +<dd><p>Using tor proxy (<code class="docutils literal notranslate"><span class="pre">true</span></code>) or not (<code class="docutils literal notranslate"><span class="pre">false</span></code>) for this engine.</p> +</dd></dl> + +</dd></dl> + +<section id="module-searx.enginelib.traits"> +<span id="engine-traits"></span><span id="searx-enginelib-traits"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Engine traits</a><a class="headerlink" href="#module-searx.enginelib.traits" title="Link to this heading">¶</a></h2> +<p>Engine’s traits are fetched from the origin engines and stored in a JSON file +in the <em>data folder</em>. Most often traits are languages and region codes and +their mapping from SearXNG’s representation to the representation in the origin +search engine. For new traits new properties can be added to the class +<a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a>.</p> +<p>To load traits from the persistence <a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap.from_data" title="searx.enginelib.traits.EngineTraitsMap.from_data"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraitsMap.from_data</span></code></a> can be +used.</p> +<dl class="py class"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits"> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.traits.</span></span><span class="sig-name descname"><span class="pre">EngineTraits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">regions:</span> <span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">str]</span> <span class="pre">=</span> <span class="pre"><factory></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">languages:</span> <span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">str]</span> <span class="pre">=</span> <span class="pre"><factory></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_locale:</span> <span class="pre">str</span> <span class="pre">|</span> <span class="pre">None</span> <span class="pre">=</span> <span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data_type:</span> <span class="pre">~typing.Literal['traits_v1']</span> <span class="pre">=</span> <span class="pre">'traits_v1'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">custom:</span> <span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">~typing.Dict[str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">~typing.Dict]</span> <span class="pre">|</span> <span class="pre">~typing.Iterable[str]]</span> <span class="pre">=</span> <span class="pre"><factory></span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits" title="Link to this definition">¶</a></dt> +<dd><p>The class is intended to be instantiated for each engine.</p> +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.copy"> +<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.copy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.copy" title="Link to this definition">¶</a></dt> +<dd><p>Create a copy of the dataclass object.</p> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.fetch_traits"> +<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="s"><span class="pre">'EngineTraits'</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Call a function <code class="docutils literal notranslate"><span class="pre">fetch_traits(engine_traits)</span></code> from engines namespace to fetch +and set properties from the origin engine in the object <code class="docutils literal notranslate"><span class="pre">engine_traits</span></code>. If +function does not exists, <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.get_language"> +<span class="sig-name descname"><span class="pre">get_language</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">searxng_locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.get_language"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.get_language" title="Link to this definition">¶</a></dt> +<dd><p>Return engine’s language string that <em>best fits</em> to SearXNG’s locale.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>searxng_locale</strong> – SearXNG’s internal representation of locale +selected by the user.</p></li> +<li><p><strong>default</strong> – engine’s default language</p></li> +</ul> +</dd> +</dl> +<p>The <em>best fits</em> rules are implemented in +<a class="reference internal" href="../../src/searx.locales.html#searx.locales.get_engine_locale" title="searx.locales.get_engine_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.locales.get_engine_locale</span></code></a>. Except for the special value <code class="docutils literal notranslate"><span class="pre">all</span></code> +which is determined from <a class="reference internal" href="#searx.enginelib.traits.EngineTraits.all_locale" title="searx.enginelib.traits.EngineTraits.all_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraits.all_locale</span></code></a>.</p> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.get_region"> +<span class="sig-name descname"><span class="pre">get_region</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">searxng_locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.get_region"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.get_region" title="Link to this definition">¶</a></dt> +<dd><p>Return engine’s region string that best fits to SearXNG’s locale.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>searxng_locale</strong> – SearXNG’s internal representation of locale +selected by the user.</p></li> +<li><p><strong>default</strong> – engine’s default region</p></li> +</ul> +</dd> +</dl> +<p>The <em>best fits</em> rules are implemented in +<a class="reference internal" href="../../src/searx.locales.html#searx.locales.get_engine_locale" title="searx.locales.get_engine_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.locales.get_engine_locale</span></code></a>. Except for the special value <code class="docutils literal notranslate"><span class="pre">all</span></code> +which is determined from <a class="reference internal" href="#searx.enginelib.traits.EngineTraits.all_locale" title="searx.enginelib.traits.EngineTraits.all_locale"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraits.all_locale</span></code></a>.</p> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.is_locale_supported"> +<span class="sig-name descname"><span class="pre">is_locale_supported</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">searxng_locale</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.is_locale_supported"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.is_locale_supported" title="Link to this definition">¶</a></dt> +<dd><p>A <em>locale</em> (SearXNG’s internal representation) is considered to be +supported by the engine if the <em>region</em> or the <em>language</em> is supported +by the engine.</p> +<p>For verification the functions <a class="reference internal" href="#searx.enginelib.traits.EngineTraits.get_region" title="searx.enginelib.traits.EngineTraits.get_region"><code class="xref py py-func docutils literal notranslate"><span class="pre">EngineTraits.get_region()</span></code></a> and +<a class="reference internal" href="#searx.enginelib.traits.EngineTraits.get_language" title="searx.enginelib.traits.EngineTraits.get_language"><code class="xref py py-func docutils literal notranslate"><span class="pre">EngineTraits.get_language()</span></code></a> are used.</p> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.set_traits"> +<span class="sig-name descname"><span class="pre">set_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraits.set_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.set_traits" title="Link to this definition">¶</a></dt> +<dd><p>Set traits from self object in a <a class="reference internal" href="#searx.enginelib.Engine" title="searx.enginelib.Engine"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Engine</span></code></a> namespace.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><p><strong>engine</strong> – engine instance build by <a class="reference internal" href="engines.html#searx.engines.load_engine" title="searx.engines.load_engine"><code class="xref py py-func docutils literal notranslate"><span class="pre">searx.engines.load_engine()</span></code></a></p> +</dd> +</dl> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.all_locale"> +<span class="sig-name descname"><span class="pre">all_locale</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.all_locale" title="Link to this definition">¶</a></dt> +<dd><p>To which locale value SearXNG’s <code class="docutils literal notranslate"><span class="pre">all</span></code> language is mapped (shown a “Default +language”).</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.custom"> +<span class="sig-name descname"><span class="pre">custom</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Iterable" title="(in Python v3.13)"><span class="pre">Iterable</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.custom" title="Link to this definition">¶</a></dt> +<dd><p>A place to store engine’s custom traits, not related to the SearXNG core.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.data_type"> +<span class="sig-name descname"><span class="pre">data_type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Literal" title="(in Python v3.13)"><span class="pre">Literal</span></a><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'traits_v1'</span></span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'traits_v1'</span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.data_type" title="Link to this definition">¶</a></dt> +<dd><p>Data type, default is ‘traits_v1’.</p> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.languages"> +<span class="sig-name descname"><span class="pre">languages</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.languages" title="Link to this definition">¶</a></dt> +<dd><p>Maps SearXNG’s internal representation of a language to the one of the engine.</p> +<p>SearXNG’s internal representation can be parsed by babel and the value is +send to the engine:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">languages</span> <span class="o">=</span> <span class="p">{</span> + <span class="s1">'ca'</span> <span class="p">:</span> <span class="o"><</span><span class="n">engine</span><span class="s1">'s language name>,</span> +<span class="p">}</span> + +<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">egnine_lang</span> <span class="ow">in</span> <span class="n">languages</span><span class="o">.</span><span class="n">items</span><span class="p">():</span> + <span class="n">searxng_lang</span> <span class="o">=</span> <span class="n">babel</span><span class="o">.</span><span class="n">Locale</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">key</span><span class="p">)</span> + <span class="o">...</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraits.regions"> +<span class="sig-name descname"><span class="pre">regions</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraits.regions" title="Link to this definition">¶</a></dt> +<dd><p>Maps SearXNG’s internal representation of a region to the one of the engine.</p> +<p>SearXNG’s internal representation can be parsed by babel and the value is +send to the engine:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">regions</span> <span class="o">=</span><span class="p">{</span> + <span class="s1">'fr-BE'</span> <span class="p">:</span> <span class="o"><</span><span class="n">engine</span><span class="s1">'s region name>,</span> +<span class="p">}</span> + +<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">egnine_region</span> <span class="n">regions</span><span class="o">.</span><span class="n">items</span><span class="p">():</span> + <span class="n">searxng_region</span> <span class="o">=</span> <span class="n">babel</span><span class="o">.</span><span class="n">Locale</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s1">'-'</span><span class="p">)</span> + <span class="o">...</span> +</pre></div> +</div> +</dd></dl> + +</dd></dl> + +<dl class="py class"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsEncoder"> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.traits.</span></span><span class="sig-name descname"><span class="pre">EngineTraitsEncoder</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">skipkeys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ensure_ascii</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">check_circular</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allow_nan</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sort_keys</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">indent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">separators</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsEncoder"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsEncoder" title="Link to this definition">¶</a></dt> +<dd><p>Encodes <a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a> to a serializable object, see +<a class="reference external" href="https://docs.python.org/3/library/json.html#json.JSONEncoder" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">json.JSONEncoder</span></code></a>.</p> +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsEncoder.default"> +<span class="sig-name descname"><span class="pre">default</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">o</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsEncoder.default"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsEncoder.default" title="Link to this definition">¶</a></dt> +<dd><p>Return dictionary of a <a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a> object.</p> +</dd></dl> + +</dd></dl> + +<dl class="py class"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap"> +<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">searx.enginelib.traits.</span></span><span class="sig-name descname"><span class="pre">EngineTraitsMap</span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap" title="Link to this definition">¶</a></dt> +<dd><p>A python dictionary to map <a class="reference internal" href="#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraits</span></code></a> by engine name.</p> +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.from_data"> +<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_data</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap" title="searx.enginelib.traits.EngineTraitsMap"><span class="pre">EngineTraitsMap</span></a></span></span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap.from_data"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.from_data" title="Link to this definition">¶</a></dt> +<dd><p>Instantiate <a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap" title="searx.enginelib.traits.EngineTraitsMap"><code class="xref py py-class docutils literal notranslate"><span class="pre">EngineTraitsMap</span></code></a> object from <code class="xref py py-obj docutils literal notranslate"><span class="pre">ENGINE_TRAITS</span></code></p> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.save_data"> +<span class="sig-name descname"><span class="pre">save_data</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap.save_data"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.save_data" title="Link to this definition">¶</a></dt> +<dd><p>Store EngineTraitsMap in in file <code class="xref py py-obj docutils literal notranslate"><span class="pre">self.ENGINE_TRAITS_FILE</span></code></p> +</dd></dl> + +<dl class="py method"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.set_traits"> +<span class="sig-name descname"><span class="pre">set_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.13)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/enginelib/traits.html#EngineTraitsMap.set_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.set_traits" title="Link to this definition">¶</a></dt> +<dd><p>Set traits in a <code class="xref py py-obj docutils literal notranslate"><span class="pre">Engine</span></code> namespace.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><p><strong>engine</strong> – engine instance build by <a class="reference internal" href="engines.html#searx.engines.load_engine" title="searx.engines.load_engine"><code class="xref py py-func docutils literal notranslate"><span class="pre">searx.engines.load_engine()</span></code></a></p> +</dd> +</dl> +</dd></dl> + +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.enginelib.traits.EngineTraitsMap.ENGINE_TRAITS_FILE"> +<span class="sig-name descname"><span class="pre">ENGINE_TRAITS_FILE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">PosixPath('/home/runner/work/searxng/searxng/searx/data/engine_traits.json')</span></em><a class="headerlink" href="#searx.enginelib.traits.EngineTraitsMap.ENGINE_TRAITS_FILE" title="Link to this definition">¶</a></dt> +<dd><p>File with persistence of the <a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap" title="searx.enginelib.traits.EngineTraitsMap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraitsMap</span></code></a>.</p> +</dd></dl> + +</dd></dl> + +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3 current"><a class="current reference internal" href="#">Engine Library</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#searx.enginelib.Engine"><code class="docutils literal notranslate"><span class="pre">Engine</span></code></a><ul> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.about"><code class="docutils literal notranslate"><span class="pre">Engine.about</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.categories"><code class="docutils literal notranslate"><span class="pre">Engine.categories</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.disabled"><code class="docutils literal notranslate"><span class="pre">Engine.disabled</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.display_error_messages"><code class="docutils literal notranslate"><span class="pre">Engine.display_error_messages</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.enable_http"><code class="docutils literal notranslate"><span class="pre">Engine.enable_http</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.engine"><code class="docutils literal notranslate"><span class="pre">Engine.engine</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.engine_type"><code class="docutils literal notranslate"><span class="pre">Engine.engine_type</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.fetch_traits"><code class="docutils literal notranslate"><span class="pre">Engine.fetch_traits</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.inactive"><code class="docutils literal notranslate"><span class="pre">Engine.inactive</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.language"><code class="docutils literal notranslate"><span class="pre">Engine.language</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.language_support"><code class="docutils literal notranslate"><span class="pre">Engine.language_support</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.name"><code class="docutils literal notranslate"><span class="pre">Engine.name</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.paging"><code class="docutils literal notranslate"><span class="pre">Engine.paging</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.proxies"><code class="docutils literal notranslate"><span class="pre">Engine.proxies</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.region"><code class="docutils literal notranslate"><span class="pre">Engine.region</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.safesearch"><code class="docutils literal notranslate"><span class="pre">Engine.safesearch</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.send_accept_language_header"><code class="docutils literal notranslate"><span class="pre">Engine.send_accept_language_header</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.shortcut"><code class="docutils literal notranslate"><span class="pre">Engine.shortcut</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.time_range_support"><code class="docutils literal notranslate"><span class="pre">Engine.time_range_support</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.timeout"><code class="docutils literal notranslate"><span class="pre">Engine.timeout</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.tokens"><code class="docutils literal notranslate"><span class="pre">Engine.tokens</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.traits"><code class="docutils literal notranslate"><span class="pre">Engine.traits</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.Engine.using_tor_proxy"><code class="docutils literal notranslate"><span class="pre">Engine.using_tor_proxy</span></code></a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="#module-searx.enginelib.traits">Engine traits</a><ul> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.traits.EngineTraits"><code class="docutils literal notranslate"><span class="pre">EngineTraits</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.traits.EngineTraitsEncoder"><code class="docutils literal notranslate"><span class="pre">EngineTraitsEncoder</span></code></a></li> +<li class="toctree-l5"><a class="reference internal" href="#searx.enginelib.traits.EngineTraitsMap"><code class="docutils literal notranslate"><span class="pre">EngineTraitsMap</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3"><a class="reference internal" href="index.html#engine-types">Engine Types</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="index.html" title="previous chapter">Engine Implementations</a> + <li>Next: <a href="engines.html" title="next chapter">SearXNG’s engines loader</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/engines/enginelib.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/engines.html b/dev/engines/engines.html new file mode 100644 index 000000000..55bb74696 --- /dev/null +++ b/dev/engines/engines.html @@ -0,0 +1,215 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>SearXNG’s engines loader — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="Engine Overview" href="engine_overview.html" /> + <link rel="prev" title="Engine Library" href="enginelib.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="engine_overview.html" title="Engine Overview" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="enginelib.html" title="Engine Library" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">SearXNG’s engines loader</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="module-searx.engines"> +<span id="searxng-s-engines-loader"></span><span id="searx-engines-loader"></span><h1>SearXNG’s engines loader<a class="headerlink" href="#module-searx.engines" title="Link to this heading">¶</a></h1> +<p>Load and initialize the <code class="docutils literal notranslate"><span class="pre">engines</span></code>, see <a class="reference internal" href="#searx.engines.load_engines" title="searx.engines.load_engines"><code class="xref py py-func docutils literal notranslate"><span class="pre">load_engines()</span></code></a> and register +<a class="reference internal" href="#searx.engines.engine_shortcuts" title="searx.engines.engine_shortcuts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">engine_shortcuts</span></code></a>.</p> +<p>usage:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">load_engines</span><span class="p">(</span> <span class="n">settings</span><span class="p">[</span><span class="s1">'engines'</span><span class="p">]</span> <span class="p">)</span> +</pre></div> +</div> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.is_missing_required_attributes"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">is_missing_required_attributes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines.html#is_missing_required_attributes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.is_missing_required_attributes" title="Link to this definition">¶</a></dt> +<dd><p>An attribute is required when its name doesn’t start with <code class="docutils literal notranslate"><span class="pre">_</span></code> (underline). +Required attributes must not be <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.load_engine"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">load_engine</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.13)"><span class="pre">types.ModuleType</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../_modules/searx/engines.html#load_engine"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.load_engine" title="Link to this definition">¶</a></dt> +<dd><p>Load engine from <code class="docutils literal notranslate"><span class="pre">engine_data</span></code>.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><p><strong>engine_data</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><em>dict</em></a>) – Attributes from YAML <code class="docutils literal notranslate"><span class="pre">settings:engines/<engine></span></code></p> +</dd> +<dt class="field-even">Returns<span class="colon">:</span></dt> +<dd class="field-even"><p>initialized namespace of the <code class="docutils literal notranslate"><span class="pre"><engine></span></code>.</p> +</dd> +</dl> +<ol class="arabic simple"> +<li><p>create a namespace and load module of the <code class="docutils literal notranslate"><span class="pre"><engine></span></code></p></li> +<li><p>update namespace with the defaults from <code class="xref py py-obj docutils literal notranslate"><span class="pre">ENGINE_DEFAULT_ARGS</span></code></p></li> +<li><p>update namespace with values from <code class="docutils literal notranslate"><span class="pre">engine_data</span></code></p></li> +</ol> +<p>If engine <em>is active</em>, return namespace of the engine, otherwise return +<code class="docutils literal notranslate"><span class="pre">None</span></code>.</p> +<p>This function also returns <code class="docutils literal notranslate"><span class="pre">None</span></code> if initialization of the namespace fails +for one of the following reasons:</p> +<ul class="simple"> +<li><p>engine name contains underscore</p></li> +<li><p>engine name is not lowercase</p></li> +<li><p>required attribute is not set <a class="reference internal" href="#searx.engines.is_missing_required_attributes" title="searx.engines.is_missing_required_attributes"><code class="xref py py-func docutils literal notranslate"><span class="pre">is_missing_required_attributes()</span></code></a></p></li> +</ul> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.load_engines"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">load_engines</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_list</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines.html#load_engines"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.load_engines" title="Link to this definition">¶</a></dt> +<dd><p>usage: <code class="docutils literal notranslate"><span class="pre">engine_list</span> <span class="pre">=</span> <span class="pre">settings['engines']</span></code></p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.using_tor_proxy"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">using_tor_proxy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="enginelib.html#searx.enginelib.Engine" title="searx.enginelib.Engine"><span class="pre">Engine</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/types.html#types.ModuleType" title="(in Python v3.13)"><span class="pre">types.ModuleType</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines.html#using_tor_proxy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.using_tor_proxy" title="Link to this definition">¶</a></dt> +<dd><p>Return True if the engine configuration declares to use Tor.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.engine_shortcuts"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.</span></span><span class="sig-name descname"><span class="pre">engine_shortcuts</span></span><a class="headerlink" href="#searx.engines.engine_shortcuts" title="Link to this definition">¶</a></dt> +<dd><p>Simple map of registered <em>shortcuts</em> to name of the engine (or <code class="docutils literal notranslate"><span class="pre">None</span></code>).</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">engine_shortcuts</span><span class="p">[</span><span class="n">engine</span><span class="o">.</span><span class="n">shortcut</span><span class="p">]</span> <span class="o">=</span> <span class="n">engine</span><span class="o">.</span><span class="n">name</span> +</pre></div> +</div> +<dl class="field-list simple"> +</dl> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#">SearXNG’s engines loader</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#searx.engines.is_missing_required_attributes"><code class="docutils literal notranslate"><span class="pre">is_missing_required_attributes()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#searx.engines.load_engine"><code class="docutils literal notranslate"><span class="pre">load_engine()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#searx.engines.load_engines"><code class="docutils literal notranslate"><span class="pre">load_engines()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#searx.engines.using_tor_proxy"><code class="docutils literal notranslate"><span class="pre">using_tor_proxy()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#searx.engines.engine_shortcuts"><code class="docutils literal notranslate"><span class="pre">engine_shortcuts</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3"><a class="reference internal" href="index.html#engine-types">Engine Types</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="enginelib.html" title="previous chapter">Engine Library</a> + <li>Next: <a href="engine_overview.html" title="next chapter">Engine Overview</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/engines/engines.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/index.html b/dev/engines/index.html new file mode 100644 index 000000000..e30214d77 --- /dev/null +++ b/dev/engines/index.html @@ -0,0 +1,359 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>Engine Implementations — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="Engine Library" href="enginelib.html" /> + <link rel="prev" title="How to contribute" href="../contribution_guide.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="enginelib.html" title="Engine Library" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../contribution_guide.html" title="How to contribute" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Engine Implementations</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="engine-implementations"> +<span id="id1"></span><h1>Engine Implementations<a class="headerlink" href="#engine-implementations" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#engine-types" id="id7">Engine Types</a></p> +<ul> +<li><p><a class="reference internal" href="#online-engines" id="id8">Online Engines</a></p></li> +<li><p><a class="reference internal" href="#offline-engines" id="id9">Offline Engines</a></p></li> +<li><p><a class="reference internal" href="#online-url-search" id="id10">Online URL Search</a></p></li> +<li><p><a class="reference internal" href="#online-currency" id="id11">Online Currency</a></p></li> +<li><p><a class="reference internal" href="#online-dictionary" id="id12">Online Dictionary</a></p></li> +</ul> +</li> +</ul> +</nav> +<div class="toctree-wrapper compound"> +<p class="caption" role="heading"><span class="caption-text">Framework Components</span></p> +<ul> +<li class="toctree-l1"><a class="reference internal" href="enginelib.html">Engine Library</a><ul> +<li class="toctree-l2"><a class="reference internal" href="enginelib.html#searx.enginelib.Engine"><code class="docutils literal notranslate"><span class="pre">Engine</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="enginelib.html#module-searx.enginelib.traits">Engine traits</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="engines.html">SearXNG’s engines loader</a><ul> +<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.is_missing_required_attributes"><code class="docutils literal notranslate"><span class="pre">is_missing_required_attributes()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.load_engine"><code class="docutils literal notranslate"><span class="pre">load_engine()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.load_engines"><code class="docutils literal notranslate"><span class="pre">load_engines()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.using_tor_proxy"><code class="docutils literal notranslate"><span class="pre">using_tor_proxy()</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="engines.html#searx.engines.engine_shortcuts"><code class="docutils literal notranslate"><span class="pre">engine_shortcuts</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="engine_overview.html">Engine Overview</a><ul> +<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#general-engine-configuration">General Engine Configuration</a></li> +<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#making-a-request">Making a Request</a></li> +<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#result-types-template">Result Types (<code class="docutils literal notranslate"><span class="pre">template</span></code>)</a></li> +</ul> +</li> +</ul> +</div> +<section id="engine-types"> +<h2><a class="toc-backref" href="#id7" role="doc-backlink">Engine Types</a><a class="headerlink" href="#engine-types" title="Link to this heading">¶</a></h2> +<p>The <a class="reference internal" href="enginelib.html#searx.enginelib.Engine.engine_type" title="searx.enginelib.Engine.engine_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">engine_type</span></code></a> of an engine +determines which <a class="reference internal" href="../../src/searx.search.processors.html#searx-search-processors"><span class="std std-ref">search processor</span></a> is used by +the engine.</p> +<p>In this section a list of the engines that are documented is given, a complete +list of the engines can be found in the source under: <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">git://searx/engines</a>.</p> +<section id="online-engines"> +<span id="id2"></span><h3><a class="toc-backref" href="#id8" role="doc-backlink">Online Engines</a><a class="headerlink" href="#online-engines" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online" title="searx.search.processors.online"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online</span></code></a></p></li> +</ul> +</aside> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l1"><a class="reference internal" href="xpath.html">XPath Engine</a></li> +<li class="toctree-l1"><a class="reference internal" href="mediawiki.html">MediaWiki Engine</a></li> +</ul> +</div> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="online/adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/bing.html">Bing Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/bpb.html">Bpb</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/brave.html">Brave Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/bt4g.html">BT4G</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/discourse.html">Discourse Forums</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/geizhals.html">Geizhals</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/gitea.html">Gitea</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/gitlab.html">GitLab</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/google.html">Google Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/loc.html">Library of Congress</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/odysee.html">Odysee</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/piped.html">Piped</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/presearch.html">Presearch Engine</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/qwant.html">Qwant</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/void.html">Void Linux binary packages</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/yacy.html">Yacy</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l1"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li> +</ul> +</div> +</section> +<section id="offline-engines"> +<span id="id3"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink">Offline Engines</a><a class="headerlink" href="#offline-engines" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.offline" title="searx.search.processors.offline"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.offline</span></code></a></p></li> +</ul> +</aside> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="offline_concept.html">Offline Concept</a></li> +<li class="toctree-l1"><a class="reference internal" href="demo/demo_offline.html">Demo Offline Engine</a></li> +<li class="toctree-l1"><a class="reference internal" href="offline/command-line-engines.html">Command Line Engines</a></li> +<li class="toctree-l1"><a class="reference internal" href="offline/nosql-engines.html">NoSQL databases</a></li> +<li class="toctree-l1"><a class="reference internal" href="offline/search-indexer-engines.html">Local Search APIs</a></li> +<li class="toctree-l1"><a class="reference internal" href="offline/sql-engines.html">SQL Engines</a></li> +</ul> +</div> +</section> +<section id="online-url-search"> +<span id="id4"></span><h3><a class="toc-backref" href="#id10" role="doc-backlink">Online URL Search</a><a class="headerlink" href="#online-url-search" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online_url_search" title="searx.search.processors.online_url_search"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online_url_search</span></code></a></p></li> +</ul> +</aside> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="online_url_search/tineye.html">Tineye</a></li> +</ul> +</div> +</section> +<section id="online-currency"> +<span id="id5"></span><h3><a class="toc-backref" href="#id11" role="doc-backlink">Online Currency</a><a class="headerlink" href="#online-currency" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online_currency" title="searx.search.processors.online_currency"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online_currency</span></code></a></p></li> +</ul> +</aside> +<p><em>no engine of this type is documented yet / coming soon</em></p> +</section> +<section id="online-dictionary"> +<span id="id6"></span><h3><a class="toc-backref" href="#id12" role="doc-backlink">Online Dictionary</a><a class="headerlink" href="#online-dictionary" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.online_dictionary" title="searx.search.processors.online_dictionary"><code class="xref py py-obj docutils literal notranslate"><span class="pre">processors.online_dictionary</span></code></a></p></li> +</ul> +</aside> +<p><em>no engine of this type is documented yet / coming soon</em></p> +</section> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Engine Implementations</a><ul> +<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3"><a class="reference internal" href="#engine-types">Engine Types</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#online-engines">Online Engines</a><ul> +<li class="toctree-l5"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="#offline-engines">Offline Engines</a><ul> +<li class="toctree-l5"><a class="reference internal" href="offline_concept.html">Offline Concept</a></li> +<li class="toctree-l5"><a class="reference internal" href="demo/demo_offline.html">Demo Offline Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/command-line-engines.html">Command Line Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/nosql-engines.html">NoSQL databases</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/search-indexer-engines.html">Local Search APIs</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/sql-engines.html">SQL Engines</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="#online-url-search">Online URL Search</a><ul> +<li class="toctree-l5"><a class="reference internal" href="online_url_search/tineye.html">Tineye</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="../contribution_guide.html" title="previous chapter">How to contribute</a> + <li>Next: <a href="enginelib.html" title="next chapter">Engine Library</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/engines/index.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/mediawiki.html b/dev/engines/mediawiki.html new file mode 100644 index 000000000..a6ea4fab7 --- /dev/null +++ b/dev/engines/mediawiki.html @@ -0,0 +1,285 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>MediaWiki Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="Adobe Stock" href="online/adobe_stock.html" /> + <link rel="prev" title="XPath Engine" href="xpath.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="online/adobe_stock.html" title="Adobe Stock" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="xpath.html" title="XPath Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">MediaWiki Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="mediawiki-engine"> +<span id="id1"></span><h1>MediaWiki Engine<a class="headerlink" href="#mediawiki-engine" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.mediawiki">The MediaWiki engine is a <em>generic</em> engine to <strong>query</strong> Wikimedia wikis by +the <a class="reference external" href="https://www.mediawiki.org/wiki/API:Main_page">MediaWiki Action API</a>. For a <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&modules=query">query action</a> all Wikimedia wikis have +endpoints that follow this pattern:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://{base_url}/w/api.php?action=query&list=search&format=json +</pre></div> +</div> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>In its actual state, this engine is implemented to parse JSON result +(<a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&modules=json">format=json</a>) from a search query (<a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bsearch">list=search</a>). If you need other +<code class="docutils literal notranslate"><span class="pre">action</span></code> and <code class="docutils literal notranslate"><span class="pre">list</span></code> types ask SearXNG developers to extend the +implementation according to your needs.</p> +</div> +<section id="configuration"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>Request:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.mediawiki.base_url" title="searx.engines.mediawiki.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.mediawiki.search_type" title="searx.engines.mediawiki.search_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_type</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.mediawiki.srenablerewrites" title="searx.engines.mediawiki.srenablerewrites"><code class="xref py py-obj docutils literal notranslate"><span class="pre">srenablerewrites</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.mediawiki.srsort" title="searx.engines.mediawiki.srsort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">srsort</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.mediawiki.srprop" title="searx.engines.mediawiki.srprop"><code class="xref py py-obj docutils literal notranslate"><span class="pre">srprop</span></code></a></p></li> +</ul> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mediawiki.api_path"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">api_path</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'w/api.php'</span></em><a class="headerlink" href="#searx.engines.mediawiki.api_path" title="Link to this definition">¶</a></dt> +<dd><p>The path the PHP api is listening on.</p> +<p>The default path should work fine usually.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mediawiki.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://{language}.wikipedia.org/'</span></em><a class="headerlink" href="#searx.engines.mediawiki.base_url" title="Link to this definition">¶</a></dt> +<dd><p>Base URL of the Wikimedia wiki.</p> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">{language}</span></code>:</dt><dd><p>ISO 639-1 language code (en, de, fr ..) of the search language.</p> +</dd> +</dl> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mediawiki.search_type"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">search_type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'nearmatch'</span></em><a class="headerlink" href="#searx.engines.mediawiki.search_type" title="Link to this definition">¶</a></dt> +<dd><p>Which type of search to perform. One of the following values: <code class="docutils literal notranslate"><span class="pre">nearmatch</span></code>, +<code class="docutils literal notranslate"><span class="pre">text</span></code> or <code class="docutils literal notranslate"><span class="pre">title</span></code>.</p> +<p>See <code class="docutils literal notranslate"><span class="pre">srwhat</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bsearch">list=search</a> documentation.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mediawiki.srenablerewrites"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">srenablerewrites</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.mediawiki.srenablerewrites" title="Link to this definition">¶</a></dt> +<dd><p>Enable internal query rewriting (Type: boolean). Some search backends can +rewrite the query into another which is thought to provide better results, for +instance by correcting spelling errors.</p> +<p>See <code class="docutils literal notranslate"><span class="pre">srenablerewrites</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bsearch">list=search</a> documentation.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mediawiki.srprop"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">srprop</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'sectiontitle|snippet|timestamp|categorysnippet'</span></em><a class="headerlink" href="#searx.engines.mediawiki.srprop" title="Link to this definition">¶</a></dt> +<dd><p>Which properties to return.</p> +<p>See <code class="docutils literal notranslate"><span class="pre">srprop</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bsearch">list=search</a> documentation.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mediawiki.srsort"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">srsort</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'relevance'</span></em><a class="headerlink" href="#searx.engines.mediawiki.srsort" title="Link to this definition">¶</a></dt> +<dd><p>Set the sort order of returned results. One of the following values: +<code class="docutils literal notranslate"><span class="pre">create_timestamp_asc</span></code>, <code class="docutils literal notranslate"><span class="pre">create_timestamp_desc</span></code>, <code class="docutils literal notranslate"><span class="pre">incoming_links_asc</span></code>, +<code class="docutils literal notranslate"><span class="pre">incoming_links_desc</span></code>, <code class="docutils literal notranslate"><span class="pre">just_match</span></code>, <code class="docutils literal notranslate"><span class="pre">last_edit_asc</span></code>, <code class="docutils literal notranslate"><span class="pre">last_edit_desc</span></code>, +<code class="docutils literal notranslate"><span class="pre">none</span></code>, <code class="docutils literal notranslate"><span class="pre">random</span></code>, <code class="docutils literal notranslate"><span class="pre">relevance</span></code>, <code class="docutils literal notranslate"><span class="pre">user_random</span></code>.</p> +<p>See <code class="docutils literal notranslate"><span class="pre">srenablerewrites</span></code> argument in <a class="reference external" href="https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bsearch">list=search</a> documentation.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mediawiki.timestamp_format"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mediawiki.</span></span><span class="sig-name descname"><span class="pre">timestamp_format</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'%Y-%m-%dT%H:%M:%SZ'</span></em><a class="headerlink" href="#searx.engines.mediawiki.timestamp_format" title="Link to this definition">¶</a></dt> +<dd><p>The longhand version of MediaWiki time strings.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="xpath.html">XPath Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="xpath.html" title="previous chapter">XPath Engine</a> + <li>Next: <a href="online/adobe_stock.html" title="next chapter">Adobe Stock</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/engines/mediawiki.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/offline/command-line-engines.html b/dev/engines/offline/command-line-engines.html new file mode 100644 index 000000000..e8ae97598 --- /dev/null +++ b/dev/engines/offline/command-line-engines.html @@ -0,0 +1,249 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Command Line Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="NoSQL databases" href="nosql-engines.html" /> + <link rel="prev" title="Demo Offline Engine" href="../demo/demo_offline.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="nosql-engines.html" title="NoSQL databases" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../demo/demo_offline.html" title="Demo Offline Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Command Line Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="command-line-engines"> +<span id="engine-command"></span><h1>Command Line Engines<a class="headerlink" href="#command-line-engines" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/command.py">command.py</a></p></li> +<li><p><a class="reference internal" href="../index.html#offline-engines"><span class="std std-ref">Offline Engines</span></a></p></li> +</ul> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#example" id="id2">Example</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p> +</aside> +<p id="module-searx.engines.command">With <em>command engines</em> administrators can run engines to integrate arbitrary +shell commands.</p> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>When creating and enabling a <code class="docutils literal notranslate"><span class="pre">command</span></code> engine on a public instance, you +must be careful to avoid leaking private data.</p> +</div> +<p>The easiest solution is to limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described +in section <a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>. The engine base is flexible. Only your +imagination can limit the power of this engine (and maybe security concerns).</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The following options are available:</p> +<dl> +<dt><code class="docutils literal notranslate"><span class="pre">command</span></code>:</dt><dd><p>A comma separated list of the elements of the command. A special token +<code class="docutils literal notranslate"><span class="pre">{{QUERY}}</span></code> tells where to put the search terms of the user. Example:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">[</span><span class="s">'ls'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'-l'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'-h'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'{{QUERY}}'</span><span class="p p-Indicator">]</span> +</pre></div> +</div> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">delimiter</span></code>:</dt><dd><p>A mapping containing a delimiter <code class="docutils literal notranslate"><span class="pre">char</span></code> and the <em>titles</em> of each element in +<code class="docutils literal notranslate"><span class="pre">keys</span></code>.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">parse_regex</span></code>:</dt><dd><p>A dict containing the regular expressions for each result key.</p> +</dd> +</dl> +<p><code class="docutils literal notranslate"><span class="pre">query_type</span></code>:</p> +<blockquote> +<div><p>The expected type of user search terms. Possible values: <code class="docutils literal notranslate"><span class="pre">path</span></code> and +<code class="docutils literal notranslate"><span class="pre">enum</span></code>.</p> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">path</span></code>:</dt><dd><p>Checks if the user provided path is inside the working directory. If not, +the query is not executed.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">enum</span></code>:</dt><dd><p>Is a list of allowed search terms. If the user submits something which is +not included in the list, the query returns an error.</p> +</dd> +</dl> +</div></blockquote> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">query_enum</span></code>:</dt><dd><p>A list containing allowed search terms if <code class="docutils literal notranslate"><span class="pre">query_type</span></code> is set to <code class="docutils literal notranslate"><span class="pre">enum</span></code>.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">working_dir</span></code>:</dt><dd><p>The directory where the command has to be executed. Default: <code class="docutils literal notranslate"><span class="pre">./</span></code>.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">result_separator</span></code>:</dt><dd><p>The character that separates results. Default: <code class="docutils literal notranslate"><span class="pre">\n</span></code>.</p> +</dd> +</dl> +</section> +<section id="example"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Example</a><a class="headerlink" href="#example" title="Link to this heading">¶</a></h2> +<p>The example engine below can be used to find files with a specific name in the +configured working directory:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">find</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">command</span> +<span class="w"> </span><span class="nt">command</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">'find'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'.'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'-name'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'{{QUERY}}'</span><span class="p p-Indicator">]</span> +<span class="w"> </span><span class="nt">query_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fnd</span> +<span class="w"> </span><span class="nt">delimiter</span><span class="p">:</span> +<span class="w"> </span><span class="nt">chars</span><span class="p">:</span><span class="w"> </span><span class="s">'</span><span class="nv"> </span><span class="s">'</span> +<span class="w"> </span><span class="nt">keys</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">'line'</span><span class="p p-Indicator">]</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.command.check_parsing_options"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.command.</span></span><span class="sig-name descname"><span class="pre">check_parsing_options</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/command.html#check_parsing_options"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.command.check_parsing_options" title="Link to this definition">¶</a></dt> +<dd><p>Checks if delimiter based parsing or regex parsing is configured correctly</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Command Line Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="nosql-engines.html">NoSQL databases</a></li> +<li class="toctree-l5"><a class="reference internal" href="search-indexer-engines.html">Local Search APIs</a></li> +<li class="toctree-l5"><a class="reference internal" href="sql-engines.html">SQL Engines</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="../demo/demo_offline.html" title="previous chapter">Demo Offline Engine</a> + <li>Next: <a href="nosql-engines.html" title="next chapter">NoSQL databases</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/offline/command-line-engines.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/offline/nosql-engines.html b/dev/engines/offline/nosql-engines.html new file mode 100644 index 000000000..0eea568c0 --- /dev/null +++ b/dev/engines/offline/nosql-engines.html @@ -0,0 +1,300 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>NoSQL databases — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Local Search APIs" href="search-indexer-engines.html" /> + <link rel="prev" title="Command Line Engines" href="command-line-engines.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="search-indexer-engines.html" title="Local Search APIs" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="command-line-engines.html" title="Command Line Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">NoSQL databases</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="nosql-databases"> +<span id="nosql-engines"></span><h1>NoSQL databases<a class="headerlink" href="#nosql-databases" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/NoSQL">NoSQL databases</a></p></li> +<li><p><a class="reference external" href="https://redis.io/">redis.io</a></p></li> +<li><p><a class="reference external" href="https://www.mongodb.com">MongoDB</a></p></li> +</ul> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#extra-dependencies" id="id6">Extra Dependencies</a></p></li> +<li><p><a class="reference internal" href="#configure-the-engines" id="id7">Configure the engines</a></p> +<ul> +<li><p><a class="reference internal" href="#redis-server" id="id8">Redis Server</a></p></li> +<li><p><a class="reference internal" href="#engine-mongodb" id="id9">MongoDB</a></p></li> +</ul> +</li> +</ul> +</nav> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p> +</aside> +<p>The following <a class="reference external" href="https://en.wikipedia.org/wiki/NoSQL">NoSQL databases</a> are supported:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#engine-redis-server"><span class="std std-ref">Redis Server</span></a></p></li> +<li><p><a class="reference internal" href="#engine-mongodb"><span class="std std-ref">MongoDB</span></a></p></li> +</ul> +<p>All of the engines above are just commented out in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">settings.yml</a>, as you have to set various options and install +dependencies before using them.</p> +<p>By default, the engines use the <code class="docutils literal notranslate"><span class="pre">key-value</span></code> template for displaying results / +see <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/key-value.html">simple</a> +theme. If you are not satisfied with the original result layout, you can use +your own template, set <code class="docutils literal notranslate"><span class="pre">result_template</span></code> attribute to <code class="docutils literal notranslate"><span class="pre">{template_name}</span></code> and +place the templates at:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">searx</span><span class="o">/</span><span class="n">templates</span><span class="o">/</span><span class="p">{</span><span class="n">theme_name</span><span class="p">}</span><span class="o">/</span><span class="n">result_templates</span><span class="o">/</span><span class="p">{</span><span class="n">template_name</span><span class="p">}</span> +</pre></div> +</div> +<p>Furthermore, if you do not wish to expose these engines on a public instance, you +can still add them and limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described in +section <a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p> +<section id="extra-dependencies"> +<h2><a class="toc-backref" href="#id6" role="doc-backlink">Extra Dependencies</a><a class="headerlink" href="#extra-dependencies" title="Link to this heading">¶</a></h2> +<p>For using <a class="reference internal" href="#engine-redis-server"><span class="std std-ref">Redis Server</span></a> or <a class="reference internal" href="#engine-mongodb"><span class="std std-ref">MongoDB</span></a> you need to +install additional packages in Python’s Virtual Environment of your SearXNG +instance. To switch into the environment (<a class="reference internal" href="../../../admin/installation-searxng.html#searxng-src"><span class="std std-ref">Install SearXNG & dependencies</span></a>) you can use +<a class="reference internal" href="../../../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo utils/searxng.sh instance cmd bash +(searxng-pyenv)$ pip install ... +</pre></div> +</div> +</section> +<section id="configure-the-engines"> +<h2><a class="toc-backref" href="#id7" role="doc-backlink">Configure the engines</a><a class="headerlink" href="#configure-the-engines" title="Link to this heading">¶</a></h2> +<p><a class="reference external" href="https://en.wikipedia.org/wiki/NoSQL">NoSQL databases</a> are used for storing arbitrary data without first defining +their structure.</p> +<section id="redis-server"> +<span id="engine-redis-server"></span><h3><a class="toc-backref" href="#id8" role="doc-backlink">Redis Server</a><a class="headerlink" href="#redis-server" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="reference external" href="https://github.com/andymccurdy/redis-py#installation">redis</a></p></li> +<li><p><a class="reference external" href="https://redis.io/">redis.io</a></p></li> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/redis_server.py">redis_server.py</a></p></li> +</ul> +</aside> +<p id="module-searx.engines.redis_server">Redis is an open source (BSD licensed), in-memory data structure (key value +based) store. Before configuring the <code class="docutils literal notranslate"><span class="pre">redis_server</span></code> engine, you must install +the dependency <a class="reference external" href="https://github.com/andymccurdy/redis-py#installation">redis</a>.</p> +<section id="configuration"> +<h4>Configuration<a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h4> +<p>Select a database to search in and set its index in the option <code class="docutils literal notranslate"><span class="pre">db</span></code>. You can +either look for exact matches or use partial keywords to find what you are +looking for by configuring <code class="docutils literal notranslate"><span class="pre">exact_match_only</span></code>.</p> +</section> +<section id="example"> +<h4>Example<a class="headerlink" href="#example" title="Link to this heading">¶</a></h4> +<p>Below is an example configuration:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># Required dependency: redis</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myredis</span> +<span class="w"> </span><span class="nt">shortcut </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">rds</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">redis_server</span> +<span class="w"> </span><span class="nt">exact_match_only</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span> +<span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="s">'127.0.0.1'</span> +<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">6379</span> +<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="s">''</span> +<span class="w"> </span><span class="nt">db</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">0</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h4>Implementations<a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h4> +</section> +</section> +<section id="engine-mongodb"> +<span id="id2"></span><h3><a class="toc-backref" href="#id9" role="doc-backlink">MongoDB</a><a class="headerlink" href="#engine-mongodb" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="reference external" href="https://github.com/mongodb/mongo-python-driver#installation">pymongo</a></p></li> +<li><p><a class="reference external" href="https://www.mongodb.com">MongoDB</a></p></li> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/mongodb.py">mongodb.py</a></p></li> +</ul> +</aside> +<p id="module-searx.engines.mongodb"><a class="reference external" href="https://www.mongodb.com">MongoDB</a> is a document based database program that handles JSON like data. +Before configuring the <code class="docutils literal notranslate"><span class="pre">mongodb</span></code> engine, you must install the dependency +<a class="reference external" href="https://github.com/mongodb/mongo-python-driver#installation">pymongo</a>.</p> +<section id="id3"> +<h4>Configuration<a class="headerlink" href="#id3" title="Link to this heading">¶</a></h4> +<p>In order to query <a class="reference external" href="https://www.mongodb.com">MongoDB</a>, you have to select a <code class="docutils literal notranslate"><span class="pre">database</span></code> and a +<code class="docutils literal notranslate"><span class="pre">collection</span></code>. Furthermore, you have to select a <code class="docutils literal notranslate"><span class="pre">key</span></code> that is going to be +searched. <a class="reference external" href="https://www.mongodb.com">MongoDB</a> also supports the option <code class="docutils literal notranslate"><span class="pre">exact_match_only</span></code>, so configure +it as you wish.</p> +</section> +<section id="id4"> +<h4>Example<a class="headerlink" href="#id4" title="Link to this heading">¶</a></h4> +<p>Below is an example configuration for using a MongoDB collection:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># MongoDB engine</span> +<span class="c1"># Required dependency: pymongo</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mymongo</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mongodb</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">md</span> +<span class="w"> </span><span class="nt">exact_match_only</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span> +<span class="w"> </span><span class="nt">host</span><span class="p">:</span><span class="w"> </span><span class="s">'127.0.0.1'</span> +<span class="w"> </span><span class="nt">port</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">27017</span> +<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="nt">results_per_page</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">20</span> +<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="s">'business'</span> +<span class="w"> </span><span class="nt">collection</span><span class="p">:</span><span class="w"> </span><span class="s">'reviews'</span><span class="w"> </span><span class="c1"># name of the db collection</span> +<span class="w"> </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="s">'name'</span><span class="w"> </span><span class="c1"># key in the collection to search for</span> +</pre></div> +</div> +</section> +<section id="id5"> +<h4>Implementations<a class="headerlink" href="#id5" title="Link to this heading">¶</a></h4> +</section> +</section> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="command-line-engines.html">Command Line Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">NoSQL databases</a></li> +<li class="toctree-l5"><a class="reference internal" href="search-indexer-engines.html">Local Search APIs</a></li> +<li class="toctree-l5"><a class="reference internal" href="sql-engines.html">SQL Engines</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="command-line-engines.html" title="previous chapter">Command Line Engines</a> + <li>Next: <a href="search-indexer-engines.html" title="next chapter">Local Search APIs</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/offline/nosql-engines.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/offline/search-indexer-engines.html b/dev/engines/offline/search-indexer-engines.html new file mode 100644 index 000000000..46a209eb4 --- /dev/null +++ b/dev/engines/offline/search-indexer-engines.html @@ -0,0 +1,289 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Local Search APIs — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="SQL Engines" href="sql-engines.html" /> + <link rel="prev" title="NoSQL databases" href="nosql-engines.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="sql-engines.html" title="SQL Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="nosql-engines.html" title="NoSQL databases" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Local Search APIs</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="local-search-apis"> +<h1>Local Search APIs<a class="headerlink" href="#local-search-apis" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://docs.meilisearch.com/learn/what_is_meilisearch/comparison_to_alternatives.html">Comparison to alternatives</a></p></li> +</ul> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#module-searx.engines.meilisearch" id="id6">MeiliSearch</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.elasticsearch" id="id7">Elasticsearch</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.solr" id="id8">Solr</a></p></li> +</ul> +</nav> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p> +</aside> +<p>Administrators might find themselves wanting to integrate locally running search +engines. The following ones are supported for now:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a></p></li> +<li><p><a class="reference external" href="https://www.meilisearch.com">Meilisearch</a></p></li> +<li><p><a class="reference external" href="https://solr.apache.org">Solr</a></p></li> +</ul> +<p>Each search engine is powerful, capable of full-text search. All of the engines +above are added to <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> just commented out, as you have to +<code class="docutils literal notranslate"><span class="pre">base_url</span></code> for all them.</p> +<p>Please note that if you are not using HTTPS to access these engines, you have to +enable HTTP requests by setting <code class="docutils literal notranslate"><span class="pre">enable_http</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p> +<p>Furthermore, if you do not want to expose these engines on a public instance, +you can still add them and limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described +in section <a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p> +<section id="module-searx.engines.meilisearch"> +<span id="meilisearch"></span><span id="engine-meilisearch"></span><h2><a class="toc-backref" href="#id6" role="doc-backlink">MeiliSearch</a><a class="headerlink" href="#module-searx.engines.meilisearch" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/meilisearch.py">meilisearch.py</a></p></li> +<li><p><a class="reference external" href="https://www.meilisearch.com">MeiliSearch</a></p></li> +<li><p><a class="reference external" href="https://docs.meilisearch.com/">MeiliSearch Documentation</a></p></li> +<li><p><a class="reference external" href="https://docs.meilisearch.com/learn/getting_started/installation.html">Install MeiliSearch</a></p></li> +</ul> +</aside> +<p><a class="reference external" href="https://www.meilisearch.com">MeiliSearch</a> is aimed at individuals and small companies. It is designed for +small-scale (less than 10 million documents) data collections. E.g. it is great +for storing web pages you have visited and searching in the contents later.</p> +<p>The engine supports faceted search, so you can search in a subset of documents +of the collection. Furthermore, you can search in <a class="reference external" href="https://www.meilisearch.com">MeiliSearch</a> instances that +require authentication by setting <code class="docutils literal notranslate"><span class="pre">auth_token</span></code>.</p> +<section id="example"> +<h3>Example<a class="headerlink" href="#example" title="Link to this heading">¶</a></h3> +<p>Here is a simple example to query a Meilisearch instance:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">meilisearch</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">meilisearch</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mes</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://localhost:7700</span> +<span class="w"> </span><span class="nt">index</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-index</span> +<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +</pre></div> +</div> +</section> +</section> +<section id="module-searx.engines.elasticsearch"> +<span id="elasticsearch"></span><span id="engine-elasticsearch"></span><h2><a class="toc-backref" href="#id7" role="doc-backlink">Elasticsearch</a><a class="headerlink" href="#module-searx.engines.elasticsearch" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/elasticsearch.py">elasticsearch.py</a></p></li> +<li><p><a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a></p></li> +<li><p><a class="reference external" href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html">Elasticsearch Guide</a></p></li> +<li><p><a class="reference external" href="https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html">Install Elasticsearch</a></p></li> +</ul> +</aside> +<p><a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a> supports numerous ways to query the data it is storing. At the +moment the engine supports the most popular search methods (<code class="docutils literal notranslate"><span class="pre">query_type</span></code>):</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">match</span></code>,</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">simple_query_string</span></code>,</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">term</span></code> and</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">terms</span></code>.</p></li> +</ul> +<p>If none of the methods fit your use case, you can select <code class="docutils literal notranslate"><span class="pre">custom</span></code> query type +and provide the JSON payload to submit to Elasticsearch in +<code class="docutils literal notranslate"><span class="pre">custom_query_json</span></code>.</p> +<section id="id3"> +<h3>Example<a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3> +<p>The following is an example configuration for an <a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a> instance with +authentication configured to read from <code class="docutils literal notranslate"><span class="pre">my-index</span></code> index.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">elasticsearch</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">es</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">elasticsearch</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://localhost:9200</span> +<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">elastic</span> +<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">changeme</span> +<span class="w"> </span><span class="nt">index</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-index</span> +<span class="w"> </span><span class="nt">query_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">match</span> +<span class="w"> </span><span class="c1"># custom_query_json: '{ ... }'</span> +<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +</pre></div> +</div> +</section> +</section> +<section id="module-searx.engines.solr"> +<span id="solr"></span><span id="engine-solr"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Solr</a><a class="headerlink" href="#module-searx.engines.solr" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/solr.py">solr.py</a></p></li> +<li><p><a class="reference external" href="https://solr.apache.org">Solr</a></p></li> +<li><p><a class="reference external" href="https://solr.apache.org/resources.html">Solr Resources</a></p></li> +<li><p><a class="reference external" href="https://solr.apache.org/guide/installing-solr.html">Install Solr</a></p></li> +</ul> +</aside> +<p><a class="reference external" href="https://solr.apache.org">Solr</a> is a popular search engine based on Lucene, just like <a class="reference external" href="https://www.elastic.co/elasticsearch/">Elasticsearch</a>. But +instead of searching in indices, you can search in collections.</p> +<section id="id5"> +<h3>Example<a class="headerlink" href="#id5" title="Link to this heading">¶</a></h3> +<p>This is an example configuration for searching in the collection +<code class="docutils literal notranslate"><span class="pre">my-collection</span></code> and get the results in ascending order.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">solr</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">solr</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">slr</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://localhost:8983</span> +<span class="w"> </span><span class="nt">collection</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my-collection</span> +<span class="w"> </span><span class="nt">sort</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">asc</span> +<span class="w"> </span><span class="nt">enable_http</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +</pre></div> +</div> +</section> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="command-line-engines.html">Command Line Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="nosql-engines.html">NoSQL databases</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Local Search APIs</a></li> +<li class="toctree-l5"><a class="reference internal" href="sql-engines.html">SQL Engines</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="nosql-engines.html" title="previous chapter">NoSQL databases</a> + <li>Next: <a href="sql-engines.html" title="next chapter">SQL Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/offline/search-indexer-engines.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/offline/sql-engines.html b/dev/engines/offline/sql-engines.html new file mode 100644 index 000000000..e4060673f --- /dev/null +++ b/dev/engines/offline/sql-engines.html @@ -0,0 +1,493 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>SQL Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Tineye" href="../online_url_search/tineye.html" /> + <link rel="prev" title="Local Search APIs" href="search-indexer-engines.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="../online_url_search/tineye.html" title="Tineye" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="search-indexer-engines.html" title="Local Search APIs" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">SQL Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="sql-engines"> +<span id="id1"></span><h1>SQL Engines<a class="headerlink" href="#sql-engines" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.sqlite.org/index.html">SQLite</a></p></li> +<li><p><a class="reference external" href="https://www.postgresql.org">PostgreSQL</a></p></li> +<li><p><a class="reference external" href="https://www.mysql.com">MySQL</a></p></li> +</ul> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#extra-dependencies" id="id11">Extra Dependencies</a></p></li> +<li><p><a class="reference internal" href="#configure-the-engines" id="id12">Configure the engines</a></p> +<ul> +<li><p><a class="reference internal" href="#engine-sqlite" id="id13">SQLite</a></p></li> +<li><p><a class="reference internal" href="#engine-postgresql" id="id14">PostgreSQL</a></p></li> +<li><p><a class="reference internal" href="#engine-mysql-server" id="id15">MySQL</a></p></li> +<li><p><a class="reference internal" href="#mariadb" id="id16">MariaDB</a></p></li> +</ul> +</li> +</ul> +</nav> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<p>Initial sponsored by <a class="reference external" href="https://nlnet.nl/discovery">Search and Discovery Fund</a> of <a class="reference external" href="https://nlnet.nl/">NLnet Foundation</a>.</p> +</aside> +<p>With the <em>SQL engines</em> you can bind SQL databases into SearXNG. The following +Relational Database Management System (RDBMS) are supported:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#engine-sqlite"><span class="std std-ref">SQLite</span></a></p></li> +<li><p><a class="reference internal" href="#engine-postgresql"><span class="std std-ref">PostgreSQL</span></a></p></li> +<li><p><a class="reference internal" href="#engine-mysql-server"><span class="std std-ref">MySQL</span></a> & <a class="reference internal" href="#engine-mariadb-server"><span class="std std-ref">MariaDB</span></a></p></li> +</ul> +<p>All of the engines above are just commented out in the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">settings.yml</a>, as you have to set the required attributes for the +engines, e.g. <code class="docutils literal notranslate"><span class="pre">database:</span></code> …</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nv">sqlite|postgresql|mysql_server</span><span class="p p-Indicator">}</span> +<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">result_template</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">{</span><span class="nv">template_name</span><span class="p p-Indicator">}</span> +<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +</pre></div> +</div> +<p>By default, the engines use the <code class="docutils literal notranslate"><span class="pre">key-value</span></code> template for displaying results / +see <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/key-value.html">simple</a> +theme. If you are not satisfied with the original result layout, you can use +your own template, set <code class="docutils literal notranslate"><span class="pre">result_template</span></code> attribute to <code class="docutils literal notranslate"><span class="pre">{template_name}</span></code> and +place the templates at:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">searx</span><span class="o">/</span><span class="n">templates</span><span class="o">/</span><span class="p">{</span><span class="n">theme_name</span><span class="p">}</span><span class="o">/</span><span class="n">result_templates</span><span class="o">/</span><span class="p">{</span><span class="n">template_name</span><span class="p">}</span> +</pre></div> +</div> +<p>If you do not wish to expose these engines on a public instance, you can still +add them and limit the access by setting <code class="docutils literal notranslate"><span class="pre">tokens</span></code> as described in section +<a class="reference internal" href="../../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>.</p> +<section id="extra-dependencies"> +<h2><a class="toc-backref" href="#id11" role="doc-backlink">Extra Dependencies</a><a class="headerlink" href="#extra-dependencies" title="Link to this heading">¶</a></h2> +<p>For using <a class="reference internal" href="#engine-postgresql"><span class="std std-ref">PostgreSQL</span></a> or <a class="reference internal" href="#engine-mysql-server"><span class="std std-ref">MySQL</span></a> you need to +install additional packages in Python’s Virtual Environment of your SearXNG +instance. To switch into the environment (<a class="reference internal" href="../../../admin/installation-searxng.html#searxng-src"><span class="std std-ref">Install SearXNG & dependencies</span></a>) you can use +<a class="reference internal" href="../../../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo utils/searxng.sh instance cmd bash +(searxng-pyenv)$ pip install ... +</pre></div> +</div> +</section> +<section id="configure-the-engines"> +<h2><a class="toc-backref" href="#id12" role="doc-backlink">Configure the engines</a><a class="headerlink" href="#configure-the-engines" title="Link to this heading">¶</a></h2> +<p>The configuration of the new database engines are similar. You must put a valid +SQL-SELECT query in <code class="docutils literal notranslate"><span class="pre">query_str</span></code>. At the moment you can only bind at most one +parameter in your query. By setting the attribute <code class="docutils literal notranslate"><span class="pre">limit</span></code> you can define how +many results you want from the SQL server. Basically, it is the same as the +<code class="docutils literal notranslate"><span class="pre">LIMIT</span></code> keyword in SQL.</p> +<p>Please, do not include <code class="docutils literal notranslate"><span class="pre">LIMIT</span></code> or <code class="docutils literal notranslate"><span class="pre">OFFSET</span></code> in your SQL query as the engines +rely on these keywords during paging. If you want to configure the number of +returned results use the option <code class="docutils literal notranslate"><span class="pre">limit</span></code>.</p> +<section id="engine-sqlite"> +<span id="id2"></span><h3><a class="toc-backref" href="#id13" role="doc-backlink">SQLite</a><a class="headerlink" href="#engine-sqlite" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/sqlite.py">sqlite.py</a></p></li> +</ul> +</aside> +<p id="module-searx.engines.sqlite">SQLite is a small, fast and reliable SQL database engine. It does not require +any extra dependency.</p> +<section id="example"> +<h4>Example<a class="headerlink" href="#example" title="Link to this heading">¶</a></h4> +<p>To demonstrate the power of database engines, here is a more complex example +which reads from a <a class="reference external" href="https://mediathekview.de/">MediathekView</a> (DE) movie database. For this example of the +SQLite engine download the database:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://liste.mediathekview.de/filmliste-v2.db.bz2">https://liste.mediathekview.de/filmliste-v2.db.bz2</a></p></li> +</ul> +<p>and unpack into <code class="docutils literal notranslate"><span class="pre">searx/data/filmliste-v2.db</span></code>. To search the database use e.g +Query to test: <code class="docutils literal notranslate"><span class="pre">!mediathekview</span> <span class="pre">concert</span></code></p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mediathekview</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sqlite</span> +<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">False</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">general</span> +<span class="w"> </span><span class="nt">result_template</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">default.html</span> +<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">searx/data/filmliste-v2.db</span> +<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">>-</span> +<span class="w"> </span><span class="no">SELECT title || ' (' || time(duration, 'unixepoch') || ')' AS title,</span> +<span class="w"> </span><span class="no">COALESCE( NULLIF(url_video_hd,''), NULLIF(url_video_sd,''), url_video) AS url,</span> +<span class="w"> </span><span class="no">description AS content</span> +<span class="w"> </span><span class="no">FROM film</span> +<span class="w"> </span><span class="no">WHERE title LIKE :wildcard OR description LIKE :wildcard</span> +<span class="w"> </span><span class="no">ORDER BY duration DESC</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h4>Implementations<a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h4> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.sqlite.sqlite_cursor"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.sqlite.</span></span><span class="sig-name descname"><span class="pre">sqlite_cursor</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/sqlite.html#sqlite_cursor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.sqlite.sqlite_cursor" title="Link to this definition">¶</a></dt> +<dd><p>Implements a <a class="reference external" href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Context</span> <span class="pre">Manager</span></code></a> for a +<a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sqlite3.Cursor</span></code></a>.</p> +<p>Open database in read only mode: if the database doesn’t exist. The default +mode creates an empty file on the file system. See:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://docs.python.org/3/library/sqlite3.html#sqlite3.connect">https://docs.python.org/3/library/sqlite3.html#sqlite3.connect</a></p></li> +<li><p><a class="reference external" href="https://www.sqlite.org/uri.html">https://www.sqlite.org/uri.html</a></p></li> +</ul> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.sqlite.database"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.sqlite.</span></span><span class="sig-name descname"><span class="pre">database</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.sqlite.database" title="Link to this definition">¶</a></dt> +<dd><p>Filename of the SQLite DB.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.sqlite.query_str"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.sqlite.</span></span><span class="sig-name descname"><span class="pre">query_str</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.sqlite.query_str" title="Link to this definition">¶</a></dt> +<dd><p>SQL query that returns the result items.</p> +</dd></dl> + +</section> +<section id="engine-postgresql"> +<span id="id3"></span><h3><a class="toc-backref" href="#id14" role="doc-backlink">PostgreSQL</a><a class="headerlink" href="#engine-postgresql" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/postgresql.py">postgresql.py</a></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="reference external" href="psycopg2">psycopg2-binary</a></p></li> +</ul> +</aside> +<p id="module-searx.engines.postgresql">PostgreSQL is a powerful and robust open source database. Before configuring +the PostgreSQL engine, you must install the dependency <code class="docutils literal notranslate"><span class="pre">psychopg2</span></code>.</p> +<section id="id4"> +<h4>Example<a class="headerlink" href="#id4" title="Link to this heading">¶</a></h4> +<p>Below is an example configuration:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">postgresql</span> +<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span> +<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">searxng</span> +<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password</span> +<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="s">'SELECT</span><span class="nv"> </span><span class="s">*</span><span class="nv"> </span><span class="s">from</span><span class="nv"> </span><span class="s">my_table</span><span class="nv"> </span><span class="s">WHERE</span><span class="nv"> </span><span class="s">my_column</span><span class="nv"> </span><span class="s">=</span><span class="nv"> </span><span class="s">%(query)s'</span> +</pre></div> +</div> +</section> +<section id="id5"> +<h4>Implementations<a class="headerlink" href="#id5" title="Link to this heading">¶</a></h4> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.postgresql.database"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.postgresql.</span></span><span class="sig-name descname"><span class="pre">database</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.postgresql.database" title="Link to this definition">¶</a></dt> +<dd><p>Name of the database.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.postgresql.host"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.postgresql.</span></span><span class="sig-name descname"><span class="pre">host</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'127.0.0.1'</span></em><a class="headerlink" href="#searx.engines.postgresql.host" title="Link to this definition">¶</a></dt> +<dd><p>Hostname of the DB connector</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.postgresql.password"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.postgresql.</span></span><span class="sig-name descname"><span class="pre">password</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.postgresql.password" title="Link to this definition">¶</a></dt> +<dd><p>Password for the DB connection.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.postgresql.port"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.postgresql.</span></span><span class="sig-name descname"><span class="pre">port</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'5432'</span></em><a class="headerlink" href="#searx.engines.postgresql.port" title="Link to this definition">¶</a></dt> +<dd><p>Port of the DB connector</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.postgresql.query_str"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.postgresql.</span></span><span class="sig-name descname"><span class="pre">query_str</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.postgresql.query_str" title="Link to this definition">¶</a></dt> +<dd><p>SQL query that returns the result items.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.postgresql.username"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.postgresql.</span></span><span class="sig-name descname"><span class="pre">username</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.postgresql.username" title="Link to this definition">¶</a></dt> +<dd><p>Username for the DB connection.</p> +</dd></dl> + +</section> +<section id="engine-mysql-server"> +<span id="id6"></span><h3><a class="toc-backref" href="#id15" role="doc-backlink">MySQL</a><a class="headerlink" href="#engine-mysql-server" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/mysql_server.py">mysql_server.py</a></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="extlink-pypi reference external" href="https://pypi.org/project/mysql-connector-python">mysql-connector-python</a></p></li> +</ul> +</aside> +<p id="module-searx.engines.mysql_server">MySQL is said to be the most popular open source database. Before enabling +MySQL engine, you must install the package <code class="docutils literal notranslate"><span class="pre">mysql-connector-python</span></code>.</p> +<p>The authentication plugin is configurable by setting <code class="docutils literal notranslate"><span class="pre">auth_plugin</span></code> in the +attributes. By default it is set to <code class="docutils literal notranslate"><span class="pre">caching_sha2_password</span></code>.</p> +<section id="id7"> +<h4>Example<a class="headerlink" href="#id7" title="Link to this heading">¶</a></h4> +<p>This is an example configuration for querying a MySQL server:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mysql_server</span> +<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span> +<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">searxng</span> +<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password</span> +<span class="w"> </span><span class="nt">limit</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5</span> +<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="s">'SELECT</span><span class="nv"> </span><span class="s">*</span><span class="nv"> </span><span class="s">from</span><span class="nv"> </span><span class="s">my_table</span><span class="nv"> </span><span class="s">WHERE</span><span class="nv"> </span><span class="s">my_column=%(query)s'</span> +</pre></div> +</div> +</section> +<section id="id8"> +<h4>Implementations<a class="headerlink" href="#id8" title="Link to this heading">¶</a></h4> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mysql_server.database"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mysql_server.</span></span><span class="sig-name descname"><span class="pre">database</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mysql_server.database" title="Link to this definition">¶</a></dt> +<dd><p>Name of the database.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mysql_server.host"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mysql_server.</span></span><span class="sig-name descname"><span class="pre">host</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'127.0.0.1'</span></em><a class="headerlink" href="#searx.engines.mysql_server.host" title="Link to this definition">¶</a></dt> +<dd><p>Hostname of the DB connector</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mysql_server.password"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mysql_server.</span></span><span class="sig-name descname"><span class="pre">password</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mysql_server.password" title="Link to this definition">¶</a></dt> +<dd><p>Password for the DB connection.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mysql_server.port"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mysql_server.</span></span><span class="sig-name descname"><span class="pre">port</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">3306</span></em><a class="headerlink" href="#searx.engines.mysql_server.port" title="Link to this definition">¶</a></dt> +<dd><p>Port of the DB connector</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mysql_server.query_str"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mysql_server.</span></span><span class="sig-name descname"><span class="pre">query_str</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mysql_server.query_str" title="Link to this definition">¶</a></dt> +<dd><p>SQL query that returns the result items.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mysql_server.username"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mysql_server.</span></span><span class="sig-name descname"><span class="pre">username</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mysql_server.username" title="Link to this definition">¶</a></dt> +<dd><p>Username for the DB connection.</p> +</dd></dl> + +</section> +<section id="mariadb"> +<span id="engine-mariadb-server"></span><h3><a class="toc-backref" href="#id16" role="doc-backlink">MariaDB</a><a class="headerlink" href="#mariadb" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/mariadb_server.py">mariadb_server.py</a></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> <a class="extlink-pypi reference external" href="https://pypi.org/project/mariadb">mariadb</a></p></li> +</ul> +</aside> +<p id="module-searx.engines.mariadb_server">MariaDB is a community driven fork of MySQL. Before enabling MariaDB engine, +you must the install the pip package <code class="docutils literal notranslate"><span class="pre">mariadb</span></code> along with the necessary +prerequities.</p> +<p><a class="reference external" href="https://mariadb.com/docs/server/connect/programming-languages/c/install/">See the following documentation for more details</a></p> +<section id="id9"> +<h4>Example<a class="headerlink" href="#id9" title="Link to this heading">¶</a></h4> +<p>This is an example configuration for querying a MariaDB server:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mariadb_server</span> +<span class="w"> </span><span class="nt">database</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">my_database</span> +<span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">searxng</span> +<span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">password</span> +<span class="w"> </span><span class="nt">limit</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">5</span> +<span class="w"> </span><span class="nt">query_str</span><span class="p">:</span><span class="w"> </span><span class="s">'SELECT</span><span class="nv"> </span><span class="s">*</span><span class="nv"> </span><span class="s">from</span><span class="nv"> </span><span class="s">my_table</span><span class="nv"> </span><span class="s">WHERE</span><span class="nv"> </span><span class="s">my_column=%(query)s'</span> +</pre></div> +</div> +</section> +<section id="id10"> +<h4>Implementations<a class="headerlink" href="#id10" title="Link to this heading">¶</a></h4> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mariadb_server.database"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mariadb_server.</span></span><span class="sig-name descname"><span class="pre">database</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mariadb_server.database" title="Link to this definition">¶</a></dt> +<dd><p>Name of the database.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mariadb_server.host"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mariadb_server.</span></span><span class="sig-name descname"><span class="pre">host</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'127.0.0.1'</span></em><a class="headerlink" href="#searx.engines.mariadb_server.host" title="Link to this definition">¶</a></dt> +<dd><p>Hostname of the DB connector</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mariadb_server.password"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mariadb_server.</span></span><span class="sig-name descname"><span class="pre">password</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mariadb_server.password" title="Link to this definition">¶</a></dt> +<dd><p>Password for the DB connection.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mariadb_server.port"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mariadb_server.</span></span><span class="sig-name descname"><span class="pre">port</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">3306</span></em><a class="headerlink" href="#searx.engines.mariadb_server.port" title="Link to this definition">¶</a></dt> +<dd><p>Port of the DB connector</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mariadb_server.query_str"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mariadb_server.</span></span><span class="sig-name descname"><span class="pre">query_str</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mariadb_server.query_str" title="Link to this definition">¶</a></dt> +<dd><p>SQL query that returns the result items.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.mariadb_server.username"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mariadb_server.</span></span><span class="sig-name descname"><span class="pre">username</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.mariadb_server.username" title="Link to this definition">¶</a></dt> +<dd><p>Username for the DB connection.</p> +</dd></dl> + +</section> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../offline_concept.html">Offline Concept</a></li> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_offline.html">Demo Offline Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="command-line-engines.html">Command Line Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="nosql-engines.html">NoSQL databases</a></li> +<li class="toctree-l5"><a class="reference internal" href="search-indexer-engines.html">Local Search APIs</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">SQL Engines</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="search-indexer-engines.html" title="previous chapter">Local Search APIs</a> + <li>Next: <a href="../online_url_search/tineye.html" title="next chapter">Tineye</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/offline/sql-engines.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/offline_concept.html b/dev/engines/offline_concept.html new file mode 100644 index 000000000..2b95a550a --- /dev/null +++ b/dev/engines/offline_concept.html @@ -0,0 +1,215 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>Offline Concept — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="Demo Offline Engine" href="demo/demo_offline.html" /> + <link rel="prev" title="Z-Library" href="online/zlibrary.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="demo/demo_offline.html" title="Demo Offline Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="online/zlibrary.html" title="Z-Library" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Offline Concept</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="offline-concept"> +<h1>Offline Concept<a class="headerlink" href="#offline-concept" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">offline engines</p> +<ul class="simple"> +<li><p><a class="reference internal" href="demo/demo_offline.html#demo-offline-engine"><span class="std std-ref">Demo Offline Engine</span></a></p></li> +<li><p><a class="reference internal" href="offline/command-line-engines.html#engine-command"><span class="std std-ref">Command Line Engines</span></a></p></li> +<li><p><a class="reference internal" href="offline/sql-engines.html#sql-engines"><span class="std std-ref">SQL Engines</span></a></p></li> +<li><p><a class="reference internal" href="offline/nosql-engines.html#nosql-engines"><span class="std std-ref">NoSQL databases</span></a></p></li> +<li><p><a class="reference internal" href="../../src/searx.search.processors.html#module-searx.search.processors.offline" title="searx.search.processors.offline"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.search.processors.offline</span></code></a></p></li> +</ul> +</aside> +<p>To extend the functionality of SearXNG, 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.</p> +<p>Offline engines can be configured, by adding those to the <cite>engines</cite> list of +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">settings.yml</a>. An example skeleton for offline +engines can be found in <a class="reference internal" href="demo/demo_offline.html#demo-offline-engine"><span class="std std-ref">Demo Offline Engine</span></a> (<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/demo_offline.py">demo_offline.py</a>).</p> +<section id="programming-interface"> +<h2>Programming Interface<a class="headerlink" href="#programming-interface" title="Link to this heading">¶</a></h2> +<dl> +<dt><a class="reference internal" href="demo/demo_offline.html#searx.engines.demo_offline.init" title="searx.engines.demo_offline.init"><code class="xref py py-func docutils literal notranslate"><span class="pre">init(engine_settings=None)</span></code></a></dt><dd><p>All offline engines can have their own init function to setup the engine before +accepting requests. The function gets the settings from settings.yml as a +parameter. This function can be omitted, if there is no need to setup anything +in advance.</p> +</dd> +<dt><code class="xref py py-func docutils literal notranslate"><span class="pre">search(query,</span> <span class="pre">params)</span></code></dt><dd><p>Each offline engine has a function named <code class="docutils literal notranslate"><span class="pre">search</span></code>. This function is +responsible to perform a search and return the results in a presentable +format. (Where <em>presentable</em> means presentable by the selected result +template.)</p> +<p>The return value is a list of results retrieved by the engine.</p> +</dd> +<dt>Engine representation in <code class="docutils literal notranslate"><span class="pre">/config</span></code></dt><dd><p>If an engine is offline, the attribute <code class="docutils literal notranslate"><span class="pre">offline</span></code> is set to <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p> +</dd> +</dl> +</section> +<section id="extra-dependencies"> +<span id="offline-requirements"></span><h2>Extra Dependencies<a class="headerlink" href="#extra-dependencies" title="Link to this heading">¶</a></h2> +<p>If an offline engine depends on an external tool, SearXNG does not install it by +default. When an administrator configures such engine and starts the instance, +the process returns an error with the list of missing dependencies. Also, +required dependencies will be added to the comment/description of the engine, so +admins can install packages in advance.</p> +<p>If there is a need to install additional packages in <em>Python’s Virtual +Environment</em> of your SearXNG instance you need to switch into the environment +(<a class="reference internal" href="../../admin/installation-searxng.html#searxng-src"><span class="std std-ref">Install SearXNG & dependencies</span></a>) first, for this you can use <a class="reference internal" href="../../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a>:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo utils/searxng.sh instance cmd bash +(searxng-pyenv)$ pip install ... +</pre></div> +</div> +</section> +<section id="private-engines-security"> +<h2>Private engines (Security)<a class="headerlink" href="#private-engines-security" title="Link to this heading">¶</a></h2> +<p>To limit the access to offline engines, if an instance is available publicly, +administrators can set token(s) for each of the <a class="reference internal" href="../../admin/settings/settings_engine.html#private-engines"><span class="std std-ref">Private Engines (tokens)</span></a>. If a +query contains a valid token, then SearXNG performs the requested private +search. If not, requests from an offline engines return errors.</p> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-engines">Online Engines</a></li> +<li class="toctree-l4 current"><a class="reference internal" href="index.html#offline-engines">Offline Engines</a><ul class="current"> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Offline Concept</a></li> +<li class="toctree-l5"><a class="reference internal" href="demo/demo_offline.html">Demo Offline Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/command-line-engines.html">Command Line Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/nosql-engines.html">NoSQL databases</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/search-indexer-engines.html">Local Search APIs</a></li> +<li class="toctree-l5"><a class="reference internal" href="offline/sql-engines.html">SQL Engines</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="online/zlibrary.html" title="previous chapter">Z-Library</a> + <li>Next: <a href="demo/demo_offline.html" title="next chapter">Demo Offline Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/engines/offline_concept.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/adobe_stock.html b/dev/engines/online/adobe_stock.html new file mode 100644 index 000000000..a65ee08d0 --- /dev/null +++ b/dev/engines/online/adobe_stock.html @@ -0,0 +1,264 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Adobe Stock — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Alpine Linux Packages" href="alpinelinux.html" /> + <link rel="prev" title="MediaWiki Engine" href="../mediawiki.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="alpinelinux.html" title="Alpine Linux Packages" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../mediawiki.html" title="MediaWiki Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Adobe Stock</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="adobe-stock"> +<span id="adobe-stock-engine"></span><h1>Adobe Stock<a class="headerlink" href="#adobe-stock" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementation" id="id2">Implementation</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.adobe_stock"><a class="reference internal" href="#adobe-stock">Adobe Stock</a> is a service that gives access to millions of royalty-free +assets. Assets types include photos, vectors, illustrations, templates, 3D +assets, videos, motion graphics templates and audio tracks.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following mandatory setting:</p> +<ul class="simple"> +<li><p>SearXNG’s <a class="reference internal" href="../../../admin/settings/settings_engine.html#engine-categories"><span class="std std-ref">categories</span></a></p></li> +<li><p>Adobe-Stock’s <a class="reference internal" href="#searx.engines.adobe_stock.adobe_order" title="searx.engines.adobe_stock.adobe_order"><code class="xref py py-obj docutils literal notranslate"><span class="pre">adobe_order</span></code></a></p></li> +<li><p>Adobe-Stock’s <a class="reference internal" href="#searx.engines.adobe_stock.adobe_content_types" title="searx.engines.adobe_stock.adobe_content_types"><code class="xref py py-obj docutils literal notranslate"><span class="pre">adobe_content_types</span></code></a></p></li> +</ul> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">adobe stock</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">adobe_stock</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">asi</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">images</span><span class="p p-Indicator">]</span> +<span class="w"> </span><span class="nt">adobe_order</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">relevance</span> +<span class="w"> </span><span class="nt">adobe_content_types</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">"photo"</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">"illustration"</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">"zip_vector"</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">"template"</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">"3d"</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">"image"</span><span class="p p-Indicator">]</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">adobe stock video</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">adobe_stock</span> +<span class="w"> </span><span class="nt">network</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">adobe stock</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">asi</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">videos</span><span class="p p-Indicator">]</span> +<span class="w"> </span><span class="nt">adobe_order</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">relevance</span> +<span class="w"> </span><span class="nt">adobe_content_types</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">"video"</span><span class="p p-Indicator">]</span> +</pre></div> +</div> +</section> +<section id="implementation"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementation</a><a class="headerlink" href="#implementation" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.adobe_stock.adobe_content_types"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.adobe_stock.</span></span><span class="sig-name descname"><span class="pre">adobe_content_types</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><span class="pre">list</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">[]</span></em><a class="headerlink" href="#searx.engines.adobe_stock.adobe_content_types" title="Link to this definition">¶</a></dt> +<dd><p>A list of of content types. The following content types are offered:</p> +<ul class="simple"> +<li><p>Images: <code class="docutils literal notranslate"><span class="pre">image</span></code></p></li> +<li><p>Videos: <code class="docutils literal notranslate"><span class="pre">video</span></code></p></li> +<li><p>Templates: <code class="docutils literal notranslate"><span class="pre">template</span></code></p></li> +<li><p>3D: <code class="docutils literal notranslate"><span class="pre">3d</span></code></p></li> +<li><p>Audio <code class="docutils literal notranslate"><span class="pre">audio</span></code></p></li> +</ul> +<p>Additional subcategories:</p> +<ul class="simple"> +<li><p>Photos: <code class="docutils literal notranslate"><span class="pre">photo</span></code></p></li> +<li><p>Illustrations: <code class="docutils literal notranslate"><span class="pre">illustration</span></code></p></li> +<li><p>Vectors: <code class="docutils literal notranslate"><span class="pre">zip_vector</span></code> (Vectors),</p></li> +</ul> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.adobe_stock.adobe_order"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.adobe_stock.</span></span><span class="sig-name descname"><span class="pre">adobe_order</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.adobe_stock.adobe_order" title="Link to this definition">¶</a></dt> +<dd><p>Sort order, can be one of:</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">relevance</span></code> or</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">featured</span></code> or</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">creation</span></code> (most recent) or</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">nb_downloads</span></code> (number of downloads)</p></li> +</ul> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="../mediawiki.html" title="previous chapter">MediaWiki Engine</a> + <li>Next: <a href="alpinelinux.html" title="next chapter">Alpine Linux Packages</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/adobe_stock.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/alpinelinux.html b/dev/engines/online/alpinelinux.html new file mode 100644 index 000000000..a09edd0e2 --- /dev/null +++ b/dev/engines/online/alpinelinux.html @@ -0,0 +1,212 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Alpine Linux Packages — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Anna’s Archive" href="annas_archive.html" /> + <link rel="prev" title="Adobe Stock" href="adobe_stock.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="annas_archive.html" title="Anna’s Archive" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="adobe_stock.html" title="Adobe Stock" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Alpine Linux Packages</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="alpine-linux-packages"> +<span id="alpinelinux-engine"></span><h1>Alpine Linux Packages<a class="headerlink" href="#alpine-linux-packages" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.alpinelinux"><a class="reference external" href="https://pkgs.alpinelinux.org">Alpine Linux binary packages</a>. <a class="reference external" href="https://www.alpinelinux.org">Alpine Linux</a> is a Linux-based operation +system designed to be small, simple and secure. Contrary to many other Linux +distributions, it uses musl, BusyBox and OpenRC. Alpine is mostly used on +servers and for Docker images.</p> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.alpinelinux.ARCH_RE"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.alpinelinux.</span></span><span class="sig-name descname"><span class="pre">ARCH_RE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">re.compile('x86_64|x86|aarch64|armhf|ppc64le|s390x|armv7|riscv64')</span></em><a class="headerlink" href="#searx.engines.alpinelinux.ARCH_RE" title="Link to this definition">¶</a></dt> +<dd><p>Regular expression to match supported architectures in the query string.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.alpinelinux.alpine_arch"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.alpinelinux.</span></span><span class="sig-name descname"><span class="pre">alpine_arch</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'x86_64'</span></em><a class="headerlink" href="#searx.engines.alpinelinux.alpine_arch" title="Link to this definition">¶</a></dt> +<dd><p>Kernel architecture: <code class="docutils literal notranslate"><span class="pre">x86_64</span></code>, <code class="docutils literal notranslate"><span class="pre">x86</span></code>, <code class="docutils literal notranslate"><span class="pre">aarch64</span></code>, <code class="docutils literal notranslate"><span class="pre">armhf</span></code>, +<code class="docutils literal notranslate"><span class="pre">ppc64le</span></code>, <code class="docutils literal notranslate"><span class="pre">s390x</span></code>, <code class="docutils literal notranslate"><span class="pre">armv7</span></code> or <code class="docutils literal notranslate"><span class="pre">riscv64</span></code></p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="adobe_stock.html" title="previous chapter">Adobe Stock</a> + <li>Next: <a href="annas_archive.html" title="next chapter">Anna’s Archive</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/alpinelinux.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/annas_archive.html b/dev/engines/online/annas_archive.html new file mode 100644 index 000000000..703858337 --- /dev/null +++ b/dev/engines/online/annas_archive.html @@ -0,0 +1,272 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Anna’s Archive — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Arch Linux" href="archlinux.html" /> + <link rel="prev" title="Alpine Linux Packages" href="alpinelinux.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="archlinux.html" title="Arch Linux" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="alpinelinux.html" title="Alpine Linux Packages" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Anna’s Archive</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="anna-s-archive"> +<span id="annas-archive-engine"></span><h1>Anna’s Archive<a class="headerlink" href="#anna-s-archive" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.annas_archive"><a class="reference external" href="https://annas-archive.org/">Anna’s Archive</a> is a free non-profit online shadow library metasearch +engine providing access to a variety of book resources (also via IPFS), created +by a team of anonymous archivists (<a class="reference external" href="https://annas-software.org/AnnaArchivist/annas-archive">AnnaArchivist</a>).</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following additional settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.annas_archive.aa_content" title="searx.engines.annas_archive.aa_content"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aa_content</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.annas_archive.aa_ext" title="searx.engines.annas_archive.aa_ext"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aa_ext</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.annas_archive.aa_sort" title="searx.engines.annas_archive.aa_sort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aa_sort</span></code></a></p></li> +</ul> +<p>With this options a SearXNG maintainer is able to configure <strong>additional</strong> +engines for specific searches in Anna’s Archive. For example a engine to search +for <em>newest</em> articles and journals (PDF) / by shortcut <code class="docutils literal notranslate"><span class="pre">!aaa</span> <span class="pre"><search-term></span></code>.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">annas articles</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">annas_archive</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">aaa</span> +<span class="w"> </span><span class="nt">aa_content</span><span class="p">:</span><span class="w"> </span><span class="s">'magazine'</span> +<span class="w"> </span><span class="nt">aa_ext</span><span class="p">:</span><span class="w"> </span><span class="s">'pdf'</span> +<span class="w"> </span><span class="nt">aa_sort</span><span class="p">:</span><span class="w"> </span><span class="s">'newest'</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.annas_archive.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/annas_archive.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.annas_archive.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages and other search arguments from Anna’s search form.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.annas_archive.init"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/annas_archive.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.annas_archive.init" title="Link to this definition">¶</a></dt> +<dd><p>Check of engine’s settings.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.annas_archive.aa_content"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">aa_content</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.annas_archive.aa_content" title="Link to this definition">¶</a></dt> +<dd><p>Anan’s search form field <strong>Content</strong> / possible values:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">book_fiction</span><span class="p">,</span> <span class="n">book_unknown</span><span class="p">,</span> <span class="n">book_nonfiction</span><span class="p">,</span> +<span class="n">book_comic</span><span class="p">,</span> <span class="n">magazine</span><span class="p">,</span> <span class="n">standards_document</span> +</pre></div> +</div> +<p>To not filter use an empty string (default).</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.annas_archive.aa_ext"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">aa_ext</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.annas_archive.aa_ext" title="Link to this definition">¶</a></dt> +<dd><p>Filter Anna’s results by a file ending. Common filters for example are +<code class="docutils literal notranslate"><span class="pre">pdf</span></code> and <code class="docutils literal notranslate"><span class="pre">epub</span></code>.</p> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>Anna’s Archive is a beta release: Filter results by file extension does not +really work on Anna’s Archive.</p> +</div> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.annas_archive.aa_sort"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.annas_archive.</span></span><span class="sig-name descname"><span class="pre">aa_sort</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.annas_archive.aa_sort" title="Link to this definition">¶</a></dt> +<dd><p>Sort Anna’s results, possible values:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">newest</span><span class="p">,</span> <span class="n">oldest</span><span class="p">,</span> <span class="n">largest</span><span class="p">,</span> <span class="n">smallest</span> +</pre></div> +</div> +<p>To sort by <em>most relevant</em> use an empty string (default).</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="alpinelinux.html" title="previous chapter">Alpine Linux Packages</a> + <li>Next: <a href="archlinux.html" title="next chapter">Arch Linux</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/annas_archive.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/archlinux.html b/dev/engines/online/archlinux.html new file mode 100644 index 000000000..643c18527 --- /dev/null +++ b/dev/engines/online/archlinux.html @@ -0,0 +1,227 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Arch Linux — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Bing Engines" href="bing.html" /> + <link rel="prev" title="Anna’s Archive" href="annas_archive.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="bing.html" title="Bing Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="annas_archive.html" title="Anna’s Archive" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Arch Linux</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="arch-linux"> +<span id="archlinux-engine"></span><h1>Arch Linux<a class="headerlink" href="#arch-linux" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#arch-linux-wiki" id="id1">Arch Linux Wiki</a></p></li> +</ul> +</nav> +<section id="arch-linux-wiki"> +<span id="module-searx.engines.archlinux"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Arch Linux Wiki</a><a class="headerlink" href="#arch-linux-wiki" title="Link to this heading">¶</a></h2> +<p>This implementation does not use a official API: Mediawiki provides API, but +Arch Wiki blocks access to it.</p> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.archlinux.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.archlinux.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/archlinux.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.archlinux.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages from Archlinux-Wiki. The location of the Wiki address of a +language is mapped in a <a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits.custom" title="searx.enginelib.traits.EngineTraits.custom"><code class="xref py py-obj docutils literal notranslate"><span class="pre">custom</span> <span class="pre">field</span></code></a> (<code class="docutils literal notranslate"><span class="pre">wiki_netloc</span></code>). Depending +on the location, the <code class="docutils literal notranslate"><span class="pre">title</span></code> argument in the request is translated.</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">"custom"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"wiki_netloc"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"de"</span><span class="p">:</span> <span class="s2">"wiki.archlinux.de"</span><span class="p">,</span> + <span class="c1"># ...</span> + <span class="s2">"zh"</span><span class="p">:</span> <span class="s2">"wiki.archlinuxcn.org"</span> + <span class="p">}</span> + <span class="s2">"title"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"de"</span><span class="p">:</span> <span class="s2">"Spezial:Suche"</span><span class="p">,</span> + <span class="c1"># ...</span> + <span class="s2">"zh"</span><span class="p">:</span> <span class="s2">"Special:搜索"</span> + <span class="p">},</span> +<span class="p">},</span> +</pre></div> +</div> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="annas_archive.html" title="previous chapter">Anna’s Archive</a> + <li>Next: <a href="bing.html" title="next chapter">Bing Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/archlinux.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/bing.html b/dev/engines/online/bing.html new file mode 100644 index 000000000..cfd695836 --- /dev/null +++ b/dev/engines/online/bing.html @@ -0,0 +1,346 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Bing Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Bpb" href="bpb.html" /> + <link rel="prev" title="Arch Linux" href="archlinux.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="bpb.html" title="Bpb" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="archlinux.html" title="Arch Linux" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Bing Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="bing-engines"> +<span id="id1"></span><h1>Bing Engines<a class="headerlink" href="#bing-engines" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#module-searx.engines.bing" id="id2">Bing WEB</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.bing_images" id="id3">Bing Images</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.bing_videos" id="id4">Bing Videos</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.bing_news" id="id5">Bing News</a></p></li> +</ul> +</nav> +<section id="module-searx.engines.bing"> +<span id="bing-web"></span><span id="bing-web-engine"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Bing WEB</a><a class="headerlink" href="#module-searx.engines.bing" title="Link to this heading">¶</a></h2> +<p>This is the implementation of the Bing-WEB engine. Some of this +implementations are shared by other engines:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#bing-images-engine"><span class="std std-ref">Bing Images</span></a></p></li> +<li><p><a class="reference internal" href="#bing-news-engine"><span class="std std-ref">Bing News</span></a></p></li> +<li><p><a class="reference internal" href="#bing-videos-engine"><span class="std std-ref">Bing Videos</span></a></p></li> +</ul> +<p>On the <a class="reference external" href="https://www.bing.com/account/general">preference page</a> Bing offers a lot of languages an regions (see section +LANGUAGE and COUNTRY/REGION). The Language is the language of the UI, we need +in SearXNG to get the translations of data such as <em>“published last week”</em>.</p> +<p>There is a description of the official <a class="reference external" href="https://learn.microsoft.com/en-us/bing/search-apis/">search-APIs</a>, unfortunately this is not +the API we can use or that bing itself would use. You can look up some things +in the API to get a better picture of bing, but the value specifications like +the market codes are usually outdated or at least no longer used by bing itself.</p> +<p>The market codes have been harmonized and are identical for web, video and +images. The news area has also been harmonized with the other categories. Only +political adjustments still seem to be made – for example, there is no news +category for the Chinese market.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages and regions from Bing-Web.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble a Bing-Web request.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/search'</span></em><a class="headerlink" href="#searx.engines.bing.base_url" title="Link to this definition">¶</a></dt> +<dd><p>Bing (Web) search URL</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing.max_page"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">200</span></em><a class="headerlink" href="#searx.engines.bing.max_page" title="Link to this definition">¶</a></dt> +<dd><p>200 pages maximum (<code class="docutils literal notranslate"><span class="pre">&first=1991</span></code>)</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing.safesearch"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing.</span></span><span class="sig-name descname"><span class="pre">safesearch</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.bing.safesearch" title="Link to this definition">¶</a></dt> +<dd><p>Bing results are always SFW. To get NSFW links from bing some age +verification by a cookie is needed / thats not possible in SearXNG.</p> +</dd></dl> + +</section> +<section id="module-searx.engines.bing_images"> +<span id="bing-images"></span><span id="bing-images-engine"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Bing Images</a><a class="headerlink" href="#module-searx.engines.bing_images" title="Link to this heading">¶</a></h2> +<p>Bing-Images: description see <a class="reference internal" href="#module-searx.engines.bing" title="searx.engines.bing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.bing</span></code></a>.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing_images.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_images.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_images.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_images.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble a Bing-Image request.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing_images.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_images.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_images.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_images.response" title="Link to this definition">¶</a></dt> +<dd><p>Get response from Bing-Images</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing_images.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_images.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/images/async'</span></em><a class="headerlink" href="#searx.engines.bing_images.base_url" title="Link to this definition">¶</a></dt> +<dd><p>Bing (Images) search URL</p> +</dd></dl> + +</section> +<section id="module-searx.engines.bing_videos"> +<span id="bing-videos"></span><span id="bing-videos-engine"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Bing Videos</a><a class="headerlink" href="#module-searx.engines.bing_videos" title="Link to this heading">¶</a></h2> +<p>Bing-Videos: description see <a class="reference internal" href="#module-searx.engines.bing" title="searx.engines.bing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.bing</span></code></a>.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing_videos.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_videos.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_videos.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_videos.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble a Bing-Video request.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing_videos.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_videos.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_videos.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_videos.response" title="Link to this definition">¶</a></dt> +<dd><p>Get response from Bing-Video</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing_videos.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_videos.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/videos/asyncv2'</span></em><a class="headerlink" href="#searx.engines.bing_videos.base_url" title="Link to this definition">¶</a></dt> +<dd><p>Bing (Videos) async search URL.</p> +</dd></dl> + +</section> +<section id="module-searx.engines.bing_news"> +<span id="bing-news"></span><span id="bing-news-engine"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Bing News</a><a class="headerlink" href="#module-searx.engines.bing_news" title="Link to this heading">¶</a></h2> +<p>Bing-News: description see <a class="reference internal" href="#module-searx.engines.bing" title="searx.engines.bing"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.bing</span></code></a>.</p> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>Bing News is <em>different</em> in some ways!</p> +</div> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing_news.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_news.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_news.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages and regions from Bing-News.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing_news.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_news.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_news.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble a Bing-News request.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.bing_news.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/bing_news.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.bing_news.response" title="Link to this definition">¶</a></dt> +<dd><p>Get response from Bing-Video</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing_news.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.bing.com/news/infinitescrollajax'</span></em><a class="headerlink" href="#searx.engines.bing_news.base_url" title="Link to this definition">¶</a></dt> +<dd><p>Bing (News) search URL</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing_news.paging"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">paging</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.bing_news.paging" title="Link to this definition">¶</a></dt> +<dd><p>If go through the pages and there are actually no new results for another +page, then bing returns the results from the last page again.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bing_news.time_map"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bing_news.</span></span><span class="sig-name descname"><span class="pre">time_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'day':</span> <span class="pre">'interval="4"',</span> <span class="pre">'month':</span> <span class="pre">'interval="9"',</span> <span class="pre">'week':</span> <span class="pre">'interval="7"'}</span></em><a class="headerlink" href="#searx.engines.bing_news.time_map" title="Link to this definition">¶</a></dt> +<dd><p>A string ‘4’ means <em>last hour</em>. We use <em>last hour</em> for <code class="docutils literal notranslate"><span class="pre">day</span></code> here since the +difference of <em>last day</em> and <em>last week</em> in the result list is just marginally. +Bing does not have news range <code class="docutils literal notranslate"><span class="pre">year</span></code> / we use <code class="docutils literal notranslate"><span class="pre">month</span></code> instead.</p> +</dd></dl> + +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="archlinux.html" title="previous chapter">Arch Linux</a> + <li>Next: <a href="bpb.html" title="next chapter">Bpb</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/bing.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/bpb.html b/dev/engines/online/bpb.html new file mode 100644 index 000000000..e33bd2593 --- /dev/null +++ b/dev/engines/online/bpb.html @@ -0,0 +1,198 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Bpb — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Brave Engines" href="brave.html" /> + <link rel="prev" title="Bing Engines" href="bing.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="brave.html" title="Brave Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="bing.html" title="Bing Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Bpb</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="bpb"> +<span id="bpb-engine"></span><h1>Bpb<a class="headerlink" href="#bpb" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.bpb">BPB refers to <code class="docutils literal notranslate"><span class="pre">Bundeszentrale</span> <span class="pre">für</span> <span class="pre">poltische</span> <span class="pre">Bildung</span></code>, which is a German +governmental institution aiming to reduce misinformation by providing resources +about politics and history.</p> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="bing.html" title="previous chapter">Bing Engines</a> + <li>Next: <a href="brave.html" title="next chapter">Brave Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/bpb.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/brave.html b/dev/engines/online/brave.html new file mode 100644 index 000000000..786e1bb13 --- /dev/null +++ b/dev/engines/online/brave.html @@ -0,0 +1,344 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Brave Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="BT4G" href="bt4g.html" /> + <link rel="prev" title="Bpb" href="bpb.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="bt4g.html" title="BT4G" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="bpb.html" title="Bpb" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Brave Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="brave-engines"> +<span id="brave-engine"></span><h1>Brave Engines<a class="headerlink" href="#brave-engines" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#brave-regions" id="id3">Brave regions</a></p></li> +<li><p><a class="reference internal" href="#brave-goggles" id="id4">Brave Goggles</a></p></li> +<li><p><a class="reference internal" href="#brave-languages" id="id5">Brave languages</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id6">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.brave">Brave supports the categories listed in <code class="xref py py-obj docutils literal notranslate"><span class="pre">brave_category</span></code> (General, +news, videos, images). The support of <a class="reference internal" href="#searx.engines.brave.paging" title="searx.engines.brave.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a> and <a class="reference internal" href="#searx.engines.brave.time_range_support" title="searx.engines.brave.time_range_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time</span> <span class="pre">range</span></code></a> is limited (see remarks).</p> +<p>Configured <code class="docutils literal notranslate"><span class="pre">brave</span></code> engines:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">search</span> +<span class="w"> </span><span class="nt">time_range_support</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="nt">paging</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave.images</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave.videos</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave.news</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">brave.goggles</span> +<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">goggles</span> +<span class="w"> </span><span class="nt">time_range_support</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="nt">paging</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">brave_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">goggles</span> +</pre></div> +</div> +<section id="brave-regions"> +<span id="id1"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Brave regions</a><a class="headerlink" href="#brave-regions" title="Link to this heading">¶</a></h2> +<p>Brave uses two-digit tags for the regions like <code class="docutils literal notranslate"><span class="pre">ca</span></code> while SearXNG deals with +locales. To get a mapping, all <em>officiat de-facto</em> languages of the Brave +region are mapped to regions in SearXNG (see <a class="reference external" href="https://babel.readthedocs.io/en/latest/api/languages.html#babel.languages.get_official_languages" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel</span></code></a>):</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">"regions"</span><span class="p">:</span> <span class="p">{</span> + <span class="o">..</span> + <span class="s2">"en-CA"</span><span class="p">:</span> <span class="s2">"ca"</span><span class="p">,</span> + <span class="s2">"fr-CA"</span><span class="p">:</span> <span class="s2">"ca"</span><span class="p">,</span> + <span class="o">..</span> + <span class="p">}</span> +</pre></div> +</div> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>The language (aka region) support of Brave’s index is limited to very basic +languages. The search results for languages like Chinese or Arabic are of +low quality.</p> +</div> +</section> +<section id="brave-goggles"> +<span id="brave-googles"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Brave Goggles</a><a class="headerlink" href="#brave-goggles" title="Link to this heading">¶</a></h2> +<p>Goggles allow you to choose, alter, or extend the ranking of Brave Search +results (<a class="reference external" href="https://brave.com/static-assets/files/goggles.pdf">Goggles Whitepaper</a>). Goggles are openly developed by the community +of Brave Search users.</p> +<p>Select from the <a class="reference external" href="https://search.brave.com/goggles/discover">list of Goggles</a> people have published, or create your own +(<a class="reference external" href="https://github.com/brave/goggles-quickstart">Goggles Quickstart</a>).</p> +</section> +<section id="brave-languages"> +<span id="id2"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Brave languages</a><a class="headerlink" href="#brave-languages" title="Link to this heading">¶</a></h2> +<p>Brave’s language support is limited to the UI (menus, area local notations, +etc). Brave’s index only seems to support a locale, but it does not seem to +support any languages in its index. The choice of available languages is very +small (and its not clear to me where the difference in UI is when switching +from en-us to en-ca or en-gb).</p> +<p>In the <a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraits</span> <span class="pre">object</span></code></a> the +UI languages are stored in a custom field named <code class="docutils literal notranslate"><span class="pre">ui_lang</span></code>:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="s2">"custom"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"ui_lang"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"ca"</span><span class="p">:</span> <span class="s2">"ca"</span><span class="p">,</span> + <span class="s2">"de-DE"</span><span class="p">:</span> <span class="s2">"de-de"</span><span class="p">,</span> + <span class="s2">"en-CA"</span><span class="p">:</span> <span class="s2">"en-ca"</span><span class="p">,</span> + <span class="s2">"en-GB"</span><span class="p">:</span> <span class="s2">"en-gb"</span><span class="p">,</span> + <span class="s2">"en-US"</span><span class="p">:</span> <span class="s2">"en-us"</span><span class="p">,</span> + <span class="s2">"es"</span><span class="p">:</span> <span class="s2">"es"</span><span class="p">,</span> + <span class="s2">"fr-CA"</span><span class="p">:</span> <span class="s2">"fr-ca"</span><span class="p">,</span> + <span class="s2">"fr-FR"</span><span class="p">:</span> <span class="s2">"fr-fr"</span><span class="p">,</span> + <span class="s2">"ja-JP"</span><span class="p">:</span> <span class="s2">"ja-jp"</span><span class="p">,</span> + <span class="s2">"pt-BR"</span><span class="p">:</span> <span class="s2">"pt-br"</span><span class="p">,</span> + <span class="s2">"sq-AL"</span><span class="p">:</span> <span class="s2">"sq-al"</span> + <span class="p">}</span> +<span class="p">},</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id6" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py attribute"> +<dt class="sig sig-object py" id="searx.engines.brave.Goggles"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">Goggles</span></span><a class="headerlink" href="#searx.engines.brave.Goggles" title="Link to this definition">¶</a></dt> +<dd><p>Brave supports common web-search, videos, images, news, and goggles search.</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">search</span></code>: Common WEB search</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">videos</span></code>: search for videos</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">images</span></code>: search for images</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">news</span></code>: search for news</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">goggles</span></code>: Common WEB search with custom rules</p></li> +</ul> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.brave.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/brave.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.brave.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch <a class="reference internal" href="#brave-languages"><span class="std std-ref">languages</span></a> and <a class="reference internal" href="#brave-regions"><span class="std std-ref">regions</span></a> from Brave.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.brave.brave_spellcheck"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">brave_spellcheck</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.brave.brave_spellcheck" title="Link to this definition">¶</a></dt> +<dd><p>Brave supports some kind of spell checking. When activated, Brave tries to +fix typos, e.g. it searches for <code class="docutils literal notranslate"><span class="pre">food</span></code> when the user queries for <code class="docutils literal notranslate"><span class="pre">fooh</span></code>. In +the UI of Brave the user gets warned about this, since we can not warn the user +in SearXNG, the spellchecking is disabled by default.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.brave.max_page"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">10</span></em><a class="headerlink" href="#searx.engines.brave.max_page" title="Link to this definition">¶</a></dt> +<dd><p>Tested 9 pages maximum (<code class="docutils literal notranslate"><span class="pre">&offset=8</span></code>), to be save max is set to 10. Trying +to do more won’t return any result and you will most likely be flagged as a bot.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.brave.paging"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">paging</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.brave.paging" title="Link to this definition">¶</a></dt> +<dd><p>Brave only supports paging in <code class="xref py py-obj docutils literal notranslate"><span class="pre">brave_category</span></code> <code class="docutils literal notranslate"><span class="pre">search</span></code> (UI +category All) and in the goggles category.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.brave.time_range_support"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.brave.</span></span><span class="sig-name descname"><span class="pre">time_range_support</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.brave.time_range_support" title="Link to this definition">¶</a></dt> +<dd><p>Brave only supports time-range in <code class="xref py py-obj docutils literal notranslate"><span class="pre">brave_category</span></code> <code class="docutils literal notranslate"><span class="pre">search</span></code> (UI +category All) and in the goggles category.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="bpb.html" title="previous chapter">Bpb</a> + <li>Next: <a href="bt4g.html" title="next chapter">BT4G</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/brave.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/bt4g.html b/dev/engines/online/bt4g.html new file mode 100644 index 000000000..d8a66ff64 --- /dev/null +++ b/dev/engines/online/bt4g.html @@ -0,0 +1,249 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>BT4G — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Dailymotion" href="dailymotion.html" /> + <link rel="prev" title="Brave Engines" href="brave.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="dailymotion.html" title="Dailymotion" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="brave.html" title="Brave Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">BT4G</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="bt4g"> +<span id="bt4g-engine"></span><h1>BT4G<a class="headerlink" href="#bt4g" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.bt4g"><a class="reference external" href="https://bt4g.com/">BT4G</a> (bt4g.com) is not a tracker and doesn’t store any content and only +collects torrent metadata (such as file names and file sizes) and a magnet link +(torrent identifier).</p> +<p>This engine does not parse the HTML page because there is an API in XML (RSS). +The RSS feed provides fewer data like amount of seeders/leechers and the files +in the torrent file. It’s a tradeoff for a “stable” engine as the XML from RSS +content will change way less than the HTML page.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following additional settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.bt4g.bt4g_order_by" title="searx.engines.bt4g.bt4g_order_by"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bt4g_order_by</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.bt4g.bt4g_category" title="searx.engines.bt4g.bt4g_category"><code class="xref py py-obj docutils literal notranslate"><span class="pre">bt4g_category</span></code></a></p></li> +</ul> +<p>With this options a SearXNG maintainer is able to configure <strong>additional</strong> +engines for specific torrent searches. For example a engine to search only for +Movies and sort the result list by the count of seeders.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bt4g.movie</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bt4g</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bt4gv</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">video</span> +<span class="w"> </span><span class="nt">bt4g_order_by</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seeders</span> +<span class="w"> </span><span class="nt">bt4g_category</span><span class="p">:</span><span class="w"> </span><span class="s">'movie'</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bt4g.bt4g_category"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bt4g.</span></span><span class="sig-name descname"><span class="pre">bt4g_category</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'all'</span></em><a class="headerlink" href="#searx.engines.bt4g.bt4g_category" title="Link to this definition">¶</a></dt> +<dd><p>BT$G offers categories: <code class="docutils literal notranslate"><span class="pre">all</span></code> (default), <code class="docutils literal notranslate"><span class="pre">audio</span></code>, <code class="docutils literal notranslate"><span class="pre">movie</span></code>, <code class="docutils literal notranslate"><span class="pre">doc</span></code>, +<code class="docutils literal notranslate"><span class="pre">app</span></code> and `` other``.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.bt4g.bt4g_order_by"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.bt4g.</span></span><span class="sig-name descname"><span class="pre">bt4g_order_by</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'relevance'</span></em><a class="headerlink" href="#searx.engines.bt4g.bt4g_order_by" title="Link to this definition">¶</a></dt> +<dd><p>Result list can be ordered by <code class="docutils literal notranslate"><span class="pre">relevance</span></code> (default), <code class="docutils literal notranslate"><span class="pre">size</span></code>, <code class="docutils literal notranslate"><span class="pre">seeders</span></code> +or <code class="docutils literal notranslate"><span class="pre">time</span></code>.</p> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>When <em>time_range</em> is activate, the results always ordered by <code class="docutils literal notranslate"><span class="pre">time</span></code>.</p> +</div> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="brave.html" title="previous chapter">Brave Engines</a> + <li>Next: <a href="dailymotion.html" title="next chapter">Dailymotion</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/bt4g.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/dailymotion.html b/dev/engines/online/dailymotion.html new file mode 100644 index 000000000..810bde209 --- /dev/null +++ b/dev/engines/online/dailymotion.html @@ -0,0 +1,259 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Dailymotion — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Discourse Forums" href="discourse.html" /> + <link rel="prev" title="BT4G" href="bt4g.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="discourse.html" title="Discourse Forums" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="bt4g.html" title="BT4G" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Dailymotion</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="dailymotion"> +<span id="dailymotion-engine"></span><h1>Dailymotion<a class="headerlink" href="#dailymotion" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#dailymotion-videos" id="id1">Dailymotion (Videos)</a></p></li> +</ul> +</nav> +<section id="dailymotion-videos"> +<span id="module-searx.engines.dailymotion"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Dailymotion (Videos)</a><a class="headerlink" href="#dailymotion-videos" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.dailymotion.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/dailymotion.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.dailymotion.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch locales & languages from dailymotion.</p> +<p>Locales fetched from <a class="reference external" href="https://api.dailymotion.com/locales">api/locales</a>. +There are duplications in the locale codes returned from Dailymotion which +can be ignored:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">en_EN</span> <span class="o">--></span> <span class="n">en_GB</span><span class="p">,</span> <span class="n">en_US</span> +<span class="n">ar_AA</span> <span class="o">--></span> <span class="n">ar_EG</span><span class="p">,</span> <span class="n">ar_AE</span><span class="p">,</span> <span class="n">ar_SA</span> +</pre></div> +</div> +<p>The language list <a class="reference external" href="https://api.dailymotion.com/languages">api/languages</a> +contains over 7000 <em>languages</em> codes (see <a class="reference external" href="https://github.com/searxng/searxng/pull/1071">PR1071</a>). We use only those +language codes that are used in the locales.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.dailymotion.family_filter_map"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">family_filter_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">'false',</span> <span class="pre">1:</span> <span class="pre">'true',</span> <span class="pre">2:</span> <span class="pre">'true'}</span></em><a class="headerlink" href="#searx.engines.dailymotion.family_filter_map" title="Link to this definition">¶</a></dt> +<dd><p>By default, the family filter is turned on. Setting this parameter to +<code class="docutils literal notranslate"><span class="pre">false</span></code> will stop filtering-out explicit content from searches and global +contexts (<code class="docutils literal notranslate"><span class="pre">family_filter</span></code> in <a class="reference external" href="https://developers.dailymotion.com/api/#global-parameters">Global API Parameters</a> ).</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.dailymotion.iframe_src"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">iframe_src</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://www.dailymotion.com/embed/video/{video_id}'</span></em><a class="headerlink" href="#searx.engines.dailymotion.iframe_src" title="Link to this definition">¶</a></dt> +<dd><p>URL template to embed video in SearXNG’s result list.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.dailymotion.result_fields"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">result_fields</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['allow_embed',</span> <span class="pre">'description',</span> <span class="pre">'title',</span> <span class="pre">'created_time',</span> <span class="pre">'duration',</span> <span class="pre">'url',</span> <span class="pre">'thumbnail_360_url',</span> <span class="pre">'id']</span></em><a class="headerlink" href="#searx.engines.dailymotion.result_fields" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://developers.dailymotion.com/api/#fields-selection">Fields selection</a>, by default, a few fields are returned. To request more +specific fields, the <code class="docutils literal notranslate"><span class="pre">fields</span></code> parameter is used with the list of fields +SearXNG needs in the response to build a video result list.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.dailymotion.safesearch_params"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">safesearch_params</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">{},</span> <span class="pre">1:</span> <span class="pre">{'is_created_for_kids':</span> <span class="pre">'true'},</span> <span class="pre">2:</span> <span class="pre">{'is_created_for_kids':</span> <span class="pre">'true'}}</span></em><a class="headerlink" href="#searx.engines.dailymotion.safesearch_params" title="Link to this definition">¶</a></dt> +<dd><p>True if this video is “Created for Kids” / intends to target an audience +under the age of 16 (<code class="docutils literal notranslate"><span class="pre">is_created_for_kids</span></code> in <a class="reference external" href="https://developers.dailymotion.com/api/#video-filters">Video filters API</a> )</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.dailymotion.search_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.dailymotion.</span></span><span class="sig-name descname"><span class="pre">search_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://api.dailymotion.com/videos?'</span></em><a class="headerlink" href="#searx.engines.dailymotion.search_url" title="Link to this definition">¶</a></dt> +<dd><p>URL to retrieve a list of videos.</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://developers.dailymotion.com/tools/">REST GET</a></p></li> +<li><p><a class="reference external" href="https://developers.dailymotion.com/api/#global-parameters">Global API Parameters</a></p></li> +<li><p><a class="reference external" href="https://developers.dailymotion.com/api/#video-filters">Video filters API</a></p></li> +</ul> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="bt4g.html" title="previous chapter">BT4G</a> + <li>Next: <a href="discourse.html" title="next chapter">Discourse Forums</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/dailymotion.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/discourse.html b/dev/engines/online/discourse.html new file mode 100644 index 000000000..6e303f110 --- /dev/null +++ b/dev/engines/online/discourse.html @@ -0,0 +1,276 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Discourse Forums — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="DuckDuckGo Engines" href="duckduckgo.html" /> + <link rel="prev" title="Dailymotion" href="dailymotion.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="duckduckgo.html" title="DuckDuckGo Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="dailymotion.html" title="Dailymotion" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Discourse Forums</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="module-searx.engines.discourse"> +<span id="discourse-forums"></span><span id="discourse-engine"></span><h1>Discourse Forums<a class="headerlink" href="#module-searx.engines.discourse" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://trends.builtwith.com/websitelist/Discourse">builtwith.com Discourse</a></p></li> +</ul> +</aside> +<p>Discourse is an open source Internet forum system. To search in a forum this +engine offers some additional settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.discourse.base_url" title="searx.engines.discourse.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.discourse.api_order" title="searx.engines.discourse.api_order"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_order</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.discourse.search_endpoint" title="searx.engines.discourse.search_endpoint"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_endpoint</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.discourse.show_avatar" title="searx.engines.discourse.show_avatar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">show_avatar</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.discourse.api_key" title="searx.engines.discourse.api_key"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_key</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.discourse.api_username" title="searx.engines.discourse.api_username"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_username</span></code></a></p></li> +</ul> +<section id="example"> +<h2>Example<a class="headerlink" href="#example" title="Link to this heading">¶</a></h2> +<p>To search in your favorite Discourse forum, add a configuration like shown here +for the <code class="docutils literal notranslate"><span class="pre">paddling.com</span></code> forum:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddling</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">discourse</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddle</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="s">'https://forums.paddling.com/'</span> +<span class="w"> </span><span class="nt">api_order</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">views</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">'social</span><span class="nv"> </span><span class="s">media'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'sports'</span><span class="p p-Indicator">]</span> +<span class="w"> </span><span class="nt">show_avatar</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +</pre></div> +</div> +<p>If the forum is private, you need to add an API key and username for the search:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddling</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">discourse</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">paddle</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="s">'https://forums.paddling.com/'</span> +<span class="w"> </span><span class="nt">api_order</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">views</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">'social</span><span class="nv"> </span><span class="s">media'</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">'sports'</span><span class="p p-Indicator">]</span> +<span class="w"> </span><span class="nt">show_avatar</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="w"> </span><span class="nt">api_key</span><span class="p">:</span><span class="w"> </span><span class="s">'<KEY>'</span> +<span class="w"> </span><span class="nt">api_username</span><span class="p">:</span><span class="w"> </span><span class="s">'system'</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2>Implementations<a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.discourse.api_key"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">api_key</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.discourse.api_key" title="Link to this definition">¶</a></dt> +<dd><p>API key of the Discourse forum.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.discourse.api_order"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">api_order</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'likes'</span></em><a class="headerlink" href="#searx.engines.discourse.api_order" title="Link to this definition">¶</a></dt> +<dd><p>Order method, valid values are: <code class="docutils literal notranslate"><span class="pre">latest</span></code>, <code class="docutils literal notranslate"><span class="pre">likes</span></code>, <code class="docutils literal notranslate"><span class="pre">views</span></code>, <code class="docutils literal notranslate"><span class="pre">latest_topic</span></code></p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.discourse.api_username"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">api_username</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.discourse.api_username" title="Link to this definition">¶</a></dt> +<dd><p>API username of the Discourse forum.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.discourse.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.discourse.base_url" title="Link to this definition">¶</a></dt> +<dd><p>URL of the Discourse forum.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.discourse.search_endpoint"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">search_endpoint</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'/search.json'</span></em><a class="headerlink" href="#searx.engines.discourse.search_endpoint" title="Link to this definition">¶</a></dt> +<dd><p>URL path of the <a class="reference external" href="https://docs.discourse.org/#tag/Search">search endpoint</a>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.discourse.show_avatar"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.discourse.</span></span><span class="sig-name descname"><span class="pre">show_avatar</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.discourse.show_avatar" title="Link to this definition">¶</a></dt> +<dd><p>Show avatar of the user who send the post.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="dailymotion.html" title="previous chapter">Dailymotion</a> + <li>Next: <a href="duckduckgo.html" title="next chapter">DuckDuckGo Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/discourse.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/duckduckgo.html b/dev/engines/online/duckduckgo.html new file mode 100644 index 000000000..9970a59a4 --- /dev/null +++ b/dev/engines/online/duckduckgo.html @@ -0,0 +1,348 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>DuckDuckGo Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Geizhals" href="geizhals.html" /> + <link rel="prev" title="Discourse Forums" href="discourse.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="geizhals.html" title="Geizhals" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="discourse.html" title="Discourse Forums" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">DuckDuckGo Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="duckduckgo-engines"> +<span id="id1"></span><h1>DuckDuckGo Engines<a class="headerlink" href="#duckduckgo-engines" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#duckduckgo-web" id="id2">DuckDuckGo WEB</a></p></li> +<li><p><a class="reference internal" href="#duckduckgo-extra-images-videos-news" id="id3">DuckDuckGo Extra (images, videos, news)</a></p></li> +<li><p><a class="reference internal" href="#duckduckgo-instant-answer-api" id="id4">DuckDuckGo Instant Answer API</a></p></li> +<li><p><a class="reference internal" href="#duckduckgo-weather" id="id5">DuckDuckGo Weather</a></p></li> +</ul> +</nav> +<section id="duckduckgo-web"> +<span id="module-searx.engines.duckduckgo"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">DuckDuckGo WEB</a><a class="headerlink" href="#duckduckgo-web" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo.cache_vqd"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">cache_vqd</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#cache_vqd"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.cache_vqd" title="Link to this definition">¶</a></dt> +<dd><p>Caches a <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value from a query.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages & regions from DuckDuckGo.</p> +<p>SearXNG’s <code class="docutils literal notranslate"><span class="pre">all</span></code> locale maps DuckDuckGo’s “Alle regions” (<code class="docutils literal notranslate"><span class="pre">wt-wt</span></code>). +DuckDuckGo’s language “Browsers preferred language” (<code class="docutils literal notranslate"><span class="pre">wt_WT</span></code>) makes no +sense in a SearXNG request since SearXNG’s <code class="docutils literal notranslate"><span class="pre">all</span></code> will not add a +<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> HTTP header. The value in <code class="docutils literal notranslate"><span class="pre">engine_traits.all_locale</span></code> +is <code class="docutils literal notranslate"><span class="pre">wt-wt</span></code> (the region).</p> +<p>Beside regions DuckDuckGo also defines its languages by region codes. By +example these are the english languages in DuckDuckGo:</p> +<ul class="simple"> +<li><p>en_US</p></li> +<li><p>en_AU</p></li> +<li><p>en_CA</p></li> +<li><p>en_GB</p></li> +</ul> +<p>The function <a class="reference internal" href="#searx.engines.duckduckgo.get_ddg_lang" title="searx.engines.duckduckgo.get_ddg_lang"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_ddg_lang</span></code></a> evaluates DuckDuckGo’s language from +SearXNG’s locale.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo.get_ddg_lang"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">get_ddg_lang</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">eng_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">sxng_locale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'en_US'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#get_ddg_lang"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.get_ddg_lang" title="Link to this definition">¶</a></dt> +<dd><p>Get DuckDuckGo’s language identifier from SearXNG’s locale.</p> +<p>DuckDuckGo defines its languages by region codes (see +<a class="reference internal" href="#searx.engines.duckduckgo.fetch_traits" title="searx.engines.duckduckgo.fetch_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fetch_traits</span></code></a>).</p> +<p>To get region and language of a DDG service use:</p> +<p>It might confuse, but the <code class="docutils literal notranslate"><span class="pre">l</span></code> value of the cookie is what SearXNG calls +the <em>region</em>:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># !ddi paris :es-AR --> {'ad': 'es_AR', 'ah': 'ar-es', 'l': 'ar-es'}</span> +<span class="n">params</span><span class="p">[</span><span class="s1">'cookies'</span><span class="p">][</span><span class="s1">'ad'</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_lang</span> +<span class="n">params</span><span class="p">[</span><span class="s1">'cookies'</span><span class="p">][</span><span class="s1">'ah'</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_region</span> +<span class="n">params</span><span class="p">[</span><span class="s1">'cookies'</span><span class="p">][</span><span class="s1">'l'</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_region</span> +</pre></div> +</div> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p><a class="reference external" href="https://lite.duckduckgo.com/lite">DDG-lite</a> and the <em>no Javascript</em> +page <a class="reference external" href="https://html.duckduckgo.com/html">https://html.duckduckgo.com/html</a> do not offer a language selection +to the user, only a region can be selected by the user (<code class="docutils literal notranslate"><span class="pre">eng_region</span></code> +from the example above). DDG-lite and <em>no Javascript</em> store the selected +region in a cookie:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">params</span><span class="p">[</span><span class="s1">'cookies'</span><span class="p">][</span><span class="s1">'kl'</span><span class="p">]</span> <span class="o">=</span> <span class="n">eng_region</span> <span class="c1"># 'ar-es'</span> +</pre></div> +</div> +</div> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo.get_vqd"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">get_vqd</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#get_vqd"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.get_vqd" title="Link to this definition">¶</a></dt> +<dd><p>Returns the <code class="docutils literal notranslate"><span class="pre">vqd</span></code> that fits to the <em>query</em>.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>query</strong> – The query term</p></li> +<li><p><strong>region</strong> – DDG’s region code</p></li> +<li><p><strong>force_request</strong> – force a request to get a vqd value from DDG</p></li> +</ul> +</dd> +</dl> +<p>TL;DR; the <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value is needed to pass DDG’s bot protection and is used +by all request to DDG:</p> +<ul class="simple"> +<li><p>DuckDuckGo Lite: <code class="docutils literal notranslate"><span class="pre">https://lite.duckduckgo.com/lite</span></code> (POST form data)</p></li> +<li><p>DuckDuckGo Web: <code class="docutils literal notranslate"><span class="pre">https://links.duckduckgo.com/d.js?q=...&vqd=...</span></code></p></li> +<li><p>DuckDuckGo Images: <code class="docutils literal notranslate"><span class="pre">https://duckduckgo.com/i.js??q=...&vqd=...</span></code></p></li> +<li><p>DuckDuckGo Videos: <code class="docutils literal notranslate"><span class="pre">https://duckduckgo.com/v.js??q=...&vqd=...</span></code></p></li> +<li><p>DuckDuckGo News: <code class="docutils literal notranslate"><span class="pre">https://duckduckgo.com/news.js??q=...&vqd=...</span></code></p></li> +</ul> +<p>DDG’s bot detection is sensitive to the <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value. For some search terms +(such as extremely long search terms that are often sent by bots), no <code class="docutils literal notranslate"><span class="pre">vqd</span></code> +value can be determined.</p> +<p>If SearXNG cannot determine a <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value, then no request should go out +to DDG.</p> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>A request with a wrong <code class="docutils literal notranslate"><span class="pre">vqd</span></code> value leads to DDG temporarily putting +SearXNG’s IP on a block list.</p> +</div> +<p>Requests from IPs in this block list run into timeouts. Not sure, but it +seems the block list is a sliding window: to get my IP rid from the bot list +I had to cool down my IP for 1h (send no requests from that IP to DDG).</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo.is_ddg_captcha"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">is_ddg_captcha</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dom</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo.html#is_ddg_captcha"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo.is_ddg_captcha" title="Link to this definition">¶</a></dt> +<dd><p>In case of CAPTCHA ddg response its own <em>not a Robot</em> dialog and is not +redirected to a CAPTCHA page.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo.send_accept_language_header"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo.</span></span><span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.duckduckgo.send_accept_language_header" title="Link to this definition">¶</a></dt> +<dd><p>DuckDuckGo-Lite tries to guess user’s preferred language from the HTTP +<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code>. Optional the user can select a region filter (but not a +language).</p> +</dd></dl> + +<section id="duckduckgo-extra-images-videos-news"> +<span id="module-searx.engines.duckduckgo_extra"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">DuckDuckGo Extra (images, videos, news)</a><a class="headerlink" href="#duckduckgo-extra-images-videos-news" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo_extra.ddg_category"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo_extra.</span></span><span class="sig-name descname"><span class="pre">ddg_category</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'images'</span></em><a class="headerlink" href="#searx.engines.duckduckgo_extra.ddg_category" title="Link to this definition">¶</a></dt> +<dd><p>The category must be any of <code class="docutils literal notranslate"><span class="pre">images</span></code>, <code class="docutils literal notranslate"><span class="pre">videos</span></code> and <code class="docutils literal notranslate"><span class="pre">news</span></code></p> +</dd></dl> + +<section id="duckduckgo-instant-answer-api"> +<span id="module-searx.engines.duckduckgo_definitions"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">DuckDuckGo Instant Answer API</a><a class="headerlink" href="#duckduckgo-instant-answer-api" title="Link to this heading">¶</a></h2> +<p>The <a class="reference external" href="https://duckduckgo.com/api">DDG-API</a> is no longer documented but from +reverse engineering we can see that some services (e.g. instant answers) still +in use from the DDG search engine.</p> +<p>As far we can say the <em>instant answers</em> API does not support languages, or at +least we could not find out how language support should work. It seems that +most of the features are based on English terms.</p> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo_definitions.area_to_str"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo_definitions.</span></span><span class="sig-name descname"><span class="pre">area_to_str</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">area</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo_definitions.html#area_to_str"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo_definitions.area_to_str" title="Link to this definition">¶</a></dt> +<dd><p>parse <code class="docutils literal notranslate"><span class="pre">{'unit':</span> <span class="pre">'https://www.wikidata.org/entity/Q712226',</span> <span class="pre">'amount':</span> <span class="pre">'+20.99'}</span></code></p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.duckduckgo_definitions.is_broken_text"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.duckduckgo_definitions.</span></span><span class="sig-name descname"><span class="pre">is_broken_text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/duckduckgo_definitions.html#is_broken_text"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.duckduckgo_definitions.is_broken_text" title="Link to this definition">¶</a></dt> +<dd><p>duckduckgo may return something like <code class="docutils literal notranslate"><span class="pre"><a</span> <span class="pre">href="xxxx">http://somewhere</span> <span class="pre">Related</span> <span class="pre">website<a/></span></code></p> +<p>The href URL is broken, the “Related website” may contains some HTML.</p> +<p>The best solution seems to ignore these results.</p> +</dd></dl> + +<section id="duckduckgo-weather"> +<span id="module-searx.engines.duckduckgo_weather"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">DuckDuckGo Weather</a><a class="headerlink" href="#duckduckgo-weather" title="Link to this heading">¶</a></h2> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="discourse.html" title="previous chapter">Discourse Forums</a> + <li>Next: <a href="geizhals.html" title="next chapter">Geizhals</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/duckduckgo.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/geizhals.html b/dev/engines/online/geizhals.html new file mode 100644 index 000000000..b478b646b --- /dev/null +++ b/dev/engines/online/geizhals.html @@ -0,0 +1,205 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Geizhals — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Gitea" href="gitea.html" /> + <link rel="prev" title="DuckDuckGo Engines" href="duckduckgo.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="gitea.html" title="Gitea" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="duckduckgo.html" title="DuckDuckGo Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Geizhals</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="module-searx.engines.geizhals"> +<span id="geizhals"></span><span id="gitea-geizhals"></span><h1>Geizhals<a class="headerlink" href="#module-searx.engines.geizhals" title="Link to this heading">¶</a></h1> +<p>Geizhals is a German website to compare the price of a product on the +most common German shopping sites and find the lowest price.</p> +<p>The sorting of the search results can be influenced by the following additions +to the search term:</p> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">asc</span></code> or <code class="docutils literal notranslate"><span class="pre">price</span></code></dt><dd><p>To sort by price in ascending order.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">desc</span></code></dt><dd><p>To sort by price in descending order.</p> +</dd> +</dl> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="duckduckgo.html" title="previous chapter">DuckDuckGo Engines</a> + <li>Next: <a href="gitea.html" title="next chapter">Gitea</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/geizhals.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/gitea.html b/dev/engines/online/gitea.html new file mode 100644 index 000000000..f11d52ee9 --- /dev/null +++ b/dev/engines/online/gitea.html @@ -0,0 +1,260 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Gitea — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="GitLab" href="gitlab.html" /> + <link rel="prev" title="Geizhals" href="geizhals.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="gitlab.html" title="GitLab" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="geizhals.html" title="Geizhals" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Gitea</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="module-searx.engines.gitea"> +<span id="gitea"></span><span id="gitea-engine"></span><h1>Gitea<a class="headerlink" href="#module-searx.engines.gitea" title="Link to this heading">¶</a></h1> +<p>Engine to search in collaborative software platforms based on <a class="reference external" href="https://about.gitea.com/">Gitea</a> or <a class="reference external" href="https://forgejo.org/">Forgejo</a>.</p> +<section id="configuration"> +<h2>Configuration<a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following mandatory setting:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.gitea.base_url" title="searx.engines.gitea.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li> +</ul> +<p>Optional settings are:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.gitea.sort" title="searx.engines.gitea.sort"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sort</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.gitea.order" title="searx.engines.gitea.order"><code class="xref py py-obj docutils literal notranslate"><span class="pre">order</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.gitea.page_size" title="searx.engines.gitea.page_size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">page_size</span></code></a></p></li> +</ul> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitea.com</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitea</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://gitea.com</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitea</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">forgejo.com</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitea</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://code.forgejo.org</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">forgejo</span> +</pre></div> +</div> +<p>If you would like to use additional instances, just configure new engines in the +<a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings</span></a> and set the <code class="docutils literal notranslate"><span class="pre">base_url</span></code>.</p> +</section> +<section id="implementation"> +<h2>Implementation<a class="headerlink" href="#implementation" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.gitea.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.gitea.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.gitea.base_url" title="Link to this definition">¶</a></dt> +<dd><p>URL of the <a class="reference external" href="https://about.gitea.com/">Gitea</a> instance.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.gitea.order"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.gitea.</span></span><span class="sig-name descname"><span class="pre">order</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'desc'</span></em><a class="headerlink" href="#searx.engines.gitea.order" title="Link to this definition">¶</a></dt> +<dd><p>Sort order, possible values:</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">desc</span></code> (default)</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">asc</span></code></p></li> +</ul> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.gitea.page_size"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.gitea.</span></span><span class="sig-name descname"><span class="pre">page_size</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">10</span></em><a class="headerlink" href="#searx.engines.gitea.page_size" title="Link to this definition">¶</a></dt> +<dd><p>Maximum number of results per page (default 10).</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.gitea.sort"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.gitea.</span></span><span class="sig-name descname"><span class="pre">sort</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'updated'</span></em><a class="headerlink" href="#searx.engines.gitea.sort" title="Link to this definition">¶</a></dt> +<dd><p>Sort criteria, possible values:</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">updated</span></code> (default)</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">alpha</span></code></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">created</span></code></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">size</span></code></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">id</span></code></p></li> +</ul> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="geizhals.html" title="previous chapter">Geizhals</a> + <li>Next: <a href="gitlab.html" title="next chapter">GitLab</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/gitea.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/gitlab.html b/dev/engines/online/gitlab.html new file mode 100644 index 000000000..54b3b07fd --- /dev/null +++ b/dev/engines/online/gitlab.html @@ -0,0 +1,241 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>GitLab — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Google Engines" href="google.html" /> + <link rel="prev" title="Gitea" href="gitea.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="google.html" title="Google Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="gitea.html" title="Gitea" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">GitLab</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="module-searx.engines.gitlab"> +<span id="gitlab"></span><span id="gitlab-engine"></span><h1>GitLab<a class="headerlink" href="#module-searx.engines.gitlab" title="Link to this heading">¶</a></h1> +<p>Engine to search in collaborative software platforms based on <a class="reference external" href="https://about.gitlab.com/install/">GitLab</a> with +the <a class="reference external" href="https://docs.gitlab.com/ee/api/">GitLab REST API</a>.</p> +<section id="configuration"> +<h2>Configuration<a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following mandatory setting:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.gitlab.base_url" title="searx.engines.gitlab.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li> +</ul> +<p>Optional settings are:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.gitlab.api_path" title="searx.engines.gitlab.api_path"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_path</span></code></a></p></li> +</ul> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitlab</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitlab</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://gitlab.com</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gl</span> +<span class="w"> </span><span class="nt">about</span><span class="p">:</span> +<span class="w"> </span><span class="nt">website</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://gitlab.com/</span> +<span class="w"> </span><span class="nt">wikidata_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Q16639197</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gnome</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitlab</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://gitlab.gnome.org</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gn</span> +<span class="w"> </span><span class="nt">about</span><span class="p">:</span> +<span class="w"> </span><span class="nt">website</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://gitlab.gnome.org</span> +<span class="w"> </span><span class="nt">wikidata_id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Q44316</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2>Implementations<a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.gitlab.api_path"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.gitlab.</span></span><span class="sig-name descname"><span class="pre">api_path</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'api/v4/projects'</span></em><a class="headerlink" href="#searx.engines.gitlab.api_path" title="Link to this definition">¶</a></dt> +<dd><p>The path the <a class="reference external" href="https://docs.gitlab.com/ee/api/projects.html">project API</a>.</p> +<p>The default path should work fine usually.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.gitlab.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.gitlab.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.gitlab.base_url" title="Link to this definition">¶</a></dt> +<dd><p>Base URL of the GitLab host.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="gitea.html" title="previous chapter">Gitea</a> + <li>Next: <a href="google.html" title="next chapter">Google Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/gitlab.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/google.html b/dev/engines/online/google.html new file mode 100644 index 000000000..43b41d5a4 --- /dev/null +++ b/dev/engines/online/google.html @@ -0,0 +1,468 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Google Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Lemmy" href="lemmy.html" /> + <link rel="prev" title="GitLab" href="gitlab.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="lemmy.html" title="Lemmy" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="gitlab.html" title="GitLab" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Google Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="google-engines"> +<span id="id1"></span><h1>Google Engines<a class="headerlink" href="#google-engines" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#google-api" id="id4">Google API</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.google" id="id5">Google WEB</a></p></li> +<li><p><a class="reference internal" href="#google-autocomplete" id="id6">Google Autocomplete</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.google_images" id="id7">Google Images</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.google_videos" id="id8">Google Videos</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.google_news" id="id9">Google News</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.google_scholar" id="id10">Google Scholar</a></p></li> +</ul> +</nav> +<section id="google-api"> +<span id="id2"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Google API</a><a class="headerlink" href="#google-api" title="Link to this heading">¶</a></h2> +<p>SearXNG’s implementation of the Google API is mainly done in +<a class="reference internal" href="#searx.engines.google.get_google_info" title="searx.engines.google.get_google_info"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_google_info</span></code></a>.</p> +<p>For detailed description of the <em>REST-full</em> API see: <a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#WebSearch_Query_Parameter_Definitions">Query Parameter +Definitions</a>. The linked API documentation can sometimes be helpful during +reverse engineering. However, we cannot use it in the freely accessible WEB +services; not all parameters can be applied and some engines are more <em>special</em> +than other (e.g. <a class="reference internal" href="#google-news-engine"><span class="std std-ref">Google News</span></a>).</p> +</section> +<section id="module-searx.engines.google"> +<span id="google-web"></span><span id="google-web-engine"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Google WEB</a><a class="headerlink" href="#module-searx.engines.google" title="Link to this heading">¶</a></h2> +<p>This is the implementation of the Google WEB engine. Some of this +implementations (manly the <a class="reference internal" href="#searx.engines.google.get_google_info" title="searx.engines.google.get_google_info"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_google_info</span></code></a>) are shared by other +engines:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#google-images-engine"><span class="std std-ref">Google Images</span></a></p></li> +<li><p><a class="reference internal" href="#google-news-engine"><span class="std std-ref">Google News</span></a></p></li> +<li><p><a class="reference internal" href="#google-videos-engine"><span class="std std-ref">Google Videos</span></a></p></li> +<li><p><a class="reference internal" href="#google-scholar-engine"><span class="std std-ref">Google Scholar</span></a></p></li> +<li><p><a class="reference internal" href="#google-autocomplete"><span class="std std-ref">Google Autocomplete</span></a></p></li> +</ul> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">add_domains</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages from Google.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google.get_google_info"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">get_google_info</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">params</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eng_traits</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google.html#get_google_info"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.get_google_info" title="Link to this definition">¶</a></dt> +<dd><p>Composing various (language) properties for the google engines (<a class="reference internal" href="#google-api"><span class="std std-ref">Google API</span></a>).</p> +<p>This function is called by the various google engines (<a class="reference internal" href="#google-web-engine"><span class="std std-ref">Google WEB</span></a>, <a class="reference internal" href="#google-images-engine"><span class="std std-ref">Google Images</span></a>, <a class="reference internal" href="#google-news-engine"><span class="std std-ref">Google News</span></a> and +<a class="reference internal" href="#google-videos-engine"><span class="std std-ref">Google Videos</span></a>).</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>param</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><em>dict</em></a>) – Request parameters of the engine. At least +a <code class="docutils literal notranslate"><span class="pre">searxng_locale</span></code> key should be in the dictionary.</p></li> +<li><p><strong>eng_traits</strong> – Engine’s traits fetched from google preferences +(<a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.enginelib.traits.EngineTraits</span></code></a>)</p></li> +</ul> +</dd> +<dt class="field-even">Return type<span class="colon">:</span></dt> +<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)">dict</a></p> +</dd> +<dt class="field-odd">Returns<span class="colon">:</span></dt> +<dd class="field-odd"><p><p>Py-Dictionary with the key/value pairs:</p> +<dl class="simple"> +<dt>language:</dt><dd><p>The language code that is used by google (e.g. <code class="docutils literal notranslate"><span class="pre">lang_en</span></code> or +<code class="docutils literal notranslate"><span class="pre">lang_zh-TW</span></code>)</p> +</dd> +<dt>country:</dt><dd><p>The country code that is used by google (e.g. <code class="docutils literal notranslate"><span class="pre">US</span></code> or <code class="docutils literal notranslate"><span class="pre">TW</span></code>)</p> +</dd> +<dt>locale:</dt><dd><p>A instance of <a class="reference external" href="https://babel.readthedocs.io/en/latest/api/core.html#babel.core.Locale" title="(in Babel v2.2)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">babel.core.Locale</span></code></a> build from the +<code class="docutils literal notranslate"><span class="pre">searxng_locale</span></code> value.</p> +</dd> +<dt>subdomain:</dt><dd><p>Google subdomain <code class="xref py py-obj docutils literal notranslate"><span class="pre">google_domains</span></code> that fits to the country +code.</p> +</dd> +<dt>params:</dt><dd><p>Py-Dictionary with additional request arguments (can be passed to +<a class="reference external" href="https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode" title="(in Python v3.13)"><code class="xref py py-func docutils literal notranslate"><span class="pre">urllib.parse.urlencode()</span></code></a>).</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">hl</span></code> parameter: specifies the interface language of user interface.</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">lr</span></code> parameter: restricts search results to documents written in +a particular language.</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">cr</span></code> parameter: restricts search results to documents +originating in a particular country.</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">ie</span></code> parameter: sets the character encoding scheme that should +be used to interpret the query string (‘utf8’).</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">oe</span></code> parameter: sets the character encoding scheme that should +be used to decode the XML result (‘utf8’).</p></li> +</ul> +</dd> +<dt>headers:</dt><dd><p>Py-Dictionary with additional HTTP headers (can be passed to +request’s headers)</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">Accept:</span> <span class="pre">'*/*</span></code></p></li> +</ul> +</dd> +</dl> +</p> +</dd> +</dl> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.request" title="Link to this definition">¶</a></dt> +<dd><p>Google search request</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google.response" title="Link to this definition">¶</a></dt> +<dd><p>Get response from google’s search request</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.google.UI_ASYNC"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google.</span></span><span class="sig-name descname"><span class="pre">UI_ASYNC</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'use_ac:true,_fmt:prog'</span></em><a class="headerlink" href="#searx.engines.google.UI_ASYNC" title="Link to this definition">¶</a></dt> +<dd><p>Format of the response from UI’s async request.</p> +</dd></dl> + +</section> +<section id="google-autocomplete"> +<span id="id3"></span><h2><a class="toc-backref" href="#id6" role="doc-backlink">Google Autocomplete</a><a class="headerlink" href="#google-autocomplete" title="Link to this heading">¶</a></h2> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.autocomplete.google_complete"> +<span class="sig-prename descclassname"><span class="pre">searx.autocomplete.</span></span><span class="sig-name descname"><span class="pre">google_complete</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sxng_locale</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/autocomplete.html#google_complete"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.autocomplete.google_complete" title="Link to this definition">¶</a></dt> +<dd><p>Autocomplete from Google. Supports Google’s languages and subdomains +(<a class="reference internal" href="#searx.engines.google.get_google_info" title="searx.engines.google.get_google_info"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.engines.google.get_google_info</span></code></a>) by using the async REST +API:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://{subdomain}/complete/search?{args} +</pre></div> +</div> +</dd></dl> + +</section> +<section id="module-searx.engines.google_images"> +<span id="google-images"></span><span id="google-images-engine"></span><h2><a class="toc-backref" href="#id7" role="doc-backlink">Google Images</a><a class="headerlink" href="#module-searx.engines.google_images" title="Link to this heading">¶</a></h2> +<p>This is the implementation of the Google Images engine using the internal +Google API used by the Google Go Android app.</p> +<p>This internal API offer results in</p> +<ul class="simple"> +<li><p>JSON (<code class="docutils literal notranslate"><span class="pre">_fmt:json</span></code>)</p></li> +<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Protocol_Buffers">Protobuf</a> (<code class="docutils literal notranslate"><span class="pre">_fmt:pb</span></code>)</p></li> +<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Protocol_Buffers">Protobuf</a> compressed? (<code class="docutils literal notranslate"><span class="pre">_fmt:pc</span></code>)</p></li> +<li><p>HTML (<code class="docutils literal notranslate"><span class="pre">_fmt:html</span></code>)</p></li> +<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Protocol_Buffers">Protobuf</a> encoded in JSON (<code class="docutils literal notranslate"><span class="pre">_fmt:jspb</span></code>).</p></li> +</ul> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_images.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_images.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_images.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_images.request" title="Link to this definition">¶</a></dt> +<dd><p>Google-Image search request</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_images.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_images.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_images.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_images.response" title="Link to this definition">¶</a></dt> +<dd><p>Get response from google’s search request</p> +</dd></dl> + +</section> +<section id="module-searx.engines.google_videos"> +<span id="google-videos"></span><span id="google-videos-engine"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Google Videos</a><a class="headerlink" href="#module-searx.engines.google_videos" title="Link to this heading">¶</a></h2> +<p>This is the implementation of the Google Videos engine.</p> +<div class="admonition-content-security-policy-csp admonition"> +<p class="admonition-title">Content-Security-Policy (CSP)</p> +<p>This engine needs to allow images from the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs">data URLs</a> (prefixed with the +<code class="docutils literal notranslate"><span class="pre">data:</span></code> scheme):</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Header</span> <span class="nb">set</span> <span class="n">Content</span><span class="o">-</span><span class="n">Security</span><span class="o">-</span><span class="n">Policy</span> <span class="s2">"img-src 'self' data: ;"</span> +</pre></div> +</div> +</div> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_videos.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_videos.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_videos.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_videos.request" title="Link to this definition">¶</a></dt> +<dd><p>Google-Video search request</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_videos.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_videos.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_videos.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_videos.response" title="Link to this definition">¶</a></dt> +<dd><p>Get response from google’s search request</p> +</dd></dl> + +</section> +<section id="module-searx.engines.google_news"> +<span id="google-news"></span><span id="google-news-engine"></span><h2><a class="toc-backref" href="#id9" role="doc-backlink">Google News</a><a class="headerlink" href="#module-searx.engines.google_news" title="Link to this heading">¶</a></h2> +<p>This is the implementation of the Google News engine.</p> +<p>Google News has a different region handling compared to Google WEB.</p> +<ul class="simple"> +<li><p>the <code class="docutils literal notranslate"><span class="pre">ceid</span></code> argument has to be set (<a class="reference internal" href="#searx.engines.google_news.ceid_list" title="searx.engines.google_news.ceid_list"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ceid_list</span></code></a>)</p></li> +<li><p>the <a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#hlsp">hl</a> argument has to be set correctly (and different to Google WEB)</p></li> +<li><p>the <a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#glsp">gl</a> argument is mandatory</p></li> +</ul> +<p>If one of this argument is not set correctly, the request is redirected to +CONSENT dialog:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://consent.google.com/m?continue= +</pre></div> +</div> +<p>The google news API ignores some parameters from the common <a class="reference internal" href="#google-api"><span class="std std-ref">Google API</span></a>:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#numsp">num</a> : the number of search results is ignored / there is no paging all +results for a query term are in the first response.</p></li> +<li><p><a class="reference external" href="https://developers.google.com/custom-search/docs/xml_results#safesp">save</a> : is ignored / Google-News results are always <em>SafeSearch</em></p></li> +</ul> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_news.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_news.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_news.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_news.request" title="Link to this definition">¶</a></dt> +<dd><p>Google-News search request</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_news.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_news.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_news.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_news.response" title="Link to this definition">¶</a></dt> +<dd><p>Get response from google’s search request</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.google_news.ceid_list"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_news.</span></span><span class="sig-name descname"><span class="pre">ceid_list</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['AE:ar',</span> <span class="pre">'AR:es-419',</span> <span class="pre">'AT:de',</span> <span class="pre">'AU:en',</span> <span class="pre">'BD:bn',</span> <span class="pre">'BE:fr',</span> <span class="pre">'BE:nl',</span> <span class="pre">'BG:bg',</span> <span class="pre">'BR:pt-419',</span> <span class="pre">'BW:en',</span> <span class="pre">'CA:en',</span> <span class="pre">'CA:fr',</span> <span class="pre">'CH:de',</span> <span class="pre">'CH:fr',</span> <span class="pre">'CL:es-419',</span> <span class="pre">'CN:zh-Hans',</span> <span class="pre">'CO:es-419',</span> <span class="pre">'CU:es-419',</span> <span class="pre">'CZ:cs',</span> <span class="pre">'DE:de',</span> <span class="pre">'EG:ar',</span> <span class="pre">'ES:es',</span> <span class="pre">'ET:en',</span> <span class="pre">'FR:fr',</span> <span class="pre">'GB:en',</span> <span class="pre">'GH:en',</span> <span class="pre">'GR:el',</span> <span class="pre">'HK:zh-Hant',</span> <span class="pre">'HU:hu',</span> <span class="pre">'ID:en',</span> <span class="pre">'ID:id',</span> <span class="pre">'IE:en',</span> <span class="pre">'IL:en',</span> <span class="pre">'IL:he',</span> <span class="pre">'IN:bn',</span> <span class="pre">'IN:en',</span> <span class="pre">'IN:hi',</span> <span class="pre">'IN:ml',</span> <span class="pre">'IN:mr',</span> <span class="pre">'IN:ta',</span> <span class="pre">'IN:te',</span> <span class="pre">'IT:it',</span> <span class="pre">'JP:ja',</span> <span class="pre">'KE:en',</span> <span class="pre">'KR:ko',</span> <span class="pre">'LB:ar',</span> <span class="pre">'LT:lt',</span> <span class="pre">'LV:en',</span> <span class="pre">'LV:lv',</span> <span class="pre">'MA:fr',</span> <span class="pre">'MX:es-419',</span> <span class="pre">'MY:en',</span> <span class="pre">'NA:en',</span> <span class="pre">'NG:en',</span> <span class="pre">'NL:nl',</span> <span class="pre">'NO:no',</span> <span class="pre">'NZ:en',</span> <span class="pre">'PE:es-419',</span> <span class="pre">'PH:en',</span> <span class="pre">'PK:en',</span> <span class="pre">'PL:pl',</span> <span class="pre">'PT:pt-150',</span> <span class="pre">'RO:ro',</span> <span class="pre">'RS:sr',</span> <span class="pre">'RU:ru',</span> <span class="pre">'SA:ar',</span> <span class="pre">'SE:sv',</span> <span class="pre">'SG:en',</span> <span class="pre">'SI:sl',</span> <span class="pre">'SK:sk',</span> <span class="pre">'SN:fr',</span> <span class="pre">'TH:th',</span> <span class="pre">'TR:tr',</span> <span class="pre">'TW:zh-Hant',</span> <span class="pre">'TZ:en',</span> <span class="pre">'UA:ru',</span> <span class="pre">'UA:uk',</span> <span class="pre">'UG:en',</span> <span class="pre">'US:en',</span> <span class="pre">'US:es-419',</span> <span class="pre">'VE:es-419',</span> <span class="pre">'VN:vi',</span> <span class="pre">'ZA:en',</span> <span class="pre">'ZW:en']</span></em><a class="headerlink" href="#searx.engines.google_news.ceid_list" title="Link to this definition">¶</a></dt> +<dd><p>List of region/language combinations supported by Google News. Values of the +<code class="docutils literal notranslate"><span class="pre">ceid</span></code> argument of the Google News REST API.</p> +</dd></dl> + +</section> +<section id="module-searx.engines.google_scholar"> +<span id="google-scholar"></span><span id="google-scholar-engine"></span><h2><a class="toc-backref" href="#id10" role="doc-backlink">Google Scholar</a><a class="headerlink" href="#module-searx.engines.google_scholar" title="Link to this heading">¶</a></h2> +<p>This is the implementation of the Google Scholar engine.</p> +<p>Compared to other Google services the Scholar engine has a simple GET REST-API +and there does not exists <cite>async</cite> API. Even though the API slightly vintage we +can make use of the <a class="reference internal" href="#google-api"><span class="std std-ref">Google API</span></a> to assemble the arguments of the GET +request.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_scholar.detect_google_captcha"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">detect_google_captcha</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dom</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#detect_google_captcha"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.detect_google_captcha" title="Link to this definition">¶</a></dt> +<dd><p>In case of CAPTCHA Google Scholar open its own <em>not a Robot</em> dialog and is +not redirected to <code class="docutils literal notranslate"><span class="pre">sorry.google.com</span></code>.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_scholar.parse_gs_a"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">parse_gs_a</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">text</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#parse_gs_a"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.parse_gs_a" title="Link to this definition">¶</a></dt> +<dd><p>Parse the text written in green.</p> +<p>Possible formats: +* “{authors} - {journal}, {year} - {publisher}” +* “{authors} - {year} - {publisher}” +* “{authors} - {publisher}”</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_scholar.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.request" title="Link to this definition">¶</a></dt> +<dd><p>Google-Scholar search request</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_scholar.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.response" title="Link to this definition">¶</a></dt> +<dd><p>Parse response from Google Scholar</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.google_scholar.time_range_args"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.google_scholar.</span></span><span class="sig-name descname"><span class="pre">time_range_args</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/google_scholar.html#time_range_args"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.google_scholar.time_range_args" title="Link to this definition">¶</a></dt> +<dd><p>Returns a dictionary with a time range arguments based on +<code class="docutils literal notranslate"><span class="pre">params['time_range']</span></code>.</p> +<p>Google Scholar supports a detailed search by year. Searching by <em>last +month</em> or <em>last week</em> (as offered by SearXNG) is uncommon for scientific +publications and is not supported by Google Scholar.</p> +<p>To limit the result list when the users selects a range, all the SearXNG +ranges (<em>day</em>, <em>week</em>, <em>month</em>, <em>year</em>) are mapped to <em>year</em>. If no range +is set an empty dictionary of arguments is returned. Example; when +user selects a time range (current year minus one in 2022):</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="s1">'as_ylo'</span> <span class="p">:</span> <span class="mi">2021</span> <span class="p">}</span> +</pre></div> +</div> +</dd></dl> + +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="gitlab.html" title="previous chapter">GitLab</a> + <li>Next: <a href="lemmy.html" title="next chapter">Lemmy</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/google.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/lemmy.html b/dev/engines/online/lemmy.html new file mode 100644 index 000000000..27e7d1f8b --- /dev/null +++ b/dev/engines/online/lemmy.html @@ -0,0 +1,245 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Lemmy — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Library of Congress" href="loc.html" /> + <link rel="prev" title="Google Engines" href="google.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="loc.html" title="Library of Congress" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="google.html" title="Google Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Lemmy</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="lemmy"> +<span id="lemmy-engine"></span><h1>Lemmy<a class="headerlink" href="#lemmy" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id2">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.lemmy">This engine uses the Lemmy API (<a class="reference external" href="https://lemmy.ml/api/v3/search">https://lemmy.ml/api/v3/search</a>), which is +documented at <a class="reference external" href="https://join-lemmy.org/api/modules.html">lemmy-js-client</a> / <a class="reference external" href="https://join-lemmy.org/api/interfaces/Search.html">Interface Search</a>. Since Lemmy is +federated, results are from many different, independent lemmy instances, and not +only the official one.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following additional settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.lemmy.base_url" title="searx.engines.lemmy.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.lemmy.lemmy_type" title="searx.engines.lemmy.lemmy_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lemmy_type</span></code></a></p></li> +</ul> +<p>This implementation is used by different lemmy engines in the <a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings.yml</span></a>:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy communities</span> +<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Communities</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy users</span> +<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Users</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy posts</span> +<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Posts</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">lemmy comments</span> +<span class="w"> </span><span class="nt">lemmy_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Comments</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.lemmy.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.lemmy.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://lemmy.ml/'</span></em><a class="headerlink" href="#searx.engines.lemmy.base_url" title="Link to this definition">¶</a></dt> +<dd><p>By default, <a class="reference external" href="https://lemmy.ml">https://lemmy.ml</a> is used for providing the results. If you want +to use a different lemmy instance, you can specify <code class="docutils literal notranslate"><span class="pre">base_url</span></code>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.lemmy.lemmy_type"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.lemmy.</span></span><span class="sig-name descname"><span class="pre">lemmy_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Communities'</span></em><a class="headerlink" href="#searx.engines.lemmy.lemmy_type" title="Link to this definition">¶</a></dt> +<dd><p>Any of <code class="docutils literal notranslate"><span class="pre">Communities</span></code>, <code class="docutils literal notranslate"><span class="pre">Users</span></code>, <code class="docutils literal notranslate"><span class="pre">Posts</span></code>, <code class="docutils literal notranslate"><span class="pre">Comments</span></code></p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="google.html" title="previous chapter">Google Engines</a> + <li>Next: <a href="loc.html" title="next chapter">Library of Congress</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/lemmy.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/loc.html b/dev/engines/online/loc.html new file mode 100644 index 000000000..de661f591 --- /dev/null +++ b/dev/engines/online/loc.html @@ -0,0 +1,202 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Library of Congress — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Mastodon" href="mastodon.html" /> + <link rel="prev" title="Lemmy" href="lemmy.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="mastodon.html" title="Mastodon" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="lemmy.html" title="Lemmy" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Library of Congress</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="library-of-congress"> +<span id="loc-engine"></span><h1>Library of Congress<a class="headerlink" href="#library-of-congress" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.loc">Library of Congress: query Photo, Print and Drawing from API <a class="reference external" href="https://www.loc.gov/apis/json-and-yaml/requests/endpoints/">endpoint</a> +<code class="docutils literal notranslate"><span class="pre">photos</span></code>.</p> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>Beside the <code class="docutils literal notranslate"><span class="pre">photos</span></code> <a class="reference external" href="https://www.loc.gov/apis/json-and-yaml/requests/endpoints/">endpoint</a> there are more endpoints available / we are +looking forward for contributions implementing more endpoints.</p> +</div> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="lemmy.html" title="previous chapter">Lemmy</a> + <li>Next: <a href="mastodon.html" title="next chapter">Mastodon</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/loc.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/mastodon.html b/dev/engines/online/mastodon.html new file mode 100644 index 000000000..471009c36 --- /dev/null +++ b/dev/engines/online/mastodon.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Mastodon — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Moviepilot" href="moviepilot.html" /> + <link rel="prev" title="Library of Congress" href="loc.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="moviepilot.html" title="Moviepilot" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="loc.html" title="Library of Congress" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Mastodon</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="mastodon"> +<span id="mastodon-engine"></span><h1>Mastodon<a class="headerlink" href="#mastodon" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.mastodon"><a class="reference external" href="https://mastodon.social">Mastodon</a> is an open source alternative to large social media platforms like +Twitter/X, Facebook, …</p> +<p>Since it’s federated and self-hostable, there’s a large amount of available +instances, which can be chosen instead by modifying <code class="docutils literal notranslate"><span class="pre">base_url</span></code>.</p> +<p>We use their official <a class="reference external" href="https://docs.joinmastodon.org/api/">API</a> for searching, but unfortunately, their Search <a class="reference external" href="https://docs.joinmastodon.org/api/">API</a> +forbids pagination without OAuth.</p> +<p>That’s why we use tootfinder.ch for finding posts, which doesn’t support searching +for users, accounts or other types of content on Mastodon however.</p> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="loc.html" title="previous chapter">Library of Congress</a> + <li>Next: <a href="moviepilot.html" title="next chapter">Moviepilot</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/mastodon.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/moviepilot.html b/dev/engines/online/moviepilot.html new file mode 100644 index 000000000..948a28689 --- /dev/null +++ b/dev/engines/online/moviepilot.html @@ -0,0 +1,218 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Moviepilot — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Matrix Rooms Search (MRS)" href="mrs.html" /> + <link rel="prev" title="Mastodon" href="mastodon.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="mrs.html" title="Matrix Rooms Search (MRS)" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="mastodon.html" title="Mastodon" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Moviepilot</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="moviepilot"> +<span id="moviepilot-engine"></span><h1>Moviepilot<a class="headerlink" href="#moviepilot" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.moviepilot">Moviepilot is a German movie database, similar to IMDB or TMDB. It doesn’t +have any official API, but it uses JSON requests internally to fetch search +results and suggestions, that’s being used in this implementation.</p> +<p>Moviepilot additionally allows to discover movies by certain categories +or filters, hence we provide the following syntax:</p> +<ul class="simple"> +<li><p>Any normal search query -> Fetch search results by the query</p></li> +<li><p>A query containing one of the category identifiers <code class="docutils literal notranslate"><span class="pre">fsk</span></code>, <code class="docutils literal notranslate"><span class="pre">genre</span></code>, +<code class="docutils literal notranslate"><span class="pre">jahr</span></code>, <code class="docutils literal notranslate"><span class="pre">jahrzent</span></code>, <code class="docutils literal notranslate"><span class="pre">land</span></code>, <code class="docutils literal notranslate"><span class="pre">online</span></code>, <code class="docutils literal notranslate"><span class="pre">stimmung</span></code> will be used to +search trending items by the provided filters, which are appended to the +filter category after a <code class="docutils literal notranslate"><span class="pre">-</span></code>.</p></li> +</ul> +<p>Search examples:</p> +<ul class="simple"> +<li><p>Normal: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">Tom</span> <span class="pre">Cruise</span></code></p></li> +<li><p>By filter: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">person-Ryan-Gosling</span></code></p></li> +<li><p>By filter: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">fsk-0</span> <span class="pre">land-deutschland</span> <span class="pre">genre-actionfilm</span></code></p></li> +<li><p>By filter: <code class="docutils literal notranslate"><span class="pre">!mp</span> <span class="pre">jahrzehnt-2020er</span> <span class="pre">online-netflix</span></code></p></li> +</ul> +<p>For a list of all public filters, observe the url path when browsing</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.moviepilot.de/filme/beste">https://www.moviepilot.de/filme/beste</a>.</p></li> +</ul> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="mastodon.html" title="previous chapter">Mastodon</a> + <li>Next: <a href="mrs.html" title="next chapter">Matrix Rooms Search (MRS)</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/moviepilot.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/mrs.html b/dev/engines/online/mrs.html new file mode 100644 index 000000000..5a362fe7a --- /dev/null +++ b/dev/engines/online/mrs.html @@ -0,0 +1,226 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Matrix Rooms Search (MRS) — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Mullvad-Leta" href="mullvad_leta.html" /> + <link rel="prev" title="Moviepilot" href="moviepilot.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="mullvad_leta.html" title="Mullvad-Leta" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="moviepilot.html" title="Moviepilot" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Matrix Rooms Search (MRS)</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="matrix-rooms-search-mrs"> +<span id="mrs-engine"></span><h1>Matrix Rooms Search (MRS)<a class="headerlink" href="#matrix-rooms-search-mrs" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementation" id="id2">Implementation</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.mrs">Matrix Rooms Search - a fully-featured, standalone, matrix rooms search service.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following mandatory settings:</p> +<ul class="simple"> +<li><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></p></li> +</ul> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">MRS</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">mrs</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://mrs-host</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +</pre></div> +</div> +</section> +<section id="implementation"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementation</a><a class="headerlink" href="#implementation" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.mrs.init"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mrs.</span></span><span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/mrs.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.mrs.init" title="Link to this definition">¶</a></dt> +<dd><p>The <code class="docutils literal notranslate"><span class="pre">base_url</span></code> must be set in the configuration, if <code class="docutils literal notranslate"><span class="pre">base_url</span></code> is not +set, a <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ValueError</span></code></a> is raised during initialization.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="moviepilot.html" title="previous chapter">Moviepilot</a> + <li>Next: <a href="mullvad_leta.html" title="next chapter">Mullvad-Leta</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/mrs.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/mullvad_leta.html b/dev/engines/online/mullvad_leta.html new file mode 100644 index 000000000..2077bc519 --- /dev/null +++ b/dev/engines/online/mullvad_leta.html @@ -0,0 +1,243 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Mullvad-Leta — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Mwmbl Engine" href="mwmbl.html" /> + <link rel="prev" title="Matrix Rooms Search (MRS)" href="mrs.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="mwmbl.html" title="Mwmbl Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="mrs.html" title="Matrix Rooms Search (MRS)" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Mullvad-Leta</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="mullvad-leta"> +<span id="voidlinux-mullvad-leta"></span><h1>Mullvad-Leta<a class="headerlink" href="#mullvad-leta" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.mullvad_leta">This is the implementation of the Mullvad-Leta meta-search engine.</p> +<p>This engine <strong>REQUIRES</strong> that searxng operate within a Mullvad VPN</p> +<p>If using docker, consider using gluetun for easily connecting to the Mullvad</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://github.com/qdm12/gluetun">https://github.com/qdm12/gluetun</a></p></li> +</ul> +<p>Otherwise, follow instructions provided by Mullvad for enabling the VPN on Linux</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://mullvad.net/en/help/install-mullvad-app-linux">https://mullvad.net/en/help/install-mullvad-app-linux</a></p></li> +</ul> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>The <code class="xref py py-obj docutils literal notranslate"><span class="pre">EngineTraits</span></code> is empty by default. Maintainers have to run +<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">data.traits</span></code> (in the Mullvad VPN / <a class="reference internal" href="#searx.engines.mullvad_leta.fetch_traits" title="searx.engines.mullvad_leta.fetch_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fetch_traits</span></code></a>) and rebase +the modified JSON file <code class="docutils literal notranslate"><span class="pre">searx/data/engine_traits.json</span></code> on every single +update of SearXNG!</p> +</div> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.mullvad_leta.assign_headers"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mullvad_leta.</span></span><span class="sig-name descname"><span class="pre">assign_headers</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">headers</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><span class="pre">dict</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/mullvad_leta.html#assign_headers"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.mullvad_leta.assign_headers" title="Link to this definition">¶</a></dt> +<dd><p>Assigns the headers to make a request to Mullvad Leta</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.mullvad_leta.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mullvad_leta.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/mullvad_leta.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.mullvad_leta.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages and regions from Mullvad-Leta</p> +<div class="admonition warning"> +<p class="admonition-title">Warning</p> +<p>Fetching the engine traits also requires a Mullvad VPN connection. If +not connected, then an error message will print and no traits will be +updated.</p> +</div> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.mullvad_leta.is_vpn_connected"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mullvad_leta.</span></span><span class="sig-name descname"><span class="pre">is_vpn_connected</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dom</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">HtmlElement</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/mullvad_leta.html#is_vpn_connected"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.mullvad_leta.is_vpn_connected" title="Link to this definition">¶</a></dt> +<dd><p>Returns true if the VPN is connected, False otherwise</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.mullvad_leta.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.mullvad_leta.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Response</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/mullvad_leta.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.mullvad_leta.response" title="Link to this definition">¶</a></dt> +<dd><p>Checks if connected to Mullvad VPN, then extracts the search results from +the DOM resp: requests response object</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="mrs.html" title="previous chapter">Matrix Rooms Search (MRS)</a> + <li>Next: <a href="mwmbl.html" title="next chapter">Mwmbl Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/mullvad_leta.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/mwmbl.html b/dev/engines/online/mwmbl.html new file mode 100644 index 000000000..5ad61e275 --- /dev/null +++ b/dev/engines/online/mwmbl.html @@ -0,0 +1,222 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Mwmbl Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Odysee" href="odysee.html" /> + <link rel="prev" title="Mullvad-Leta" href="mullvad_leta.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="odysee.html" title="Odysee" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="mullvad_leta.html" title="Mullvad-Leta" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Mwmbl Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="mwmbl-engine"> +<span id="id1"></span><h1>Mwmbl Engine<a class="headerlink" href="#mwmbl-engine" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#module-searx.engines.mwmbl" id="id3">Mwmbl WEB</a></p></li> +<li><p><a class="reference internal" href="#mwmbl-autocomplete" id="id4">Mwmbl Autocomplete</a></p></li> +</ul> +</nav> +<section id="module-searx.engines.mwmbl"> +<span id="mwmbl-web"></span><span id="mwmbl-web-engine"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">Mwmbl WEB</a><a class="headerlink" href="#module-searx.engines.mwmbl" title="Link to this heading">¶</a></h2> +<p><a class="reference external" href="https://github.com/mwmbl/mwmbl">Mwmbl</a> is a non-profit, ad-free, free-libre and free-lunch search engine with +a focus on useability and speed.</p> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>At the moment it is little more than an idea together with a proof of concept +implementation of the web front-end and search technology on a small index. +<a class="reference external" href="https://github.com/mwmbl/mwmbl">Mwmbl</a> does not support regions, languages, safe-search or time range. +search.</p> +</div> +</section> +<section id="mwmbl-autocomplete"> +<span id="id2"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Mwmbl Autocomplete</a><a class="headerlink" href="#mwmbl-autocomplete" title="Link to this heading">¶</a></h2> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.autocomplete.mwmbl"> +<span class="sig-prename descclassname"><span class="pre">searx.autocomplete.</span></span><span class="sig-name descname"><span class="pre">mwmbl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_lang</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/autocomplete.html#mwmbl"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.autocomplete.mwmbl" title="Link to this definition">¶</a></dt> +<dd><p>Autocomplete from <a class="reference external" href="https://github.com/mwmbl/mwmbl">Mwmbl</a>.</p> +</dd></dl> + +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="mullvad_leta.html" title="previous chapter">Mullvad-Leta</a> + <li>Next: <a href="odysee.html" title="next chapter">Odysee</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/mwmbl.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/odysee.html b/dev/engines/online/odysee.html new file mode 100644 index 000000000..5aaeee730 --- /dev/null +++ b/dev/engines/online/odysee.html @@ -0,0 +1,202 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Odysee — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Peertube Engines" href="peertube.html" /> + <link rel="prev" title="Mwmbl Engine" href="mwmbl.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="peertube.html" title="Peertube Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="mwmbl.html" title="Mwmbl Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Odysee</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="odysee"> +<span id="odysee-engine"></span><h1>Odysee<a class="headerlink" href="#odysee" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.odysee"><a class="reference external" href="https://github.com/OdyseeTeam/odysee-frontend">Odysee</a> is a decentralized video hosting platform.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.odysee.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.odysee.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/odysee.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.odysee.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages from Odysee’s source code.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="mwmbl.html" title="previous chapter">Mwmbl Engine</a> + <li>Next: <a href="peertube.html" title="next chapter">Peertube Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/odysee.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/peertube.html b/dev/engines/online/peertube.html new file mode 100644 index 000000000..dd1d5ccda --- /dev/null +++ b/dev/engines/online/peertube.html @@ -0,0 +1,245 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Peertube Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Piped" href="piped.html" /> + <link rel="prev" title="Odysee" href="odysee.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="piped.html" title="Piped" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="odysee.html" title="Odysee" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Peertube Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="peertube-engines"> +<span id="id1"></span><h1>Peertube Engines<a class="headerlink" href="#peertube-engines" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#module-searx.engines.peertube" id="id2">Peertube Video</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.sepiasearch" id="id3">SepiaSearch</a></p></li> +</ul> +</nav> +<section id="module-searx.engines.peertube"> +<span id="peertube-video"></span><span id="peertube-video-engine"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Peertube Video</a><a class="headerlink" href="#module-searx.engines.peertube" title="Link to this heading">¶</a></h2> +<p>Peertube and <a class="reference internal" href="#module-searx.engines.sepiasearch" title="searx.engines.sepiasearch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SepiaSearch</span></code></a> do share +(more or less) the same REST API and the schema of the JSON result is identical.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.peertube.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/peertube.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.peertube.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages from peertube’s search-index source code.</p> +<p>See <a class="reference external" href="https://framagit.org/framasoft/peertube/search-index/-/commit/8ed5c729#3d8747f9a60695c367c70bb64efba8f403721fad_0_291">videoLanguages</a> in commit <a class="reference external" href="https://framagit.org/framasoft/peertube/search-index/-/commit/8ed5c729">8ed5c729 - Refactor and redesign client</a></p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.peertube.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/peertube.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.peertube.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble request for the Peertube API</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.peertube.video_response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">video_response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/peertube.html#video_response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.peertube.video_response" title="Link to this definition">¶</a></dt> +<dd><p>Parse video response from SepiaSearch and Peertube instances.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.peertube.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.peertube.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://peer.tube'</span></em><a class="headerlink" href="#searx.engines.peertube.base_url" title="Link to this definition">¶</a></dt> +<dd><p>Base URL of the Peertube instance. A list of instances is available at:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://instances.joinpeertube.org/instances">https://instances.joinpeertube.org/instances</a></p></li> +</ul> +</dd></dl> + +</section> +<section id="module-searx.engines.sepiasearch"> +<span id="sepiasearch"></span><span id="sepiasearch-engine"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">SepiaSearch</a><a class="headerlink" href="#module-searx.engines.sepiasearch" title="Link to this heading">¶</a></h2> +<p>SepiaSearch uses the same languages as <a class="reference internal" href="#module-searx.engines.peertube" title="searx.engines.peertube"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Peertube</span></code></a> and the response is identical to the response from the +peertube engines.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.sepiasearch.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.sepiasearch.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/sepiasearch.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.sepiasearch.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble request for the SepiaSearch API</p> +</dd></dl> + +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="odysee.html" title="previous chapter">Odysee</a> + <li>Next: <a href="piped.html" title="next chapter">Piped</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/peertube.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/piped.html b/dev/engines/online/piped.html new file mode 100644 index 000000000..cf9749095 --- /dev/null +++ b/dev/engines/online/piped.html @@ -0,0 +1,263 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Piped — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Presearch Engine" href="presearch.html" /> + <link rel="prev" title="Peertube Engines" href="peertube.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="presearch.html" title="Presearch Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="peertube.html" title="Peertube Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Piped</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="piped"> +<span id="piped-engine"></span><h1>Piped<a class="headerlink" href="#piped" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#known-quirks" id="id2">Known Quirks</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.piped">An alternative privacy-friendly YouTube frontend which is efficient by +design. <a class="reference external" href="https://docs.piped.video/docs/architecture/">Piped’s architecture</a> consists of 3 components:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.piped.backend_url" title="searx.engines.piped.backend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">backend</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.piped.frontend_url" title="searx.engines.piped.frontend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">frontend</span></code></a></p></li> +<li><p>proxy</p></li> +</ul> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The <a class="reference internal" href="#searx.engines.piped.backend_url" title="searx.engines.piped.backend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">backend_url</span></code></a> and <a class="reference internal" href="#searx.engines.piped.frontend_url" title="searx.engines.piped.frontend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">frontend_url</span></code></a> has to be set in the engine +named <cite>piped</cite> and are used by all piped engines</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span> +<span class="w"> </span><span class="nt">piped_filter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">frontend_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://..</span> +<span class="w"> </span><span class="nt">backend_url</span><span class="p">:</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://..</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://..</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped.music</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span> +<span class="w"> </span><span class="nt">network</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">piped</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ppdm</span> +<span class="w"> </span><span class="nt">piped_filter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">music_songs</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +</pre></div> +</div> +</section> +<section id="known-quirks"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Known Quirks</a><a class="headerlink" href="#known-quirks" title="Link to this heading">¶</a></h2> +<p>The implementation to support <a class="reference internal" href="../enginelib.html#searx.enginelib.Engine.paging" title="searx.enginelib.Engine.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a> +is based on the <em>nextpage</em> method of Piped’s REST API / the <a class="reference internal" href="#searx.engines.piped.frontend_url" title="searx.engines.piped.frontend_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">frontend</span> +<span class="pre">API</span></code></a>. This feature is <em>next page driven</em> and plays well with the +<a class="reference internal" href="../../../admin/settings/settings_ui.html#settings-ui"><span class="std std-ref">infinite_scroll</span></a> setting in SearXNG but it does not really +fit into SearXNG’s UI to select a page by number.</p> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.piped.backend_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.piped.</span></span><span class="sig-name descname"><span class="pre">backend_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><span class="pre">list</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://pipedapi.kavin.rocks'</span></em><a class="headerlink" href="#searx.engines.piped.backend_url" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://github.com/TeamPiped/Piped-Backend">Piped-Backend</a>: The core component behind Piped. The value is an URL or a +list of URLs. In the latter case instance will be selected randomly. For a +complete list of official instances see Piped-Instances (<a class="reference external" href="https://piped-instances.kavin.rocks/">JSON</a>)</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.piped.frontend_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.piped.</span></span><span class="sig-name descname"><span class="pre">frontend_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://piped.video'</span></em><a class="headerlink" href="#searx.engines.piped.frontend_url" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://github.com/TeamPiped/Piped">Piped-Frontend</a>: URL to use as link and for embeds.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.piped.piped_filter"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.piped.</span></span><span class="sig-name descname"><span class="pre">piped_filter</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'all'</span></em><a class="headerlink" href="#searx.engines.piped.piped_filter" title="Link to this definition">¶</a></dt> +<dd><p>Content filter <code class="docutils literal notranslate"><span class="pre">music_songs</span></code> or <code class="docutils literal notranslate"><span class="pre">videos</span></code></p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="peertube.html" title="previous chapter">Peertube Engines</a> + <li>Next: <a href="presearch.html" title="next chapter">Presearch Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/piped.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/presearch.html b/dev/engines/online/presearch.html new file mode 100644 index 000000000..e5f64a08e --- /dev/null +++ b/dev/engines/online/presearch.html @@ -0,0 +1,263 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Presearch Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Qwant" href="qwant.html" /> + <link rel="prev" title="Piped" href="piped.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="qwant.html" title="Qwant" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="piped.html" title="Piped" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Presearch Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="presearch-engine"> +<span id="engine-presearch"></span><h1>Presearch Engine<a class="headerlink" href="#presearch-engine" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#search-type-video" id="id1">Search type <code class="docutils literal notranslate"><span class="pre">video</span></code></a></p></li> +<li><p><a class="reference internal" href="#languages-regions" id="id2">Languages & Regions</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.presearch">Presearch supports the search types listed in <a class="reference internal" href="#searx.engines.presearch.search_type" title="searx.engines.presearch.search_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_type</span></code></a> (general, +images, videos, news).</p> +<p>Configured <code class="docutils literal notranslate"><span class="pre">presarch</span></code> engines:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">presearch</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">presearch</span> +<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">search</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">general</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">web</span><span class="p p-Indicator">]</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">presearch images</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">images</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">web</span><span class="p p-Indicator">]</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">presearch videos</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">general</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">web</span><span class="p p-Indicator">]</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">presearch news</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">news</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="nv">web</span><span class="p p-Indicator">]</span> +</pre></div> +</div> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>By default Presearch’s video category is intentionally placed into:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">categories</span><span class="p">:</span> <span class="p">[</span><span class="n">general</span><span class="p">,</span> <span class="n">web</span><span class="p">]</span> +</pre></div> +</div> +</div> +<section id="search-type-video"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Search type <code class="docutils literal notranslate"><span class="pre">video</span></code></a><a class="headerlink" href="#search-type-video" title="Link to this heading">¶</a></h2> +<p>The results in the video category are most often links to pages that contain a +video, for instance many links from Preasearch’s video category link content +from facebook (aka Meta) or Twitter (aka X). Since these are not real links to +video streams SearXNG can’t use the video template for this and if SearXNG can’t +use this template, then the user doesn’t want to see these hits in the videos +category.</p> +</section> +<section id="languages-regions"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Languages & Regions</a><a class="headerlink" href="#languages-regions" title="Link to this heading">¶</a></h2> +<p>In Presearch there are languages for the UI and regions for narrowing down the +search. If we set “auto” for the region in the WEB-UI of Presearch and cookie +<code class="docutils literal notranslate"><span class="pre">use_local_search_results=false</span></code>, then the defaults are set for both (the +language and the region) from the <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header.</p> +<p>Since the region is already “auto” by default, we only need to set the +<code class="docutils literal notranslate"><span class="pre">use_local_search_results</span></code> cookie and send the <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header. We +have to set these values in both requests we send to Presearch; in the first +request to get the request-ID from Presearch and in the final request to get the +result list (see <code class="docutils literal notranslate"><span class="pre">send_accept_language_header</span></code>).</p> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.presearch.search_type"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.presearch.</span></span><span class="sig-name descname"><span class="pre">search_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'search'</span></em><a class="headerlink" href="#searx.engines.presearch.search_type" title="Link to this definition">¶</a></dt> +<dd><p>must be any of <code class="docutils literal notranslate"><span class="pre">search</span></code>, <code class="docutils literal notranslate"><span class="pre">images</span></code>, <code class="docutils literal notranslate"><span class="pre">videos</span></code>, <code class="docutils literal notranslate"><span class="pre">news</span></code></p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="piped.html" title="previous chapter">Piped</a> + <li>Next: <a href="qwant.html" title="next chapter">Qwant</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/presearch.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/qwant.html b/dev/engines/online/qwant.html new file mode 100644 index 000000000..f4e44f453 --- /dev/null +++ b/dev/engines/online/qwant.html @@ -0,0 +1,278 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Qwant — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="RadioBrowser" href="radio_browser.html" /> + <link rel="prev" title="Presearch Engine" href="presearch.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="radio_browser.html" title="RadioBrowser" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="presearch.html" title="Presearch Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Qwant</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="qwant"> +<span id="qwant-engine"></span><h1>Qwant<a class="headerlink" href="#qwant" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id2">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.qwant">This engine uses the Qwant API (<a class="reference external" href="https://api.qwant.com/v3">https://api.qwant.com/v3</a>) to implement Qwant +-Web, -News, -Images and -Videos. The API is undocumented but can be reverse +engineered by reading the network log of <a class="reference external" href="https://www.qwant.com/">https://www.qwant.com/</a> queries.</p> +<p>For Qwant’s <em>web-search</em> two alternatives are implemented:</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">web</span></code>: uses the <a class="reference internal" href="#searx.engines.qwant.api_url" title="searx.engines.qwant.api_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_url</span></code></a> which returns a JSON structure</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">web-lite</span></code>: uses the <a class="reference internal" href="#searx.engines.qwant.web_lite_url" title="searx.engines.qwant.web_lite_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">web_lite_url</span></code></a> which returns a HTML page</p></li> +</ul> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following additional settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.qwant.qwant_categ" title="searx.engines.qwant.qwant_categ"><code class="xref py py-obj docutils literal notranslate"><span class="pre">qwant_categ</span></code></a></p></li> +</ul> +<p>This implementation is used by different qwant engines in the <a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings.yml</span></a>:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant</span> +<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">web-lite</span><span class="w"> </span><span class="c1"># alternatively use 'web'</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant news</span> +<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant images</span> +<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">qwant videos</span> +<span class="w"> </span><span class="nt">qwant_categ</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.qwant.parse_web_api"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">parse_web_api</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#parse_web_api"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.parse_web_api" title="Link to this definition">¶</a></dt> +<dd><p>Parse results from Qwant’s API</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.qwant.parse_web_lite"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">parse_web_lite</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#parse_web_lite"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.parse_web_lite" title="Link to this definition">¶</a></dt> +<dd><p>Parse results from Qwant-Lite</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.qwant.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/qwant.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.qwant.request" title="Link to this definition">¶</a></dt> +<dd><p>Qwant search request</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.qwant.api_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">api_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://api.qwant.com/v3/search/'</span></em><a class="headerlink" href="#searx.engines.qwant.api_url" title="Link to this definition">¶</a></dt> +<dd><p>URL of Qwant’s API (JSON)</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.qwant.max_page"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">5</span></em><a class="headerlink" href="#searx.engines.qwant.max_page" title="Link to this definition">¶</a></dt> +<dd><p>5 pages maximum (<code class="docutils literal notranslate"><span class="pre">&p=5</span></code>): Trying to do more just results in an improper +redirect</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.qwant.qwant_categ"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">qwant_categ</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.qwant.qwant_categ" title="Link to this definition">¶</a></dt> +<dd><p>One of <code class="docutils literal notranslate"><span class="pre">web-lite</span></code> (or <code class="docutils literal notranslate"><span class="pre">web</span></code>), <code class="docutils literal notranslate"><span class="pre">news</span></code>, <code class="docutils literal notranslate"><span class="pre">images</span></code> or <code class="docutils literal notranslate"><span class="pre">videos</span></code></p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.qwant.web_lite_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.qwant.</span></span><span class="sig-name descname"><span class="pre">web_lite_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://lite.qwant.com/'</span></em><a class="headerlink" href="#searx.engines.qwant.web_lite_url" title="Link to this definition">¶</a></dt> +<dd><p>URL of Qwant-Lite (HTML)</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="presearch.html" title="previous chapter">Presearch Engine</a> + <li>Next: <a href="radio_browser.html" title="next chapter">RadioBrowser</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/qwant.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/radio_browser.html b/dev/engines/online/radio_browser.html new file mode 100644 index 000000000..8b003c0c6 --- /dev/null +++ b/dev/engines/online/radio_browser.html @@ -0,0 +1,228 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>RadioBrowser — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Recoll Engine" href="recoll.html" /> + <link rel="prev" title="Qwant" href="qwant.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="recoll.html" title="Recoll Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="qwant.html" title="Qwant" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">RadioBrowser</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="radiobrowser"> +<span id="radiobrowser-engine"></span><h1>RadioBrowser<a class="headerlink" href="#radiobrowser" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.radio_browser">Search radio stations from RadioBrowser by <a class="reference external" href="https://de1.api.radio-browser.info/#Advanced_station_search">Advanced station search API</a>.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.radio_browser.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.radio_browser.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/radio_browser.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.radio_browser.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages and countrycodes from RadioBrowser</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">traits.languages</span></code>: <a class="reference external" href="https://de1.api.radio-browser.info/#List_of_languages">list of languages API</a></p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">traits.custom['countrycodes']</span></code>: <a class="reference external" href="https://de1.api.radio-browser.info/#List_of_countries">list of countries API</a></p></li> +</ul> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.radio_browser.station_filters"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.radio_browser.</span></span><span class="sig-name descname"><span class="pre">station_filters</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">[]</span></em><a class="headerlink" href="#searx.engines.radio_browser.station_filters" title="Link to this definition">¶</a></dt> +<dd><p>A list of filters to be applied to the search of radio stations. By default +none filters are applied. Valid filters are:</p> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">language</span></code></dt><dd><p>Filter stations by selected language. For instance the <code class="docutils literal notranslate"><span class="pre">de</span></code> from <code class="docutils literal notranslate"><span class="pre">:de-AU</span></code> +will be translated to <cite>german</cite> and used in the argument <code class="docutils literal notranslate"><span class="pre">language=</span></code>.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">countrycode</span></code></dt><dd><p>Filter stations by selected country. The 2-digit countrycode of the station +comes from the region the user selected. For instance <code class="docutils literal notranslate"><span class="pre">:de-AU</span></code> will filter +out all stations not in <code class="docutils literal notranslate"><span class="pre">AU</span></code>.</p> +</dd> +</dl> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>RadioBrowser has registered a lot of languages and countrycodes unknown to +<code class="xref py py-obj docutils literal notranslate"><span class="pre">babel</span></code> and note that when searching for radio stations, users are +more likely to search by name than by region or language.</p> +</div> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="qwant.html" title="previous chapter">Qwant</a> + <li>Next: <a href="recoll.html" title="next chapter">Recoll Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/radio_browser.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/recoll.html b/dev/engines/online/recoll.html new file mode 100644 index 000000000..05bec4448 --- /dev/null +++ b/dev/engines/online/recoll.html @@ -0,0 +1,245 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Recoll Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Seekr Engines" href="seekr.html" /> + <link rel="prev" title="RadioBrowser" href="radio_browser.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="seekr.html" title="Seekr Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="radio_browser.html" title="RadioBrowser" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Recoll Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="recoll-engine"> +<span id="engine-recoll"></span><h1>Recoll Engine<a class="headerlink" href="#recoll-engine" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#example" id="id2">Example</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<aside class="sidebar" id="module-searx.engines.recoll"> +<p class="sidebar-title">info</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.lesbonscomptes.com/recoll/">Recoll</a></p></li> +<li><p><a class="reference external" href="https://framagit.org/medoc92/recollwebui.git">recoll-webui</a></p></li> +<li><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines/recoll.py">git://searx/engines/recoll.py</a></p></li> +</ul> +</aside> +<p><a class="reference external" href="https://www.lesbonscomptes.com/recoll/">Recoll</a> is a desktop full-text search tool based on Xapian. By itself <a class="reference external" href="https://www.lesbonscomptes.com/recoll/">Recoll</a> +does not offer WEB or API access, this can be achieved using <a class="reference external" href="https://framagit.org/medoc92/recollwebui.git">recoll-webui</a></p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>You must configure the following settings:</p> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code>:</dt><dd><p>Location where recoll-webui can be reached.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">mount_prefix</span></code>:</dt><dd><p>Location where the file hierarchy is mounted on your <em>local</em> filesystem.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">dl_prefix</span></code>:</dt><dd><p>Location where the file hierarchy as indexed by recoll can be reached.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">search_dir</span></code>:</dt><dd><p>Part of the indexed file hierarchy to be search, if empty the full domain is +searched.</p> +</dd> +</dl> +</section> +<section id="example"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Example</a><a class="headerlink" href="#example" title="Link to this heading">¶</a></h2> +<p>Scenario:</p> +<ol class="arabic simple"> +<li><p>Recoll indexes a local filesystem mounted in <code class="docutils literal notranslate"><span class="pre">/export/documents/reference</span></code>,</p></li> +<li><p>the Recoll search interface can be reached at <a class="reference external" href="https://recoll.example.org/">https://recoll.example.org/</a> and</p></li> +<li><p>the contents of this filesystem can be reached though <a class="reference external" href="https://download.example.org/reference">https://download.example.org/reference</a></p></li> +</ol> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">base_url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://recoll.example.org/</span> +<span class="nt">mount_prefix</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/export/documents</span> +<span class="nt">dl_prefix</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://download.example.org</span> +<span class="nt">search_dir</span><span class="p">:</span><span class="w"> </span><span class="s">''</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="radio_browser.html" title="previous chapter">RadioBrowser</a> + <li>Next: <a href="seekr.html" title="next chapter">Seekr Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/recoll.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/seekr.html b/dev/engines/online/seekr.html new file mode 100644 index 000000000..5f5637d23 --- /dev/null +++ b/dev/engines/online/seekr.html @@ -0,0 +1,249 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Seekr Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Startpage Engines" href="startpage.html" /> + <link rel="prev" title="Recoll Engine" href="recoll.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="startpage.html" title="Startpage Engines" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="recoll.html" title="Recoll Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Seekr Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="seekr-engines"> +<span id="seekr-engine"></span><h1>Seekr Engines<a class="headerlink" href="#seekr-engines" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#known-quirks" id="id2">Known Quirks</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.seekr">seekr.com Seeker Score</p> +<p>Seekr is a privately held search and content evaluation engine that prioritizes +credibility over popularity.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following additional settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.seekr.seekr_category" title="searx.engines.seekr.seekr_category"><code class="xref py py-obj docutils literal notranslate"><span class="pre">seekr_category</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.seekr.api_key" title="searx.engines.seekr.api_key"><code class="xref py py-obj docutils literal notranslate"><span class="pre">api_key</span></code></a></p></li> +</ul> +<p>This implementation is used by seekr engines in the <a class="reference internal" href="../../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">settings.yml</span></a>:</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seekr news</span> +<span class="w"> </span><span class="nt">seekr_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">news</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seekr images</span> +<span class="w"> </span><span class="nt">seekr_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">seekr videos</span> +<span class="w"> </span><span class="nt">seekr_category</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">videos</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +</pre></div> +</div> +</section> +<section id="known-quirks"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Known Quirks</a><a class="headerlink" href="#known-quirks" title="Link to this heading">¶</a></h2> +<p>The implementation to support <a class="reference internal" href="../enginelib.html#searx.enginelib.Engine.paging" title="searx.enginelib.Engine.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a> +is based on the <em>nextpage</em> method of Seekr’s REST API. This feature is <em>next +page driven</em> and plays well with the <a class="reference internal" href="../../../admin/settings/settings_ui.html#settings-ui"><span class="std std-ref">infinite_scroll</span></a> +setting in SearXNG but it does not really fit into SearXNG’s UI to select a page +by number.</p> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.seekr.api_key"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.seekr.</span></span><span class="sig-name descname"><span class="pre">api_key</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'srh1-22fb-sekr'</span></em><a class="headerlink" href="#searx.engines.seekr.api_key" title="Link to this definition">¶</a></dt> +<dd><p>API key / reversed engineered / is still the same one since 2022.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.seekr.seekr_category"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.seekr.</span></span><span class="sig-name descname"><span class="pre">seekr_category</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'unset'</span></em><a class="headerlink" href="#searx.engines.seekr.seekr_category" title="Link to this definition">¶</a></dt> +<dd><p>Search category, any of <code class="docutils literal notranslate"><span class="pre">news</span></code>, <code class="docutils literal notranslate"><span class="pre">videos</span></code> or <code class="docutils literal notranslate"><span class="pre">images</span></code>.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="recoll.html" title="previous chapter">Recoll Engine</a> + <li>Next: <a href="startpage.html" title="next chapter">Startpage Engines</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/seekr.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/startpage.html b/dev/engines/online/startpage.html new file mode 100644 index 000000000..b88fe1e5b --- /dev/null +++ b/dev/engines/online/startpage.html @@ -0,0 +1,342 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Startpage Engines — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Tagesschau API" href="tagesschau.html" /> + <link rel="prev" title="Seekr Engines" href="seekr.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="tagesschau.html" title="Tagesschau API" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="seekr.html" title="Seekr Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Startpage Engines</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="startpage-engines"> +<span id="id1"></span><h1>Startpage Engines<a class="headerlink" href="#startpage-engines" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#startpage-regions" id="id9">Startpage regions</a></p></li> +<li><p><a class="reference internal" href="#startpage-languages" id="id10">Startpage languages</a></p></li> +<li><p><a class="reference internal" href="#startpage-categories" id="id11">Startpage categories</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.startpage">Startpage’s language & region selectors are a mess ..</p> +<section id="startpage-regions"> +<span id="id2"></span><h2><a class="toc-backref" href="#id9" role="doc-backlink">Startpage regions</a><a class="headerlink" href="#startpage-regions" title="Link to this heading">¶</a></h2> +<p>In the list of regions there are tags we need to map to common region tags:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pt</span><span class="o">-</span><span class="n">BR_BR</span> <span class="o">--></span> <span class="n">pt_BR</span> +<span class="n">zh</span><span class="o">-</span><span class="n">CN_CN</span> <span class="o">--></span> <span class="n">zh_Hans_CN</span> +<span class="n">zh</span><span class="o">-</span><span class="n">TW_TW</span> <span class="o">--></span> <span class="n">zh_Hant_TW</span> +<span class="n">zh</span><span class="o">-</span><span class="n">TW_HK</span> <span class="o">--></span> <span class="n">zh_Hant_HK</span> +<span class="n">en</span><span class="o">-</span><span class="n">GB_GB</span> <span class="o">--></span> <span class="n">en_GB</span> +</pre></div> +</div> +<p>and there is at least one tag with a three letter language tag (ISO 639-2):</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">fil_PH</span> <span class="o">--></span> <span class="n">fil_PH</span> +</pre></div> +</div> +<p>The locale code <code class="docutils literal notranslate"><span class="pre">no_NO</span></code> from Startpage does not exists and is mapped to +<code class="docutils literal notranslate"><span class="pre">nb-NO</span></code>:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">babel</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">UnknownLocaleError</span><span class="p">:</span> <span class="n">unknown</span> <span class="n">locale</span> <span class="s1">'no_NO'</span> +</pre></div> +</div> +<p>For reference see languages-subtag at iana; <code class="docutils literal notranslate"><span class="pre">no</span></code> is the macrolanguage <a class="footnote-reference brackets" href="#id5" id="id3" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> and +W3C recommends subtag over macrolanguage <a class="footnote-reference brackets" href="#id6" id="id4" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a>.</p> +<aside class="footnote-list brackets"> +<aside class="footnote brackets" id="id5" role="doc-footnote"> +<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id3">1</a><span class="fn-bracket">]</span></span> +<p><a class="reference external" href="https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry">iana: language-subtag-registry</a></p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">type</span><span class="p">:</span> <span class="n">language</span> +<span class="n">Subtag</span><span class="p">:</span> <span class="n">nb</span> +<span class="n">Description</span><span class="p">:</span> <span class="n">Norwegian</span> <span class="n">Bokmål</span> +<span class="n">Added</span><span class="p">:</span> <span class="mi">2005</span><span class="o">-</span><span class="mi">10</span><span class="o">-</span><span class="mi">16</span> +<span class="n">Suppress</span><span class="o">-</span><span class="n">Script</span><span class="p">:</span> <span class="n">Latn</span> +<span class="n">Macrolanguage</span><span class="p">:</span> <span class="n">no</span> +</pre></div> +</div> +</aside> +<aside class="footnote brackets" id="id6" role="doc-footnote"> +<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id4">2</a><span class="fn-bracket">]</span></span> +<p>Use macrolanguages with care. Some language subtags have a Scope field set to +macrolanguage, i.e. this primary language subtag encompasses a number of more +specific primary language subtags in the registry. … As we recommended for +the collection subtags mentioned above, in most cases you should try to use +the more specific subtags … <a class="reference external" href="https://www.w3.org/International/questions/qa-choosing-language-tags#langsubtag">W3: The primary language subtag</a></p> +</aside> +</aside> +</section> +<section id="startpage-languages"> +<span id="id7"></span><h2><a class="toc-backref" href="#id10" role="doc-backlink">Startpage languages</a><a class="headerlink" href="#startpage-languages" title="Link to this heading">¶</a></h2> +<dl> +<dt><a class="reference internal" href="#searx.engines.startpage.send_accept_language_header" title="searx.engines.startpage.send_accept_language_header"><code class="xref py py-obj docutils literal notranslate"><span class="pre">send_accept_language_header</span></code></a>:</dt><dd><p>The displayed name in Startpage’s settings page depend on the location of the +IP when <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> HTTP header is unset. In <a class="reference internal" href="#searx.engines.startpage.fetch_traits" title="searx.engines.startpage.fetch_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fetch_traits</span></code></a> +we use:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s1">'Accept-Language'</span><span class="p">:</span> <span class="s2">"en-US,en;q=0.5"</span><span class="p">,</span> +<span class="o">..</span> +</pre></div> +</div> +<p>to get uniform names independent from the IP).</p> +</dd> +</dl> +</section> +<section id="startpage-categories"> +<span id="id8"></span><h2><a class="toc-backref" href="#id11" role="doc-backlink">Startpage categories</a><a class="headerlink" href="#startpage-categories" title="Link to this heading">¶</a></h2> +<p>Startpage’s category (for Web-search, News, Videos, ..) is set by +<a class="reference internal" href="#searx.engines.startpage.startpage_categ" title="searx.engines.startpage.startpage_categ"><code class="xref py py-obj docutils literal notranslate"><span class="pre">startpage_categ</span></code></a> in settings.yml:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">-</span> <span class="n">name</span><span class="p">:</span> <span class="n">startpage</span> + <span class="n">engine</span><span class="p">:</span> <span class="n">startpage</span> + <span class="n">startpage_categ</span><span class="p">:</span> <span class="n">web</span> + <span class="o">...</span> +</pre></div> +</div> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>The default category is <code class="docutils literal notranslate"><span class="pre">web</span></code> .. and other categories than <code class="docutils literal notranslate"><span class="pre">web</span></code> are not +yet implemented.</p> +</div> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.startpage.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/startpage.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.startpage.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch <a class="reference internal" href="#startpage-languages"><span class="std std-ref">languages</span></a> and <a class="reference internal" href="#startpage-regions"><span class="std std-ref">regions</span></a> from Startpage.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.startpage.get_sc_code"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">get_sc_code</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">searxng_locale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/startpage.html#get_sc_code"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.startpage.get_sc_code" title="Link to this definition">¶</a></dt> +<dd><p>Get an actual <code class="docutils literal notranslate"><span class="pre">sc</span></code> argument from Startpage’s search form (HTML page).</p> +<p>Startpage puts a <code class="docutils literal notranslate"><span class="pre">sc</span></code> argument on every HTML <a class="reference internal" href="#searx.engines.startpage.search_form_xpath" title="searx.engines.startpage.search_form_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search</span> <span class="pre">form</span></code></a>. Without this argument Startpage considers the request +is from a bot. We do not know what is encoded in the value of the <code class="docutils literal notranslate"><span class="pre">sc</span></code> +argument, but it seems to be a kind of a <em>time-stamp</em>.</p> +<p>Startpage’s search form generates a new sc-code on each request. This +function scrap a new sc-code from Startpage’s home page every +<a class="reference internal" href="#searx.engines.startpage.sc_code_cache_sec" title="searx.engines.startpage.sc_code_cache_sec"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sc_code_cache_sec</span></code></a> seconds.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.startpage.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/startpage.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.startpage.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble a Startpage request.</p> +<p>To avoid CAPTCHA we need to send a well formed HTTP POST request with a +cookie. We need to form a request that is identical to the request build by +Startpage’s search form:</p> +<ul class="simple"> +<li><p>in the cookie the <strong>region</strong> is selected</p></li> +<li><p>in the HTTP POST data the <strong>language</strong> is selected</p></li> +</ul> +<p>Additionally the arguments form Startpage’s search form needs to be set in +HTML POST data / compare <code class="docutils literal notranslate"><span class="pre"><input></span></code> elements: <a class="reference internal" href="#searx.engines.startpage.search_form_xpath" title="searx.engines.startpage.search_form_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_form_xpath</span></code></a>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.startpage.max_page"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">max_page</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">18</span></em><a class="headerlink" href="#searx.engines.startpage.max_page" title="Link to this definition">¶</a></dt> +<dd><p>Tested 18 pages maximum (argument <code class="docutils literal notranslate"><span class="pre">page</span></code>), to be save max is set to 20.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.startpage.sc_code_cache_sec"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">sc_code_cache_sec</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">30</span></em><a class="headerlink" href="#searx.engines.startpage.sc_code_cache_sec" title="Link to this definition">¶</a></dt> +<dd><p>Time in seconds the sc-code is cached in memory <a class="reference internal" href="#searx.engines.startpage.get_sc_code" title="searx.engines.startpage.get_sc_code"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_sc_code</span></code></a>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.startpage.search_form_xpath"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">search_form_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'//form[@id="search"]'</span></em><a class="headerlink" href="#searx.engines.startpage.search_form_xpath" title="Link to this definition">¶</a></dt> +<dd><p>XPath of Startpage’s origin search form</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.startpage.send_accept_language_header"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.startpage.send_accept_language_header" title="Link to this definition">¶</a></dt> +<dd><p>Startpage tries to guess user’s language and territory from the HTTP +<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code>. Optional the user can select a search-language (can be +different to the UI language) and a region filter.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.startpage.startpage_categ"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.startpage.</span></span><span class="sig-name descname"><span class="pre">startpage_categ</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'web'</span></em><a class="headerlink" href="#searx.engines.startpage.startpage_categ" title="Link to this definition">¶</a></dt> +<dd><p>Startpage’s category, visit <a class="reference internal" href="#startpage-categories"><span class="std std-ref">Startpage categories</span></a>.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="seekr.html" title="previous chapter">Seekr Engines</a> + <li>Next: <a href="tagesschau.html" title="next chapter">Tagesschau API</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/startpage.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/tagesschau.html b/dev/engines/online/tagesschau.html new file mode 100644 index 000000000..b50bf0882 --- /dev/null +++ b/dev/engines/online/tagesschau.html @@ -0,0 +1,213 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Tagesschau API — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Torznab WebAPI" href="torznab.html" /> + <link rel="prev" title="Startpage Engines" href="startpage.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="torznab.html" title="Torznab WebAPI" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="startpage.html" title="Startpage Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Tagesschau API</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="tagesschau-api"> +<span id="tagesschau-engine"></span><h1>Tagesschau API<a class="headerlink" href="#tagesschau-api" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.tagesschau">ARD: <a class="reference external" href="https://github.com/AndreasFischer1985/tagesschau-api/blob/main/README_en.md">Tagesschau API</a></p> +<p>The Tagesschau is a news program of the ARD. Via the <a class="reference external" href="https://github.com/AndreasFischer1985/tagesschau-api/blob/main/README_en.md">Tagesschau API</a>, current +news and media reports are available in JSON format. The <a class="reference external" href="https://github.com/bundesAPI">Bundesstelle für Open +Data</a> offers a <a class="reference external" href="https://swagger.io/specification/">OpenAPI</a> portal at <a class="reference external" href="https://bund.dev/apis">bundDEV</a> where APIs are documented an can +be tested.</p> +<p>This SearXNG engine uses the <a class="reference external" href="http://tagesschau.api.bund.dev/">/api2u/search</a> API.</p> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.tagesschau.use_source_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tagesschau.</span></span><span class="sig-name descname"><span class="pre">use_source_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.tagesschau.use_source_url" title="Link to this definition">¶</a></dt> +<dd><p>When set to false, display URLs from Tagesschau, and not the actual source +(e.g. NDR, WDR, SWR, HR, …)</p> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>The actual source may contain additional content, such as commentary, that is +not displayed in the Tagesschau.</p> +</div> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="startpage.html" title="previous chapter">Startpage Engines</a> + <li>Next: <a href="torznab.html" title="next chapter">Torznab WebAPI</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/tagesschau.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/torznab.html b/dev/engines/online/torznab.html new file mode 100644 index 000000000..8dc689d92 --- /dev/null +++ b/dev/engines/online/torznab.html @@ -0,0 +1,267 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Torznab WebAPI — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Void Linux binary packages" href="void.html" /> + <link rel="prev" title="Tagesschau API" href="tagesschau.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="void.html" title="Void Linux binary packages" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="tagesschau.html" title="Tagesschau API" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Torznab WebAPI</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="torznab-webapi"> +<span id="torznab-engine"></span><h1>Torznab WebAPI<a class="headerlink" href="#torznab-webapi" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id1">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id2">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.torznab"><a class="reference external" href="https://torznab.github.io/spec-1.3-draft/index.html">Torznab</a> is an API specification that provides a standardized way to query +torrent site for content. It is used by a number of torrent applications, +including <a class="reference external" href="https://github.com/Prowlarr/Prowlarr">Prowlarr</a> and <a class="reference external" href="https://github.com/Jackett/Jackett">Jackett</a>.</p> +<p>Using this engine together with <a class="reference external" href="https://github.com/Prowlarr/Prowlarr">Prowlarr</a> or <a class="reference external" href="https://github.com/Jackett/Jackett">Jackett</a> allows you to search +a huge number of torrent sites which are not directly supported.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following settings:</p> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">base_url</span></code>:</dt><dd><p>Torznab endpoint URL.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">api_key</span></code>:</dt><dd><p>The API key to use for authentication.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">torznab_categories</span></code>:</dt><dd><p>The categories to use for searching. This is a list of category IDs. See +<a class="reference external" href="https://wiki.servarr.com/en/prowlarr/cardigann-yml-definition#categories">Prowlarr-categories</a> or <a class="reference external" href="https://github.com/Jackett/Jackett/wiki/Jackett-Categories">Jackett-categories</a> for more information.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">show_torrent_files</span></code>:</dt><dd><p>Whether to show the torrent file in the search results. Be careful as using +this with <a class="reference external" href="https://github.com/Prowlarr/Prowlarr">Prowlarr</a> or <a class="reference external" href="https://github.com/Jackett/Jackett">Jackett</a> leaks the API key. This should be used only +if you are querying a Torznab endpoint without authentication or if the +instance is private. Be aware that private trackers may ban you if you share +the torrent file. Defaults to <code class="docutils literal notranslate"><span class="pre">false</span></code>.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">show_magnet_links</span></code>:</dt><dd><p>Whether to show the magnet link in the search results. Be aware that private +trackers may ban you if you share the magnet link. Defaults to <code class="docutils literal notranslate"><span class="pre">true</span></code>.</p> +</dd> +</dl> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.torznab.build_result"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">build_result</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Element</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#build_result"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.build_result" title="Link to this definition">¶</a></dt> +<dd><p>Build a result from a XML item.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.torznab.get_attribute"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">get_attribute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Element</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">property_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#get_attribute"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.get_attribute" title="Link to this definition">¶</a></dt> +<dd><p>Get attribute from item.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.torznab.get_torznab_attribute"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">get_torznab_attribute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Element</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attribute_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#get_torznab_attribute"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.get_torznab_attribute" title="Link to this definition">¶</a></dt> +<dd><p>Get torznab special attribute from item.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.torznab.init"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.init" title="Link to this definition">¶</a></dt> +<dd><p>Initialize the engine.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.torznab.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><span class="pre">Dict</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.request" title="Link to this definition">¶</a></dt> +<dd><p>Build the request params.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.torznab.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.torznab.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">httpx.Response</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../../../_modules/searx/engines/torznab.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.torznab.response" title="Link to this definition">¶</a></dt> +<dd><p>Parse the XML response and return a list of results.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="tagesschau.html" title="previous chapter">Tagesschau API</a> + <li>Next: <a href="void.html" title="next chapter">Void Linux binary packages</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/torznab.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/void.html b/dev/engines/online/void.html new file mode 100644 index 000000000..df62d91c8 --- /dev/null +++ b/dev/engines/online/void.html @@ -0,0 +1,220 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Void Linux binary packages — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Wallhaven" href="wallhaven.html" /> + <link rel="prev" title="Torznab WebAPI" href="torznab.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="wallhaven.html" title="Wallhaven" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="torznab.html" title="Torznab WebAPI" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Void Linux binary packages</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="void-linux-binary-packages"> +<span id="voidlinux-engine"></span><h1>Void Linux binary packages<a class="headerlink" href="#void-linux-binary-packages" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.voidlinux">SearXNG engine for <a class="reference external" href="https://voidlinux.org/packages/">Void Linux binary packages</a>. Void is a general purpose +operating system, based on the monolithic Linux kernel. Its package system +allows you to quickly install, update and remove software; software is provided +in binary packages or can be built directly from sources with the help of the +XBPS source packages collection.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.voidlinux.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.voidlinux.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/voidlinux.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.voidlinux.response" title="Link to this definition">¶</a></dt> +<dd><p>At Void Linux, several packages sometimes share the same source code +(template) and therefore also have the same URL. Results with identical +URLs are merged as one result for SearXNG.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.voidlinux.ARCH_RE"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.voidlinux.</span></span><span class="sig-name descname"><span class="pre">ARCH_RE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">re.compile('aarch64-musl|armv6l-musl|armv7l-musl|x86_64-musl|aarch64|armv6l|armv7l|i686|x86_64')</span></em><a class="headerlink" href="#searx.engines.voidlinux.ARCH_RE" title="Link to this definition">¶</a></dt> +<dd><p>Regular expression that match a architecture in the query string.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.voidlinux.void_arch"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.voidlinux.</span></span><span class="sig-name descname"><span class="pre">void_arch</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'x86_64'</span></em><a class="headerlink" href="#searx.engines.voidlinux.void_arch" title="Link to this definition">¶</a></dt> +<dd><p>Default architecture to search for. For valid values see <a class="reference internal" href="#searx.engines.voidlinux.ARCH_RE" title="searx.engines.voidlinux.ARCH_RE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ARCH_RE</span></code></a></p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="torznab.html" title="previous chapter">Torznab WebAPI</a> + <li>Next: <a href="wallhaven.html" title="next chapter">Wallhaven</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/void.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/wallhaven.html b/dev/engines/online/wallhaven.html new file mode 100644 index 000000000..fb5c6ae96 --- /dev/null +++ b/dev/engines/online/wallhaven.html @@ -0,0 +1,218 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Wallhaven — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Wikimedia" href="wikipedia.html" /> + <link rel="prev" title="Void Linux binary packages" href="void.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="wikipedia.html" title="Wikimedia" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="void.html" title="Void Linux binary packages" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Wallhaven</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="wallhaven"> +<span id="wallhaven-engine"></span><h1>Wallhaven<a class="headerlink" href="#wallhaven" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.wallhaven"><a class="reference external" href="https://wallhaven.cc/about#Copyright">Wallhaven</a> is a site created by and for people who like wallpapers.</p> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wallhaven.api_key"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wallhaven.</span></span><span class="sig-name descname"><span class="pre">api_key</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.wallhaven.api_key" title="Link to this definition">¶</a></dt> +<dd><p>If you own an API key you can add it here, further read <a class="reference external" href="https://wallhaven.cc/help/api#limits">Rate Limiting and +Errors</a>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wallhaven.safesearch_map"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wallhaven.</span></span><span class="sig-name descname"><span class="pre">safesearch_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">'111',</span> <span class="pre">1:</span> <span class="pre">'110',</span> <span class="pre">2:</span> <span class="pre">'100'}</span></em><a class="headerlink" href="#searx.engines.wallhaven.safesearch_map" title="Link to this definition">¶</a></dt> +<dd><p>Turn purities on(1) or off(0) NSFW requires a valid API key.</p> +<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>100/110/111 <-- Bits stands for: SFW, Sketchy and NSFW +</pre></div> +</div> +<p><a class="reference external" href="https://wallhaven.cc/faq#What-are-SFW-Sketchy-and-NSFW-all-about">What are SFW, Sketchy and NSFW all about?</a>:</p> +<ul class="simple"> +<li><p>SFW = “Safe for work” wallpapers. <em>Grandma approves.</em></p></li> +<li><p>Sketchy = Not quite SFW not quite NSFW. <em>Grandma might be uncomfortable.</em></p></li> +<li><p>NSFW = “Not safe for work”. <em>Grandma isn’t sure who you are anymore.</em></p></li> +</ul> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="void.html" title="previous chapter">Void Linux binary packages</a> + <li>Next: <a href="wikipedia.html" title="next chapter">Wikimedia</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/wallhaven.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/wikipedia.html b/dev/engines/online/wikipedia.html new file mode 100644 index 000000000..78f239a52 --- /dev/null +++ b/dev/engines/online/wikipedia.html @@ -0,0 +1,370 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Wikimedia — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Yacy" href="yacy.html" /> + <link rel="prev" title="Wallhaven" href="wallhaven.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="yacy.html" title="Yacy" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="wallhaven.html" title="Wallhaven" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Wikimedia</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="wikimedia"> +<span id="wikimedia-engines"></span><h1>Wikimedia<a class="headerlink" href="#wikimedia" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#module-searx.engines.wikipedia" id="id1">Wikipedia</a></p></li> +<li><p><a class="reference internal" href="#module-searx.engines.wikidata" id="id2">Wikidata</a></p></li> +</ul> +</nav> +<section id="module-searx.engines.wikipedia"> +<span id="wikipedia"></span><span id="wikipedia-engine"></span><h2><a class="toc-backref" href="#id1" role="doc-backlink">Wikipedia</a><a class="headerlink" href="#module-searx.engines.wikipedia" title="Link to this heading">¶</a></h2> +<p>This module implements the Wikipedia engine. Some of this implementations +are shared by other engines:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#wikidata-engine"><span class="std std-ref">Wikidata</span></a></p></li> +</ul> +<p>The list of supported languages is <a class="reference internal" href="#searx.engines.wikipedia.fetch_wikimedia_traits" title="searx.engines.wikipedia.fetch_wikimedia_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fetched</span></code></a> from +the article linked by <a class="reference internal" href="#searx.engines.wikipedia.list_of_wikipedias" title="searx.engines.wikipedia.list_of_wikipedias"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list_of_wikipedias</span></code></a>.</p> +<p>Unlike traditional search engines, wikipedia does not support one Wikipedia for +all languages, but there is one Wikipedia for each supported language. Some of +these Wikipedias have a <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> enabled +(<a class="reference internal" href="#searx.engines.wikipedia.rest_v1_summary_url" title="searx.engines.wikipedia.rest_v1_summary_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rest_v1_summary_url</span></code></a>).</p> +<p>A <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> (LC) is a system based on language variants that +automatically converts the content of a page into a different variant. A variant +is mostly the same language in a different script.</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://meta.wikimedia.org/wiki/Wikipedias_in_multiple_writing_systems">Wikipedias in multiple writing systems</a></p></li> +<li><p><a class="reference external" href="https://en.wikipedia.org/wiki/Chinese_Wikipedia#Automatic_conversion_between_traditional_and_simplified_Chinese_characters">Automatic conversion between traditional and simplified Chinese characters</a></p></li> +</ul> +<dl class="simple"> +<dt><a class="reference external" href="https://github.com/searx/searx/pull/2554">PR-2554</a>:</dt><dd><p>The Wikipedia link returned by the API is still the same in all cases +(<a class="reference external" href="https://zh.wikipedia.org/wiki/%E5%87%BA%E7%A7%9F%E8%BB%8A">https://zh.wikipedia.org/wiki/出租車</a>) but if your browser’s +<code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> is set to any of <code class="docutils literal notranslate"><span class="pre">zh</span></code>, <code class="docutils literal notranslate"><span class="pre">zh-CN</span></code>, <code class="docutils literal notranslate"><span class="pre">zh-TW</span></code>, <code class="docutils literal notranslate"><span class="pre">zh-HK</span></code> +or .. Wikipedia’s LC automatically returns the desired script in their +web-page.</p> +<ul class="simple"> +<li><p>You can test the API here: <a class="reference external" href="https://reqbin.com/gesg2kvx">https://reqbin.com/gesg2kvx</a></p></li> +</ul> +</dd> +</dl> +<p>To support Wikipedia’s <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a>, a SearXNG request to Wikipedia uses +<a class="reference internal" href="#searx.engines.wikipedia.get_wiki_params" title="searx.engines.wikipedia.get_wiki_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_wiki_params</span></code></a> and <code class="xref py py-obj docutils literal notranslate"><span class="pre">wiki_lc_locale_variants'</span> <span class="pre">in</span> <span class="pre">the</span> +<span class="pre">:py:obj:`fetch_wikimedia_traits</span></code> function.</p> +<p>To test in SearXNG, query for <code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span></code> with each of the available Chinese +options:</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh</span></code> should show 出租車</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-CN</span></code> should show 出租车</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-TW</span></code> should show 計程車</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-HK</span></code> should show 的士</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">!wp</span> <span class="pre">出租車</span> <span class="pre">:zh-SG</span></code> should show 德士</p></li> +</ul> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.fetch_wikimedia_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">fetch_wikimedia_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikipedia.html#fetch_wikimedia_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikipedia.fetch_wikimedia_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages from Wikipedia. Not all languages from the +<a class="reference internal" href="#searx.engines.wikipedia.list_of_wikipedias" title="searx.engines.wikipedia.list_of_wikipedias"><code class="xref py py-obj docutils literal notranslate"><span class="pre">list_of_wikipedias</span></code></a> are supported by SearXNG locales, only those +known from <a class="reference internal" href="../../../src/searx.locales.html#searx.locales.LOCALE_NAMES" title="searx.locales.LOCALE_NAMES"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.locales.LOCALE_NAMES</span></code></a> or those with a minimal +<a class="reference internal" href="#searx.engines.wikipedia.wikipedia_article_depth" title="searx.engines.wikipedia.wikipedia_article_depth"><code class="xref py py-obj docutils literal notranslate"><span class="pre">editing</span> <span class="pre">depth</span></code></a>.</p> +<p>The location of the Wikipedia address of a language is mapped in a +<a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits.custom" title="searx.enginelib.traits.EngineTraits.custom"><code class="xref py py-obj docutils literal notranslate"><span class="pre">custom</span> <span class="pre">field</span></code></a> +(<code class="docutils literal notranslate"><span class="pre">wiki_netloc</span></code>). Here is a reduced example:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">traits</span><span class="o">.</span><span class="n">custom</span><span class="p">[</span><span class="s1">'wiki_netloc'</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> + <span class="s2">"en"</span><span class="p">:</span> <span class="s2">"en.wikipedia.org"</span><span class="p">,</span> + <span class="o">..</span> + <span class="s2">"gsw"</span><span class="p">:</span> <span class="s2">"als.wikipedia.org"</span><span class="p">,</span> + <span class="o">..</span> + <span class="s2">"zh"</span><span class="p">:</span> <span class="s2">"zh.wikipedia.org"</span><span class="p">,</span> + <span class="s2">"zh-classical"</span><span class="p">:</span> <span class="s2">"zh-classical.wikipedia.org"</span> +<span class="p">}</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.get_wiki_params"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">get_wiki_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sxng_locale</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eng_traits</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikipedia.html#get_wiki_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikipedia.get_wiki_params" title="Link to this definition">¶</a></dt> +<dd><p>Returns the Wikipedia language tag and the netloc that fits to the +<code class="docutils literal notranslate"><span class="pre">sxng_locale</span></code>. To support <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> this function rates a locale +(region) higher than a language (compare <a class="reference internal" href="#searx.engines.wikipedia.wiki_lc_locale_variants" title="searx.engines.wikipedia.wiki_lc_locale_variants"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wiki_lc_locale_variants</span></code></a>).</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikipedia.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikipedia.request" title="Link to this definition">¶</a></dt> +<dd><p>Assemble a request (<a class="reference external" href="https://en.wikipedia.org/api/rest_v1/#/Page%20content/get_page_summary__title_">wikipedia rest_v1 summary API</a>).</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.display_type"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">display_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['infobox']</span></em><a class="headerlink" href="#searx.engines.wikipedia.display_type" title="Link to this definition">¶</a></dt> +<dd><p>A list of display types composed from <code class="docutils literal notranslate"><span class="pre">infobox</span></code> and <code class="docutils literal notranslate"><span class="pre">list</span></code>. The latter +one will add a hit to the result list. The first one will show a hit in the +info box. Both values can be set, or one of the two can be set.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.list_of_wikipedias"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">list_of_wikipedias</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://meta.wikimedia.org/wiki/List_of_Wikipedias'</span></em><a class="headerlink" href="#searx.engines.wikipedia.list_of_wikipedias" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://meta.wikimedia.org/wiki/List_of_Wikipedias">List of all wikipedias</a></p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.rest_v1_summary_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">rest_v1_summary_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://{wiki_netloc}/api/rest_v1/page/summary/{title}'</span></em><a class="headerlink" href="#searx.engines.wikipedia.rest_v1_summary_url" title="Link to this definition">¶</a></dt> +<dd><dl class="simple"> +<dt><a class="reference external" href="https://en.wikipedia.org/api/rest_v1/#/Page%20content/get_page_summary__title_">wikipedia rest_v1 summary API</a>:</dt><dd><p>The summary response includes an extract of the first paragraph of the page in +plain text and HTML as well as the type of page. This is useful for page +previews (fka. Hovercards, aka. Popups) on the web and link previews in the +apps.</p> +</dd> +<dt>HTTP <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header (<a class="reference internal" href="#searx.engines.wikipedia.send_accept_language_header" title="searx.engines.wikipedia.send_accept_language_header"><code class="xref py py-obj docutils literal notranslate"><span class="pre">send_accept_language_header</span></code></a>):</dt><dd><p>The desired language variant code for wikis where <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> is +enabled.</p> +</dd> +</dl> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.send_accept_language_header"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">send_accept_language_header</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">True</span></em><a class="headerlink" href="#searx.engines.wikipedia.send_accept_language_header" title="Link to this definition">¶</a></dt> +<dd><p>The HTTP <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header is needed for wikis where +<a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> is enabled.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.wiki_lc_locale_variants"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">wiki_lc_locale_variants</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'zh':</span> <span class="pre">('zh-CN',</span> <span class="pre">'zh-HK',</span> <span class="pre">'zh-MO',</span> <span class="pre">'zh-MY',</span> <span class="pre">'zh-SG',</span> <span class="pre">'zh-TW'),</span> <span class="pre">'zh-classical':</span> <span class="pre">('zh-classical',)}</span></em><a class="headerlink" href="#searx.engines.wikipedia.wiki_lc_locale_variants" title="Link to this definition">¶</a></dt> +<dd><p>Mapping rule of the <a class="reference external" href="https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter">LanguageConverter</a> to map a language and its variants to +a Locale (used in the HTTP <code class="docutils literal notranslate"><span class="pre">Accept-Language</span></code> header). For example see <a class="reference external" href="https://meta.wikimedia.org/wiki/Wikipedias_in_multiple_writing_systems#Chinese">LC +Chinese</a>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wikipedia.wikipedia_article_depth"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikipedia.</span></span><span class="sig-name descname"><span class="pre">wikipedia_article_depth</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://meta.wikimedia.org/wiki/Wikipedia_article_depth'</span></em><a class="headerlink" href="#searx.engines.wikipedia.wikipedia_article_depth" title="Link to this definition">¶</a></dt> +<dd><p>The <em>editing depth</em> of Wikipedia is one of several possible rough indicators +of the encyclopedia’s collaborative quality, showing how frequently its articles +are updated. The measurement of depth was introduced after some limitations of +the classic measurement of article count were realized.</p> +</dd></dl> + +</section> +<section id="module-searx.engines.wikidata"> +<span id="wikidata"></span><span id="wikidata-engine"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Wikidata</a><a class="headerlink" href="#module-searx.engines.wikidata" title="Link to this heading">¶</a></h2> +<p>This module implements the Wikidata engine. Some implementations are shared +from <a class="reference internal" href="#wikipedia-engine"><span class="std std-ref">Wikipedia</span></a>.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.wikidata.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikidata.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikidata.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikidata.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Uses languages evaluated from <a class="reference internal" href="#searx.engines.wikipedia.fetch_wikimedia_traits" title="searx.engines.wikipedia.fetch_wikimedia_traits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wikipedia.fetch_wikimedia_traits</span></code></a> and removes</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">traits.custom['wiki_netloc']</span></code>: wikidata does not have net-locations for +the languages and the list of all</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">traits.custom['WIKIPEDIA_LANGUAGES']</span></code>: not used in the wikipedia engine</p></li> +</ul> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.wikidata.get_thumbnail"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikidata.</span></span><span class="sig-name descname"><span class="pre">get_thumbnail</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">img_src</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/wikidata.html#get_thumbnail"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.wikidata.get_thumbnail" title="Link to this definition">¶</a></dt> +<dd><p>Get Thumbnail image from wikimedia commons</p> +<p>Images from commons.wikimedia.org are (HTTP) redirected to +upload.wikimedia.org. The redirected URL can be calculated by this +function.</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://stackoverflow.com/a/33691240">https://stackoverflow.com/a/33691240</a></p></li> +</ul> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.wikidata.display_type"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.wikidata.</span></span><span class="sig-name descname"><span class="pre">display_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['infobox']</span></em><a class="headerlink" href="#searx.engines.wikidata.display_type" title="Link to this definition">¶</a></dt> +<dd><p>A list of display types composed from <code class="docutils literal notranslate"><span class="pre">infobox</span></code> and <code class="docutils literal notranslate"><span class="pre">list</span></code>. The latter +one will add a hit to the result list. The first one will show a hit in the +info box. Both values can be set, or one of the two can be set.</p> +</dd></dl> + +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="wallhaven.html" title="previous chapter">Wallhaven</a> + <li>Next: <a href="yacy.html" title="next chapter">Yacy</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/wikipedia.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/yacy.html b/dev/engines/online/yacy.html new file mode 100644 index 000000000..7aa29d285 --- /dev/null +++ b/dev/engines/online/yacy.html @@ -0,0 +1,283 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Yacy — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Yahoo Engine" href="yahoo.html" /> + <link rel="prev" title="Wikimedia" href="wikipedia.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="yahoo.html" title="Yahoo Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="wikipedia.html" title="Wikimedia" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Yacy</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="yacy"> +<span id="yacy-engine"></span><h1>Yacy<a class="headerlink" href="#yacy" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.yacy"><a class="reference external" href="https://yacy.net/">YaCy</a> is a free distributed search engine, built on the principles of +peer-to-peer (P2P) networks.</p> +<p>API: <a class="reference external" href="https://wiki.yacy.net/index.php/Dev:APIyacysearch">Dev:APIyacysearch</a></p> +<p>Releases:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://github.com/yacy/yacy_search_server/tags">https://github.com/yacy/yacy_search_server/tags</a></p></li> +<li><p><a class="reference external" href="https://download.yacy.net/">https://download.yacy.net/</a></p></li> +</ul> +<section id="configuration"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following (additional) settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.yacy.http_digest_auth_user" title="searx.engines.yacy.http_digest_auth_user"><code class="xref py py-obj docutils literal notranslate"><span class="pre">http_digest_auth_user</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.yacy.http_digest_auth_pass" title="searx.engines.yacy.http_digest_auth_pass"><code class="xref py py-obj docutils literal notranslate"><span class="pre">http_digest_auth_pass</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.yacy.search_mode" title="searx.engines.yacy.search_mode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_mode</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.yacy.search_type" title="searx.engines.yacy.search_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_type</span></code></a></p></li> +</ul> +<p>The <a class="reference internal" href="#searx.engines.yacy.base_url" title="searx.engines.yacy.base_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_url</span></code></a> has to be set in the engine named <cite>yacy</cite> and is used by +all yacy engines.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">general</span> +<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">text</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ya</span> +<span class="w"> </span><span class="nt">base_url</span><span class="p">:</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://yacy.searchlab.eu</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://search.lomig.me</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://yacy.ecosys.eu</span> +<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://search.webproject.link</span> + +<span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy images</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yacy</span> +<span class="w"> </span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">images</span> +<span class="w"> </span><span class="nt">search_type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">image</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yai</span> +<span class="w"> </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.yacy.base_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">base_url</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.13)"><span class="pre">list</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'https://yacy.searchlab.eu'</span></em><a class="headerlink" href="#searx.engines.yacy.base_url" title="Link to this definition">¶</a></dt> +<dd><p>The value is an URL or a list of URLs. In the latter case instance will be +selected randomly.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.yacy.http_digest_auth_pass"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">http_digest_auth_pass</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.yacy.http_digest_auth_pass" title="Link to this definition">¶</a></dt> +<dd><p>HTTP digest password for the local YACY instance</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.yacy.http_digest_auth_user"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">http_digest_auth_user</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.yacy.http_digest_auth_user" title="Link to this definition">¶</a></dt> +<dd><p>HTTP digest user for the local YACY instance</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.yacy.search_mode"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">search_mode</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'global'</span></em><a class="headerlink" href="#searx.engines.yacy.search_mode" title="Link to this definition">¶</a></dt> +<dd><p>Yacy search mode <code class="docutils literal notranslate"><span class="pre">global</span></code> or <code class="docutils literal notranslate"><span class="pre">local</span></code>. By default, Yacy operates in <code class="docutils literal notranslate"><span class="pre">global</span></code> +mode.</p> +<dl class="simple"> +<dt><code class="docutils literal notranslate"><span class="pre">global</span></code></dt><dd><p>Peer-to-Peer search</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">local</span></code></dt><dd><p>Privacy or Stealth mode, restricts the search to local yacy instance.</p> +</dd> +</dl> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.yacy.search_type"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yacy.</span></span><span class="sig-name descname"><span class="pre">search_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'text'</span></em><a class="headerlink" href="#searx.engines.yacy.search_type" title="Link to this definition">¶</a></dt> +<dd><p>One of <code class="docutils literal notranslate"><span class="pre">text</span></code>, <code class="docutils literal notranslate"><span class="pre">image</span></code> / The search-types <code class="docutils literal notranslate"><span class="pre">app</span></code>, <code class="docutils literal notranslate"><span class="pre">audio</span></code> and +<code class="docutils literal notranslate"><span class="pre">video</span></code> are not yet implemented (Pull-Requests are welcome).</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="wikipedia.html" title="previous chapter">Wikimedia</a> + <li>Next: <a href="yahoo.html" title="next chapter">Yahoo Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/yacy.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/yahoo.html b/dev/engines/online/yahoo.html new file mode 100644 index 000000000..d1a35418a --- /dev/null +++ b/dev/engines/online/yahoo.html @@ -0,0 +1,228 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Yahoo Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Z-Library" href="zlibrary.html" /> + <link rel="prev" title="Yacy" href="yacy.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="zlibrary.html" title="Z-Library" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="yacy.html" title="Yacy" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Yahoo Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="yahoo-engine"> +<span id="id1"></span><h1>Yahoo Engine<a class="headerlink" href="#yahoo-engine" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.yahoo">Yahoo Search (Web)</p> +<p>Languages are supported by mapping the language to a domain. If domain is not +found in <a class="reference internal" href="#searx.engines.yahoo.lang2domain" title="searx.engines.yahoo.lang2domain"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lang2domain</span></code></a> URL <code class="docutils literal notranslate"><span class="pre"><lang>.search.yahoo.com</span></code> is used.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.yahoo.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages from yahoo</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.yahoo.parse_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">parse_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url_string</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#parse_url"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.parse_url" title="Link to this definition">¶</a></dt> +<dd><p>remove yahoo-specific tracking-url</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.yahoo.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.request" title="Link to this definition">¶</a></dt> +<dd><p>build request</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.yahoo.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/yahoo.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.yahoo.response" title="Link to this definition">¶</a></dt> +<dd><p>parse response</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.yahoo.lang2domain"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.yahoo.</span></span><span class="sig-name descname"><span class="pre">lang2domain</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'any':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'bg':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'cs':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'da':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'el':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'en':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'et':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'he':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'hr':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'ja':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'ko':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'sk':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'sl':</span> <span class="pre">'search.yahoo.com',</span> <span class="pre">'zh_chs':</span> <span class="pre">'hk.search.yahoo.com',</span> <span class="pre">'zh_cht':</span> <span class="pre">'tw.search.yahoo.com'}</span></em><a class="headerlink" href="#searx.engines.yahoo.lang2domain" title="Link to this definition">¶</a></dt> +<dd><p>Map language to domain</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="yacy.html" title="previous chapter">Yacy</a> + <li>Next: <a href="zlibrary.html" title="next chapter">Z-Library</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/yahoo.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online/zlibrary.html b/dev/engines/online/zlibrary.html new file mode 100644 index 000000000..0d005f7cb --- /dev/null +++ b/dev/engines/online/zlibrary.html @@ -0,0 +1,260 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Z-Library — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Offline Concept" href="../offline_concept.html" /> + <link rel="prev" title="Yahoo Engine" href="yahoo.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="../offline_concept.html" title="Offline Concept" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="yahoo.html" title="Yahoo Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Z-Library</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="z-library"> +<span id="zlibrary-engine"></span><h1>Z-Library<a class="headerlink" href="#z-library" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<p class="topic-title">Contents</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id3">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.zlibrary"><a class="reference external" href="https://zlibrary-global.se/">Z-Library</a> (abbreviated as z-lib, formerly BookFinder) is a shadow library +project for file-sharing access to scholarly journal articles, academic texts +and general-interest books. It began as a mirror of Library Genesis, from which +most of its books originate.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>The engine has the following additional settings:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.zlibrary.zlib_year_from" title="searx.engines.zlibrary.zlib_year_from"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zlib_year_from</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.zlibrary.zlib_year_to" title="searx.engines.zlibrary.zlib_year_to"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zlib_year_to</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.zlibrary.zlib_ext" title="searx.engines.zlibrary.zlib_ext"><code class="xref py py-obj docutils literal notranslate"><span class="pre">zlib_ext</span></code></a></p></li> +</ul> +<p>With this options a SearXNG maintainer is able to configure <strong>additional</strong> +engines for specific searches in Z-Library. For example a engine to search +only for EPUB from 2010 to 2020.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">z-library 2010s epub</span> +<span class="w"> </span><span class="nt">engine</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">zlibrary</span> +<span class="w"> </span><span class="nt">shortcut</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">zlib2010s</span> +<span class="w"> </span><span class="nt">zlib_year_from</span><span class="p">:</span><span class="w"> </span><span class="s">'2010'</span> +<span class="w"> </span><span class="nt">zlib_year_to</span><span class="p">:</span><span class="w"> </span><span class="s">'2020'</span> +<span class="w"> </span><span class="nt">zlib_ext</span><span class="p">:</span><span class="w"> </span><span class="s">'EPUB'</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.zlibrary.fetch_traits"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">fetch_traits</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_traits</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="../enginelib.html#searx.enginelib.traits.EngineTraits" title="searx.enginelib.traits.EngineTraits"><span class="pre">EngineTraits</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/zlibrary.html#fetch_traits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.zlibrary.fetch_traits" title="Link to this definition">¶</a></dt> +<dd><p>Fetch languages and other search arguments from zlibrary’s search form.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.zlibrary.init"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">init</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="reference internal" href="../../../_modules/searx/engines/zlibrary.html#init"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.zlibrary.init" title="Link to this definition">¶</a></dt> +<dd><p>Check of engine’s settings.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.zlibrary.zlib_ext"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">zlib_ext</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.zlibrary.zlib_ext" title="Link to this definition">¶</a></dt> +<dd><p>Filter z-library’s results by a file ending. Common filters for example are +<code class="docutils literal notranslate"><span class="pre">PDF</span></code> and <code class="docutils literal notranslate"><span class="pre">EPUB</span></code>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.zlibrary.zlib_year_from"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">zlib_year_from</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.zlibrary.zlib_year_from" title="Link to this definition">¶</a></dt> +<dd><p>Filter z-library’s results by year from. E.g ‘2010’.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.zlibrary.zlib_year_to"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.zlibrary.</span></span><span class="sig-name descname"><span class="pre">zlib_year_to</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.zlibrary.zlib_year_to" title="Link to this definition">¶</a></dt> +<dd><p>Filter z-library’s results by year to. E.g. ‘2010’.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="../demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../xpath.html">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="../mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="yahoo.html" title="previous chapter">Yahoo Engine</a> + <li>Next: <a href="../offline_concept.html" title="next chapter">Offline Concept</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online/zlibrary.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/online_url_search/tineye.html b/dev/engines/online_url_search/tineye.html new file mode 100644 index 000000000..9258d97e8 --- /dev/null +++ b/dev/engines/online_url_search/tineye.html @@ -0,0 +1,229 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../../"> + <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>Tineye — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../../_static/searxng.css?v=52e4ff28" /> + <script src="../../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../../genindex.html" /> + <link rel="search" title="Search" href="../../../search.html" /> + <link rel="next" title="Search API" href="../../search_api.html" /> + <link rel="prev" title="SQL Engines" href="../offline/sql-engines.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="../../search_api.html" title="Search API" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../offline/sql-engines.html" title="SQL Engines" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">Tineye</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="tineye"> +<span id="tineye-engine"></span><h1>Tineye<a class="headerlink" href="#tineye" title="Link to this heading">¶</a></h1> +<p id="module-searx.engines.tineye">This engine implements <em>Tineye - reverse image search</em></p> +<p>Using TinEye, you can search by image or perform what we call a reverse image +search. You can do that by uploading an image or searching by URL. You can also +simply drag and drop your images to start your search. TinEye constantly crawls +the web and adds images to its index. Today, the TinEye index is over 50.2 +billion images <a class="reference external" href="https://tineye.com/how">[tineye.com]</a>.</p> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>This SearXNG engine only supports <em>‘searching by URL’</em> and it does not use +the official API <a class="reference external" href="https://api.tineye.com/python/docs/">[api.tineye.com]</a>.</p> +</div> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.tineye.parse_tineye_match"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">parse_tineye_match</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">match_json</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/tineye.html#parse_tineye_match"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.tineye.parse_tineye_match" title="Link to this definition">¶</a></dt> +<dd><p>Takes parsed JSON from the API server and turns it into a <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dict</span></code></a> +object.</p> +<p>Attributes <a class="reference external" href="https://github.com/TinEye/pytineye/blob/main/pytineye/api.py">(class Match)</a></p> +<ul class="simple"> +<li><p><cite>image_url</cite>, link to the result image.</p></li> +<li><p><cite>domain</cite>, domain this result was found on.</p></li> +<li><p><cite>score</cite>, a number (0 to 100) that indicates how closely the images match.</p></li> +<li><p><cite>width</cite>, image width in pixels.</p></li> +<li><p><cite>height</cite>, image height in pixels.</p></li> +<li><p><cite>size</cite>, image area in pixels.</p></li> +<li><p><cite>format</cite>, image format.</p></li> +<li><p><cite>filesize</cite>, image size in bytes.</p></li> +<li><p><cite>overlay</cite>, overlay URL.</p></li> +<li><p><cite>tags</cite>, whether this match belongs to a collection or stock domain.</p></li> +<li><p><cite>backlinks</cite>, a list of Backlink objects pointing to the original websites +and image URLs. List items are instances of <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dict</span></code></a>, (<a class="reference external" href="https://github.com/TinEye/pytineye/blob/main/pytineye/api.py">Backlink</a>):</p> +<ul> +<li><p><cite>url</cite>, the image URL to the image.</p></li> +<li><p><cite>backlink</cite>, the original website URL.</p></li> +<li><p><cite>crawl_date</cite>, the date the image was crawled.</p></li> +</ul> +</li> +</ul> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.tineye.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/tineye.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.tineye.request" title="Link to this definition">¶</a></dt> +<dd><p>Build TinEye HTTP request using <code class="docutils literal notranslate"><span class="pre">search_urls</span></code> of a <a class="reference internal" href="#searx.engines.tineye.engine_type" title="searx.engines.tineye.engine_type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">engine_type</span></code></a>.</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.tineye.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/searx/engines/tineye.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.tineye.response" title="Link to this definition">¶</a></dt> +<dd><p>Parse HTTP response from TinEye.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.tineye.DOWNLOAD_ERROR"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">DOWNLOAD_ERROR</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'The</span> <span class="pre">image</span> <span class="pre">could</span> <span class="pre">not</span> <span class="pre">be</span> <span class="pre">downloaded.'</span></em><a class="headerlink" href="#searx.engines.tineye.DOWNLOAD_ERROR" title="Link to this definition">¶</a></dt> +<dd><p>TinEye error message</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.tineye.FORMAT_NOT_SUPPORTED"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">FORMAT_NOT_SUPPORTED</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Could</span> <span class="pre">not</span> <span class="pre">read</span> <span class="pre">that</span> <span class="pre">image</span> <span class="pre">url.</span> <span class="pre">This</span> <span class="pre">may</span> <span class="pre">be</span> <span class="pre">due</span> <span class="pre">to</span> <span class="pre">an</span> <span class="pre">unsupported</span> <span class="pre">file</span> <span class="pre">format.</span> <span class="pre">TinEye</span> <span class="pre">only</span> <span class="pre">supports</span> <span class="pre">images</span> <span class="pre">that</span> <span class="pre">are</span> <span class="pre">JPEG,</span> <span class="pre">PNG,</span> <span class="pre">GIF,</span> <span class="pre">BMP,</span> <span class="pre">TIFF</span> <span class="pre">or</span> <span class="pre">WebP.'</span></em><a class="headerlink" href="#searx.engines.tineye.FORMAT_NOT_SUPPORTED" title="Link to this definition">¶</a></dt> +<dd><p>TinEye error message</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.tineye.NO_SIGNATURE_ERROR"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">NO_SIGNATURE_ERROR</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'The</span> <span class="pre">image</span> <span class="pre">is</span> <span class="pre">too</span> <span class="pre">simple</span> <span class="pre">to</span> <span class="pre">find</span> <span class="pre">matches.</span> <span class="pre">TinEye</span> <span class="pre">requires</span> <span class="pre">a</span> <span class="pre">basic</span> <span class="pre">level</span> <span class="pre">of</span> <span class="pre">visual</span> <span class="pre">detail</span> <span class="pre">to</span> <span class="pre">successfully</span> <span class="pre">identify</span> <span class="pre">matches.'</span></em><a class="headerlink" href="#searx.engines.tineye.NO_SIGNATURE_ERROR" title="Link to this definition">¶</a></dt> +<dd><p>TinEye error message</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.tineye.engine_type"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.tineye.</span></span><span class="sig-name descname"><span class="pre">engine_type</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'online_url_search'</span></em><a class="headerlink" href="#searx.engines.tineye.engine_type" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="../../../src/searx.search.processors.html#module-searx.search.processors.online_url_search" title="searx.search.processors.online_url_search"><code class="xref py py-obj docutils literal notranslate"><span class="pre">searx.search.processors.online_url_search</span></code></a></p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../../index.html"> + <img class="logo" src="../../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="../enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="../engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="../index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-engines">Online Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4 current"><a class="reference internal" href="../index.html#online-url-search">Online URL Search</a><ul class="current"> +<li class="toctree-l5 current"><a class="current reference internal" href="#">Tineye</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="../index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../../index.html">Overview</a> + <ul> + <li><a href="../../index.html">Developer documentation</a> + <ul> + <li><a href="../index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="../offline/sql-engines.html" title="previous chapter">SQL Engines</a> + <li>Next: <a href="../../search_api.html" title="next chapter">Search API</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../../_sources/dev/engines/online_url_search/tineye.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/engines/xpath.html b/dev/engines/xpath.html new file mode 100644 index 000000000..61006066f --- /dev/null +++ b/dev/engines/xpath.html @@ -0,0 +1,462 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>XPath Engine — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="MediaWiki Engine" href="mediawiki.html" /> + <link rel="prev" title="Demo Online Engine" href="demo/demo_online.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="mediawiki.html" title="MediaWiki Engine" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="demo/demo_online.html" title="Demo Online Engine" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Engine Implementations</a> »</li> + <li class="nav-item nav-item-this"><a href="">XPath Engine</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="xpath-engine"> +<span id="id1"></span><h1>XPath Engine<a class="headerlink" href="#xpath-engine" title="Link to this heading">¶</a></h1> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#configuration" id="id2">Configuration</a></p></li> +<li><p><a class="reference internal" href="#example" id="id3">Example</a></p></li> +<li><p><a class="reference internal" href="#implementations" id="id4">Implementations</a></p></li> +</ul> +</nav> +<p id="module-searx.engines.xpath">The XPath engine is a <em>generic</em> engine with which it is possible to configure +engines in the settings.</p> +<section id="configuration"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Configuration</a><a class="headerlink" href="#configuration" title="Link to this heading">¶</a></h2> +<p>Request:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.lang_all" title="searx.engines.xpath.lang_all"><code class="xref py py-obj docutils literal notranslate"><span class="pre">lang_all</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.soft_max_redirects" title="searx.engines.xpath.soft_max_redirects"><code class="xref py py-obj docutils literal notranslate"><span class="pre">soft_max_redirects</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.method" title="searx.engines.xpath.method"><code class="xref py py-obj docutils literal notranslate"><span class="pre">method</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.request_body" title="searx.engines.xpath.request_body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">request_body</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.cookies" title="searx.engines.xpath.cookies"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cookies</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.headers" title="searx.engines.xpath.headers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">headers</span></code></a></p></li> +</ul> +<p>Paging:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.xpath.paging" title="searx.engines.xpath.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.page_size" title="searx.engines.xpath.page_size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">page_size</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.first_page_num" title="searx.engines.xpath.first_page_num"><code class="xref py py-obj docutils literal notranslate"><span class="pre">first_page_num</span></code></a></p></li> +</ul> +<p>Time Range:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.xpath.time_range_support" title="searx.engines.xpath.time_range_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_support</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.time_range_url" title="searx.engines.xpath.time_range_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_url</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.time_range_map" title="searx.engines.xpath.time_range_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_map</span></code></a></p></li> +</ul> +<p>Safe-Search:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.xpath.safe_search_support" title="searx.engines.xpath.safe_search_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">safe_search_support</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.safe_search_map" title="searx.engines.xpath.safe_search_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">safe_search_map</span></code></a></p></li> +</ul> +<p>Response:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.xpath.no_result_for_http_status" title="searx.engines.xpath.no_result_for_http_status"><code class="xref py py-obj docutils literal notranslate"><span class="pre">no_result_for_http_status</span></code></a></p></li> +</ul> +<p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a>:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#searx.engines.xpath.results_xpath" title="searx.engines.xpath.results_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">results_xpath</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.url_xpath" title="searx.engines.xpath.url_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">url_xpath</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.title_xpath" title="searx.engines.xpath.title_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">title_xpath</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.content_xpath" title="searx.engines.xpath.content_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">content_xpath</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.thumbnail_xpath" title="searx.engines.xpath.thumbnail_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">thumbnail_xpath</span></code></a></p></li> +<li><p><a class="reference internal" href="#searx.engines.xpath.suggestion_xpath" title="searx.engines.xpath.suggestion_xpath"><code class="xref py py-obj docutils literal notranslate"><span class="pre">suggestion_xpath</span></code></a></p></li> +</ul> +</section> +<section id="example"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Example</a><a class="headerlink" href="#example" title="Link to this heading">¶</a></h2> +<p>Here is a simple example of a XPath engine configured in the <a class="reference internal" href="../../admin/settings/settings_engine.html#settings-engine"><span class="std std-ref">engine:</span></a> section, further read <a class="reference internal" href="engine_overview.html#engines-dev"><span class="std std-ref">Engine Overview</span></a>.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">bitbucket</span> +<span class="w"> </span><span class="nt">engine </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">xpath</span> +<span class="w"> </span><span class="nt">paging </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">True</span> +<span class="w"> </span><span class="nt">search_url </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://bitbucket.org/repo/all/{pageno}?name={query}</span> +<span class="w"> </span><span class="nt">url_xpath </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">//article[@class="repo-summary"]//a[@class="repo-link"]/@href</span> +<span class="w"> </span><span class="nt">title_xpath </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">//article[@class="repo-summary"]//a[@class="repo-link"]</span> +<span class="w"> </span><span class="nt">content_xpath </span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">//article[@class="repo-summary"]/p</span> +</pre></div> +</div> +</section> +<section id="implementations"> +<h2><a class="toc-backref" href="#id4" role="doc-backlink">Implementations</a><a class="headerlink" href="#implementations" title="Link to this heading">¶</a></h2> +</section> +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.xpath.request"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">request</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">query</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines/xpath.html#request"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.xpath.request" title="Link to this definition">¶</a></dt> +<dd><p>Build request parameters (see <a class="reference internal" href="engine_overview.html#engine-request"><span class="std std-ref">Making a Request</span></a>).</p> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="searx.engines.xpath.response"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">response</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">resp</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/searx/engines/xpath.html#response"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#searx.engines.xpath.response" title="Link to this definition">¶</a></dt> +<dd><p>Scrap <em>results</em> from the response (see <a class="reference internal" href="engine_overview.html#engine-results"><span class="std std-ref">Result Types (template)</span></a>).</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.content_xpath"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">content_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.content_xpath" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of result’s <code class="docutils literal notranslate"><span class="pre">content</span></code>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.cookies"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">cookies</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{}</span></em><a class="headerlink" href="#searx.engines.xpath.cookies" title="Link to this definition">¶</a></dt> +<dd><p>Some engines might offer different result based on cookies. +Possible use-case: To set safesearch cookie.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.first_page_num"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">first_page_num</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></em><a class="headerlink" href="#searx.engines.xpath.first_page_num" title="Link to this definition">¶</a></dt> +<dd><p>Number of the first page (usually 0 or 1).</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.headers"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">headers</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{}</span></em><a class="headerlink" href="#searx.engines.xpath.headers" title="Link to this definition">¶</a></dt> +<dd><p>Some engines might offer different result based headers. Possible use-case: +To set header to moderate.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.lang_all"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">lang_all</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'en'</span></em><a class="headerlink" href="#searx.engines.xpath.lang_all" title="Link to this definition">¶</a></dt> +<dd><p>Replacement <code class="docutils literal notranslate"><span class="pre">{lang}</span></code> in <a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a> if language <code class="docutils literal notranslate"><span class="pre">all</span></code> is +selected.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.method"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">method</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'GET'</span></em><a class="headerlink" href="#searx.engines.xpath.method" title="Link to this definition">¶</a></dt> +<dd><p>Some engines might require to do POST requests for search.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.no_result_for_http_status"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">no_result_for_http_status</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">[]</span></em><a class="headerlink" href="#searx.engines.xpath.no_result_for_http_status" title="Link to this definition">¶</a></dt> +<dd><p>Return empty result for these HTTP status codes instead of throwing an error.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">no_result_for_http_status</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[]</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.page_size"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">page_size</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></em><a class="headerlink" href="#searx.engines.xpath.page_size" title="Link to this definition">¶</a></dt> +<dd><p>Number of results on each page. Only needed if the site requires not a page +number, but an offset.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.paging"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">paging</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.paging" title="Link to this definition">¶</a></dt> +<dd><p>Engine supports paging [True or False].</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.request_body"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">request_body</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.xpath.request_body" title="Link to this definition">¶</a></dt> +<dd><p>The body of the request. This can only be used if different <a class="reference internal" href="#searx.engines.xpath.method" title="searx.engines.xpath.method"><code class="xref py py-obj docutils literal notranslate"><span class="pre">method</span></code></a> +is set, e.g. <code class="docutils literal notranslate"><span class="pre">POST</span></code>. For formatting see the documentation of <a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a>:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">search</span><span class="o">=</span><span class="p">{</span><span class="n">query</span><span class="p">}</span><span class="o">&</span><span class="n">page</span><span class="o">=</span><span class="p">{</span><span class="n">pageno</span><span class="p">}{</span><span class="n">time_range</span><span class="p">}{</span><span class="n">safe_search</span><span class="p">}</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.results_xpath"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">results_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.xpath.results_xpath" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> for the list of result items</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.safe_search_map"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">safe_search_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{0:</span> <span class="pre">'&filter=none',</span> <span class="pre">1:</span> <span class="pre">'&filter=moderate',</span> <span class="pre">2:</span> <span class="pre">'&filter=strict'}</span></em><a class="headerlink" href="#searx.engines.xpath.safe_search_map" title="Link to this definition">¶</a></dt> +<dd><p>Maps safe-search value to <code class="docutils literal notranslate"><span class="pre">{safe_search}</span></code> in <a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a>.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">safesearch</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> +<span class="nt">safes_search_map</span><span class="p">:</span> +<span class="w"> </span><span class="nt">0</span><span class="p">:</span><span class="w"> </span><span class="s">'&filter=none'</span> +<span class="w"> </span><span class="nt">1</span><span class="p">:</span><span class="w"> </span><span class="s">'&filter=moderate'</span> +<span class="w"> </span><span class="nt">2</span><span class="p">:</span><span class="w"> </span><span class="s">'&filter=strict'</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.safe_search_support"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">safe_search_support</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.safe_search_support" title="Link to this definition">¶</a></dt> +<dd><p>Engine supports safe-search.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.search_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">search_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.search_url" title="Link to this definition">¶</a></dt> +<dd><p>Search URL of the engine. Example:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>https://example.org/?search={query}&page={pageno}{time_range}{safe_search} +</pre></div> +</div> +<p>Replacements are:</p> +<dl> +<dt><code class="docutils literal notranslate"><span class="pre">{query}</span></code>:</dt><dd><p>Search terms from user.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">{pageno}</span></code>:</dt><dd><p>Page number if engine supports paging <a class="reference internal" href="#searx.engines.xpath.paging" title="searx.engines.xpath.paging"><code class="xref py py-obj docutils literal notranslate"><span class="pre">paging</span></code></a></p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">{lang}</span></code>:</dt><dd><p>ISO 639-1 language code (en, de, fr ..)</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">{time_range}</span></code>:</dt><dd><p><a class="reference internal" href="#searx.engines.xpath.time_range_url" title="searx.engines.xpath.time_range_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">URL</span> <span class="pre">parameter</span></code></a> if engine <a class="reference internal" href="#searx.engines.xpath.time_range_support" title="searx.engines.xpath.time_range_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">supports</span> <span class="pre">time</span> +<span class="pre">range</span></code></a>. The value for the parameter is taken from +<a class="reference internal" href="#searx.engines.xpath.time_range_map" title="searx.engines.xpath.time_range_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_map</span></code></a>.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">{safe_search}</span></code>:</dt><dd><p>Safe-search <a class="reference internal" href="#searx.engines.xpath.safe_search_map" title="searx.engines.xpath.safe_search_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">URL</span> <span class="pre">parameter</span></code></a> if engine +<a class="reference internal" href="#searx.engines.xpath.safe_search_support" title="searx.engines.xpath.safe_search_support"><code class="xref py py-obj docutils literal notranslate"><span class="pre">supports</span> <span class="pre">safe-search</span></code></a>. The <code class="docutils literal notranslate"><span class="pre">{safe_search}</span></code> +replacement is taken from the <code class="xref py py-obj docutils literal notranslate"><span class="pre">safes_search_map</span></code>. Filter results:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">0</span><span class="p">:</span> <span class="n">none</span><span class="p">,</span> <span class="mi">1</span><span class="p">:</span> <span class="n">moderate</span><span class="p">,</span> <span class="mi">2</span><span class="p">:</span><span class="n">strict</span> +</pre></div> +</div> +<p>If not supported, the URL parameter is an empty string.</p> +</dd> +</dl> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.soft_max_redirects"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">soft_max_redirects</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">0</span></em><a class="headerlink" href="#searx.engines.xpath.soft_max_redirects" title="Link to this definition">¶</a></dt> +<dd><p>Maximum redirects, soft limit. Record an error but don’t stop the engine</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.suggestion_xpath"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">suggestion_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#searx.engines.xpath.suggestion_xpath" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of result’s <code class="docutils literal notranslate"><span class="pre">suggestion</span></code>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.thumbnail_xpath"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">thumbnail_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.thumbnail_xpath" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of result’s <code class="docutils literal notranslate"><span class="pre">thumbnail</span></code>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.time_range_map"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">time_range_map</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'day':</span> <span class="pre">24,</span> <span class="pre">'month':</span> <span class="pre">720,</span> <span class="pre">'week':</span> <span class="pre">168,</span> <span class="pre">'year':</span> <span class="pre">8760}</span></em><a class="headerlink" href="#searx.engines.xpath.time_range_map" title="Link to this definition">¶</a></dt> +<dd><p>Maps time range value from user to <code class="docutils literal notranslate"><span class="pre">{time_range_val}</span></code> in +<a class="reference internal" href="#searx.engines.xpath.time_range_url" title="searx.engines.xpath.time_range_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_url</span></code></a>.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">time_range_map</span><span class="p">:</span> +<span class="w"> </span><span class="nt">day</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span> +<span class="w"> </span><span class="nt">week</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">7</span> +<span class="w"> </span><span class="nt">month</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">30</span> +<span class="w"> </span><span class="nt">year</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">365</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.time_range_support"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">time_range_support</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">False</span></em><a class="headerlink" href="#searx.engines.xpath.time_range_support" title="Link to this definition">¶</a></dt> +<dd><p>Engine supports search time range.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.time_range_url"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">time_range_url</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'&hours={time_range_val}'</span></em><a class="headerlink" href="#searx.engines.xpath.time_range_url" title="Link to this definition">¶</a></dt> +<dd><p>Time range URL parameter in the in <a class="reference internal" href="#searx.engines.xpath.search_url" title="searx.engines.xpath.search_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_url</span></code></a>. If no time range is +requested by the user, the URL parameter is an empty string. The +<code class="docutils literal notranslate"><span class="pre">{time_range_val}</span></code> replacement is taken from the <a class="reference internal" href="#searx.engines.xpath.time_range_map" title="searx.engines.xpath.time_range_map"><code class="xref py py-obj docutils literal notranslate"><span class="pre">time_range_map</span></code></a>.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">time_range_url </span><span class="p">:</span><span class="w"> </span><span class="s">'&days={time_range_val}'</span> +</pre></div> +</div> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.title_xpath"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">title_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.title_xpath" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of result’s <code class="docutils literal notranslate"><span class="pre">title</span></code>.</p> +</dd></dl> + +<dl class="py data"> +<dt class="sig sig-object py" id="searx.engines.xpath.url_xpath"> +<span class="sig-prename descclassname"><span class="pre">searx.engines.xpath.</span></span><span class="sig-name descname"><span class="pre">url_xpath</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#searx.engines.xpath.url_xpath" title="Link to this definition">¶</a></dt> +<dd><p><a class="reference external" href="https://quickref.me/xpath.html#xpath-selectors">XPath selector</a> of result’s <code class="docutils literal notranslate"><span class="pre">url</span></code>.</p> +</dd></dl> + +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Engine Implementations</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="enginelib.html">Engine Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l3"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li> +<li class="toctree-l3 current"><a class="reference internal" href="index.html#engine-types">Engine Types</a><ul class="current"> +<li class="toctree-l4 current"><a class="reference internal" href="index.html#online-engines">Online Engines</a><ul class="current"> +<li class="toctree-l5"><a class="reference internal" href="demo/demo_online.html">Demo Online Engine</a></li> +<li class="toctree-l5 current"><a class="current reference internal" href="#">XPath Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="mediawiki.html">MediaWiki Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/adobe_stock.html">Adobe Stock</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/alpinelinux.html">Alpine Linux Packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/annas_archive.html">Anna’s Archive</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/archlinux.html">Arch Linux</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bing.html">Bing Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bpb.html">Bpb</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/brave.html">Brave Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/bt4g.html">BT4G</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/dailymotion.html">Dailymotion</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/discourse.html">Discourse Forums</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/duckduckgo.html">DuckDuckGo Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/geizhals.html">Geizhals</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/gitea.html">Gitea</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/gitlab.html">GitLab</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/google.html">Google Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/lemmy.html">Lemmy</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/loc.html">Library of Congress</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mastodon.html">Mastodon</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/moviepilot.html">Moviepilot</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mrs.html">Matrix Rooms Search (MRS)</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mullvad_leta.html">Mullvad-Leta</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/mwmbl.html">Mwmbl Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/odysee.html">Odysee</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/peertube.html">Peertube Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/piped.html">Piped</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/presearch.html">Presearch Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/qwant.html">Qwant</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/radio_browser.html">RadioBrowser</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/recoll.html">Recoll Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/seekr.html">Seekr Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/startpage.html">Startpage Engines</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/tagesschau.html">Tagesschau API</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/torznab.html">Torznab WebAPI</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/void.html">Void Linux binary packages</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/wallhaven.html">Wallhaven</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/wikipedia.html">Wikimedia</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/yacy.html">Yacy</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/yahoo.html">Yahoo Engine</a></li> +<li class="toctree-l5"><a class="reference internal" href="online/zlibrary.html">Z-Library</a></li> +</ul> +</li> +<li class="toctree-l4"><a class="reference internal" href="index.html#offline-engines">Offline Engines</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-url-search">Online URL Search</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-currency">Online Currency</a></li> +<li class="toctree-l4"><a class="reference internal" href="index.html#online-dictionary">Online Dictionary</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="../searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Engine Implementations</a> + <ul> + <li>Previous: <a href="demo/demo_online.html" title="previous chapter">Demo Online Engine</a> + <li>Next: <a href="mediawiki.html" title="next chapter">MediaWiki Engine</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/engines/xpath.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/index.html b/dev/index.html new file mode 100644 index 000000000..73cca6602 --- /dev/null +++ b/dev/index.html @@ -0,0 +1,214 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Developer documentation — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Development Quickstart" href="quickstart.html" /> + <link rel="prev" title="Buildhosts" href="../admin/buildhosts.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="quickstart.html" title="Development Quickstart" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../admin/buildhosts.html" title="Buildhosts" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-this"><a href="">Developer documentation</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="developer-documentation"> +<h1>Developer documentation<a class="headerlink" href="#developer-documentation" title="Link to this heading">¶</a></h1> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l1"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a><ul> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html#get-started">Get started</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html#manage-versions">Manage Versions</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html#introduce-asdf">Introduce asdf</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="contribution_guide.html">How to contribute</a><ul> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#prime-directives-privacy-hackability">Prime directives: Privacy, Hackability</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#code">Code</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#translation">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#documentation">Documentation</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="engines/index.html">Engine Implementations</a><ul> +<li class="toctree-l2"><a class="reference internal" href="engines/enginelib.html">Engine Library</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/engines.html">SearXNG’s engines loader</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/engine_overview.html">Engine Overview</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html#engine-types">Engine Types</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="search_api.html">Search API</a><ul> +<li class="toctree-l2"><a class="reference internal" href="search_api.html#parameters">Parameters</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a><ul> +<li class="toctree-l2"><a class="reference internal" href="plugins.html#example-plugin">Example plugin</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html#external-plugins">External plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html#plugin-entry-points">Plugin entry points</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a><ul> +<li class="toctree-l2"><a class="reference internal" href="translation.html#id2">wlc</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a><ul> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#motivation">Motivation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#gentlemen-start-your-engines">Gentlemen, start your engines!</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#in-containers-work-as-usual">In containers, work as usual</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#wrap-production-into-developer-suite">Wrap production into developer suite</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html#summary">Summary</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a><ul> +<li class="toctree-l2"><a class="reference internal" href="makefile.html#python-environment-make-install">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html#node-js-environment-make-node-env">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</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-format-python"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</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"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</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-search-checker-engine-name"><code class="docutils literal notranslate"><span class="pre">make</span> <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-themes"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-static-build"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html#manage-redis-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html#manage-go-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="reST.html">reST primer</a><ul> +<li class="toctree-l2"><a class="reference internal" href="reST.html#soft-skills">Soft skills</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#basic-inline-markup">Basic inline markup</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#basic-article-structure">Basic article structure</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#anchors-links">Anchors & Links</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#literal-blocks">Literal blocks</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#unicode-substitution">Unicode substitution</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#roles">Roles</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#figures-images">Figures & Images</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#list-markups">List markups</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#admonitions">Admonitions</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#tables">Tables</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#templating">Templating</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#tabbed-views">Tabbed views</a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html#math-equations">Math equations</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li> +</ul> +</li> +</ul> +</div> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Developer documentation</a><ul> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li>Previous: <a href="../admin/buildhosts.html" title="previous chapter">Buildhosts</a> + <li>Next: <a href="quickstart.html" title="next chapter">Development Quickstart</a> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/index.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/lxcdev.html b/dev/lxcdev.html new file mode 100644 index 000000000..1e9b7718a --- /dev/null +++ b/dev/lxcdev.html @@ -0,0 +1,461 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Developing in Linux Containers — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <script src="../_static/tabs.js?v=3030b3cb"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Makefile & ./manage" href="makefile.html" /> + <link rel="prev" title="Translation" href="translation.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="makefile.html" title="Makefile & ./manage" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="translation.html" title="Translation" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Developing in Linux Containers</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="developing-in-linux-containers"> +<span id="lxcdev"></span><h1>Developing in Linux Containers<a class="headerlink" href="#developing-in-linux-containers" title="Link to this heading">¶</a></h1> +<p>In this article we will show, how you can make use of Linux Containers (<a class="reference external" href="https://linuxcontainers.org/lxc/introduction/">LXC</a>) in +<em>distributed and heterogeneous development cycles</em> (TL;DR; jump to the +<a class="reference internal" href="#lxcdev-summary"><span class="std std-ref">Summary</span></a>).</p> +<aside class="sidebar"> +<p class="sidebar-title">Audience</p> +<p>This blog post is written for experienced admins and developers. Readers +should have a serious meaning about the terms: <em>distributed</em>, <em>merge</em> and +<em>linux container</em>.</p> +<p><strong>hint</strong></p> +<p>If you have issues with the internet connectivity of your containers read +section <a class="reference internal" href="../utils/lxc.sh.html#internet-connectivity-docker"><span class="std std-ref">Internet Connectivity & Docker</span></a>.</p> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#motivation" id="id1">Motivation</a></p></li> +<li><p><a class="reference internal" href="#gentlemen-start-your-engines" id="id2">Gentlemen, start your engines!</a></p></li> +<li><p><a class="reference internal" href="#in-containers-work-as-usual" id="id3">In containers, work as usual</a></p></li> +<li><p><a class="reference internal" href="#wrap-production-into-developer-suite" id="id4">Wrap production into developer suite</a></p></li> +<li><p><a class="reference internal" href="#summary" id="id5">Summary</a></p></li> +</ul> +</nav> +<section id="motivation"> +<h2><a class="toc-backref" href="#id1" role="doc-backlink">Motivation</a><a class="headerlink" href="#motivation" title="Link to this heading">¶</a></h2> +<p>Most often in our development cycle, we edit the sources and run some test +and/or builds by using <code class="docutils literal notranslate"><span class="pre">make</span></code> <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">[ref]</span></a> before we commit. This +cycle is simple and perfect but might fail in some aspects we should not +overlook.</p> +<blockquote> +<div><p><strong>The environment in which we run all our development processes matters!</strong></p> +</div></blockquote> +<p>The <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile & ./manage</span></a> and the <a class="reference internal" href="makefile.html#make-install"><span class="std std-ref">Python environment (make install)</span></a> encapsulate a lot for us, but +these tools do not have access to all prerequisites. For example, there may +have dependencies on packages that are installed on developer’s desktop, but +usually are not preinstalled on a server or client system. Another example is; +settings have been made to the software on developer’s desktop that would never +be set on a <em>production</em> system.</p> +<blockquote> +<div><p><strong>Linux Containers are isolate environments</strong>, we use them to not mix up all +the prerequisites from various projects on developer’s desktop.</p> +</div></blockquote> +<p>The scripts from <a class="reference internal" href="../utils/index.html#searx-utils"><span class="std std-ref">DevOps tooling box</span></a> can divide in those to install and maintain +software</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a></p></li> +</ul> +<p>and the script</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../utils/lxc.sh.html#lxc-sh"><span class="std std-ref">utils/lxc.sh</span></a></p></li> +</ul> +<p>with we can scale our installation, maintenance or even development tasks over a +stack of isolated containers / what we call the:</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../utils/lxc.sh.html#searxng-lxc-suite"><span class="std std-ref">SearXNG LXC suite</span></a></p></li> +</ul> +</section> +<section id="gentlemen-start-your-engines"> +<span id="lxcdev-install-searxng"></span><h2><a class="toc-backref" href="#id2" role="doc-backlink">Gentlemen, start your engines!</a><a class="headerlink" href="#gentlemen-start-your-engines" title="Link to this heading">¶</a></h2> +<p>Before you can start with containers, you need to install and initiate <a class="reference external" href="https://linuxcontainers.org/lxd/introduction/">LXD</a> +once:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-0-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-0-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>snap<span class="w"> </span>install<span class="w"> </span>lxd +$<span class="w"> </span>lxd<span class="w"> </span>init<span class="w"> </span>--auto +</pre></div> +</div> +</div></div> +<p>And you need to clone from origin or if you have your own fork, clone from your +fork:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-1-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-1-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>~/Downloads +$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/searxng/searxng.git<span class="w"> </span>searxng +$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>searxng +</pre></div> +</div> +</div></div> +<aside class="sidebar"> +<p class="sidebar-title">The <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code> container</p> +<p>is the base of all our exercises here.</p> +</aside> +<p>The <a class="reference internal" href="../utils/lxc.sh.html#lxc-searxng-env"><span class="std std-ref">SearXNG suite config</span></a> consists of several images, see <code class="docutils literal notranslate"><span class="pre">export</span> +<span class="pre">LXC_SUITE=(...</span></code> near by <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/utils/lxc-searxng.env#L19">git://utils/lxc-searxng.env#L19</a>. +For this blog post we exercise on a <a class="reference external" href="https://www.archlinux.org/">archlinux</a> image. The container of this +image is named <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code>.</p> +<p>Lets build the container, but be sure that this container does not already +exists, so first lets remove possible old one:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-2-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-2-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>remove<span class="w"> </span>searxng-archlinux +$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>build<span class="w"> </span>searxng-archlinux +</pre></div> +</div> +</div></div> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../utils/lxc.sh.html#lxc-sh-install-suite"><span class="std std-ref">Install suite</span></a></p></li> +<li><p><a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">NGINX</span></a></p></li> +</ul> +</aside> +<p>To install the complete <a class="reference internal" href="../utils/lxc.sh.html#searxng-lxc-suite"><span class="std std-ref">SearXNG suite</span></a> and the HTTP +proxy <a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">NGINX</span></a> into the archlinux container run:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-3-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-3-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>install<span class="w"> </span>suite<span class="w"> </span>searxng-archlinux +$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>--<span class="w"> </span><span class="nv">FORCE_TIMEOUT</span><span class="o">=</span><span class="m">0</span><span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>nginx +$<span class="w"> </span>sudo<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>show<span class="w"> </span>suite<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>SEARXNG_URL +... +<span class="o">[</span>searxng-archlinux<span class="o">]</span><span class="w"> </span>SEARXNG_URL<span class="w"> </span>:<span class="w"> </span>http://n.n.n.140/searxng +</pre></div> +</div> +</div></div> +<aside class="sidebar"> +<p class="sidebar-title">Fully functional SearXNG suite</p> +<p>From here on you have a fully functional SearXNG suite (including a +<a class="reference internal" href="../src/searx.redisdb.html#redis-db"><span class="std std-ref">Redis DB</span></a>).</p> +</aside> +<p>In such a SearXNG suite admins can maintain and access the debug log of the +services quite easy.</p> +<p>In the example above the SearXNG instance in the container is wrapped to +<code class="docutils literal notranslate"><span class="pre">http://n.n.n.140/searxng</span></code> to the HOST system. Note, on your HOST system, the +IP of your <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code> container is different to this example. To +test the instance in the container from outside of the container, in your WEB +browser on your desktop just open the URL reported in your installation</p> +</section> +<section id="in-containers-work-as-usual"> +<span id="working-in-containers"></span><h2><a class="toc-backref" href="#id3" role="doc-backlink">In containers, work as usual</a><a class="headerlink" href="#in-containers-work-as-usual" title="Link to this heading">¶</a></h2> +<p>Usually you open a root-bash using <code class="docutils literal notranslate"><span class="pre">sudo</span> <span class="pre">-H</span> <span class="pre">bash</span></code>. In case of LXC containers +open the root-bash in the container is done by the <code class="docutils literal notranslate"><span class="pre">./utils/lxc.sh</span> <span class="pre">cmd</span> +<span class="pre">searxng-archlinux</span></code> command:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-ZGVza3RvcCAoSE9TVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="0">desktop (HOST)</button></div><div aria-labelledby="tab-4-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" id="panel-4-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>bash +INFO:<span class="w"> </span><span class="o">[</span>searxng-archlinux<span class="o">]</span><span class="w"> </span>bash +<span class="o">[</span>root@searxng-archlinux<span class="w"> </span>SearXNG<span class="o">]</span>$ +</pre></div> +</div> +</div></div> +<p>The prompt <code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">...]</span></code> signals, that you are the root user +in the container (GUEST). To debug the running SearXNG instance use:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-5-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-5-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>inspect +... +use<span class="w"> </span><span class="o">[</span>CTRL-C<span class="o">]</span><span class="w"> </span>to<span class="w"> </span>stop<span class="w"> </span>monitoring<span class="w"> </span>the<span class="w"> </span>log +... +</pre></div> +</div> +</div><div aria-labelledby="tab-5-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>inspect +... +use<span class="w"> </span><span class="o">[</span>CTRL-C<span class="o">]</span><span class="w"> </span>to<span class="w"> </span>stop<span class="w"> </span>monitoring<span class="w"> </span>the<span class="w"> </span>log +... +</pre></div> +</div> +</div></div> +<p>Back in the browser on your desktop open the service <a class="reference external" href="http://n.n.n.140/searxng">http://n.n.n.140/searxng</a> +and run your application tests while the debug log is shown in the terminal from +above. You can stop monitoring using <code class="docutils literal notranslate"><span class="pre">CTRL-C</span></code>, this also disables the <em>“debug +option”</em> in SearXNG’s settings file and restarts the SearXNG uwsgi application.</p> +<p>Another point we have to notice is that the service <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">SearXNG</span></a> +runs under dedicated system user account with the same name (compare +<a class="reference internal" href="../admin/installation-searxng.html#create-searxng-user"><span class="std std-ref">Create user</span></a>). To get a login shell from these accounts, simply +call:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-6-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-6-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-6-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-l +<span class="o">(</span>searx-pyenv<span class="o">)</span><span class="w"> </span><span class="o">[</span>searxng@searxng-archlinux<span class="w"> </span>~<span class="o">]</span>$<span class="w"> </span><span class="nb">pwd</span> +/usr/local/searxng +</pre></div> +</div> +</div><div aria-labelledby="tab-6-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-6-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-l +INFO:<span class="w"> </span><span class="o">[</span>searxng-archlinux<span class="o">]</span><span class="w"> </span>./utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-l +<span class="o">(</span>searx-pyenv<span class="o">)</span><span class="w"> </span><span class="o">[</span>searxng@searxng-archlinux<span class="w"> </span>~<span class="o">]</span>$<span class="w"> </span><span class="nb">pwd</span> +/usr/local/searxng +</pre></div> +</div> +</div></div> +<p>The prompt <code class="docutils literal notranslate"><span class="pre">[searxng@searxng-archlinux]</span></code> signals that you are logged in as system +user <code class="docutils literal notranslate"><span class="pre">searxng</span></code> in the <code class="docutils literal notranslate"><span class="pre">searxng-archlinux</span></code> container and the python <em>virtualenv</em> +<code class="docutils literal notranslate"><span class="pre">(searxng-pyenv)</span></code> environment is activated.</p> +</section> +<section id="wrap-production-into-developer-suite"> +<h2><a class="toc-backref" href="#id4" role="doc-backlink">Wrap production into developer suite</a><a class="headerlink" href="#wrap-production-into-developer-suite" title="Link to this heading">¶</a></h2> +<p>In this section we will see how to change the <em>“Fully functional SearXNG suite”</em> +from a LXC container (which is quite ready for production) into a developer +suite. For this, we have to keep an eye on the <a class="reference internal" href="../admin/installation-searxng.html#installation-basic"><span class="std std-ref">Step by step installation</span></a>:</p> +<ul class="simple"> +<li><p>SearXNG setup in: <code class="docutils literal notranslate"><span class="pre">/etc/searxng/settings.yml</span></code></p></li> +<li><p>SearXNG user’s home: <code class="docutils literal notranslate"><span class="pre">/usr/local/searxng</span></code></p></li> +<li><p>virtualenv in: <code class="docutils literal notranslate"><span class="pre">/usr/local/searxng/searxng-pyenv</span></code></p></li> +<li><p>SearXNG software in: <code class="docutils literal notranslate"><span class="pre">/usr/local/searxng/searxng-src</span></code></p></li> +</ul> +<p>With the use of the <a class="reference internal" href="../utils/searxng.sh.html#searxng-sh"><span class="std std-ref">utils/searxng.sh</span></a> the SearXNG service was installed as +<a class="reference internal" href="../admin/installation-uwsgi.html#searxng-uwsgi"><span class="std std-ref">uWSGI application</span></a>. To maintain this service, we can use +<code class="docutils literal notranslate"><span class="pre">systemctl</span></code> (compare <a class="reference internal" href="../admin/installation-uwsgi.html#uwsgi-maintenance"><span class="std std-ref">uWSGI maintenance</span></a>).</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-7-dXdzZ2lAc2VhcnhuZw==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-7-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tab" tabindex="0"><a class="reference external" href="mailto:uwsgi%40searxng">uwsgi<span>@</span>searxng</a></button></div><div aria-labelledby="tab-7-dXdzZ2lAc2VhcnhuZw==" class="sphinx-tabs-panel group-tab" id="panel-7-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>systemctl<span class="w"> </span>stop<span class="w"> </span>uwsgi@searxng +</pre></div> +</div> +</div></div> +<p>With the command above, we stopped the SearXNG uWSGI-App in the archlinux +container.</p> +<p>The uWSGI-App for the archlinux distros is configured in +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini">git://utils/templates/etc/uwsgi/apps-archlinux/searxng.ini</a>, from where at +least you should attend the settings of <code class="docutils literal notranslate"><span class="pre">uid</span></code>, <code class="docutils literal notranslate"><span class="pre">chdir</span></code>, <code class="docutils literal notranslate"><span class="pre">env</span></code> and +<code class="docutils literal notranslate"><span class="pre">http</span></code>:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">env</span> <span class="o">=</span> <span class="n">SEARXNG_SETTINGS_PATH</span><span class="o">=/</span><span class="n">etc</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span> +<span class="n">http</span> <span class="o">=</span> <span class="mf">127.0.0.1</span><span class="p">:</span><span class="mi">8888</span> + +<span class="n">chdir</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">src</span><span class="o">/</span><span class="n">searx</span> +<span class="n">virtualenv</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">pyenv</span> +<span class="n">pythonpath</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searxng</span><span class="o">/</span><span class="n">searxng</span><span class="o">-</span><span class="n">src</span> +</pre></div> +</div> +<p>If you have read the <a class="reference internal" href="../utils/lxc.sh.html#good-to-know"><span class="std std-ref">Good to know</span></a> you remember, that each container +shares the root folder of the repository and the command <code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span> <span class="pre">cmd</span></code> +handles relative path names <strong>transparent</strong>.</p> +<p>To wrap the SearXNG installation in the container into a developer one, we +simple have to create a symlink to the <strong>transparent</strong> repository from the +desktop. Now lets replace the repository at <code class="docutils literal notranslate"><span class="pre">searxng-src</span></code> in the container +with the working tree from outside of the container:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-8-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-8-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-8-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>mv<span class="w"> </span>/usr/local/searxng/searxng-src<span class="w"> </span>/usr/local/searxng/searxng-src.old +$<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/share/SearXNG/<span class="w"> </span>/usr/local/searxng/searxng-src +</pre></div> +</div> +</div><div aria-labelledby="tab-8-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-8-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span><span class="se">\</span> +<span class="w"> </span>mv<span class="w"> </span>/usr/local/searxng/searxng-src<span class="w"> </span>/usr/local/searxng/searxng-src.old + +$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span><span class="se">\</span> +<span class="w"> </span>ln<span class="w"> </span>-s<span class="w"> </span>/share/SearXNG/<span class="w"> </span>/usr/local/searxng/searxng-src +</pre></div> +</div> +</div></div> +<p>Now we can develop as usual in the working tree of our desktop system. Every +time the software was changed, you have to restart the SearXNG service (in the +container):</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-9-dXdzZ2lAc2VhcnhuZw==" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-9-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tab" tabindex="0"><a class="reference external" href="mailto:uwsgi%40searxng">uwsgi<span>@</span>searxng</a></button></div><div aria-labelledby="tab-9-dXdzZ2lAc2VhcnhuZw==" class="sphinx-tabs-panel group-tab" id="panel-9-dXdzZ2lAc2VhcnhuZw==" name="dXdzZ2lAc2VhcnhuZw==" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng +</pre></div> +</div> +</div></div> +<p>Remember: <a class="reference internal" href="#working-in-containers"><span class="std std-ref">In containers, work as usual</span></a> .. here are just some examples from my +daily usage:</p> +<p>To <em>inspect</em> the SearXNG instance (already described above):</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-10-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-10-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-10-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searx.sh<span class="w"> </span>inspect<span class="w"> </span>service +</pre></div> +</div> +</div><div aria-labelledby="tab-10-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-10-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searx.sh<span class="w"> </span>inspect<span class="w"> </span>service +</pre></div> +</div> +</div></div> +<p>Run <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile & ./manage</span></a>, e.g. to test inside the container:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-11-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-11-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-11-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span><span class="nb">test</span> +</pre></div> +</div> +</div><div aria-labelledby="tab-11-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-11-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>make<span class="w"> </span><span class="nb">test</span> +</pre></div> +</div> +</div></div> +<p>To install all prerequisites needed for a <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>:</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-12-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-12-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-12-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>buildhost +</pre></div> +</div> +</div><div aria-labelledby="tab-12-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-12-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>buildhost +</pre></div> +</div> +</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> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">[root@searxng-archlinux</span> <span class="pre">SearXNG]</span></code> (GUEST)</button><button aria-controls="panel-13-ZGVza3RvcCAoSE9TVCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-13-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tab" tabindex="-1">desktop (HOST)</button></div><div aria-labelledby="tab-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" class="sphinx-tabs-panel group-tab" id="panel-13-YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" name="YGBbcm9vdEBzZWFyeG5nLWFyY2hsaW51eCBTZWFyWE5HXWBgIChHVUVTVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs.html +</pre></div> +</div> +</div><div aria-labelledby="tab-13-ZGVza3RvcCAoSE9TVCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-13-ZGVza3RvcCAoSE9TVCk=" name="ZGVza3RvcCAoSE9TVCk=" role="tabpanel" tabindex="0"><div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>make<span class="w"> </span>docs.html +</pre></div> +</div> +</div></div> +</section> +<section id="summary"> +<span id="lxcdev-summary"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Summary</a><a class="headerlink" href="#summary" title="Link to this heading">¶</a></h2> +<p>We build up a fully functional SearXNG suite in a archlinux container:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>build<span class="w"> </span>searxng-archlinux +$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>install<span class="w"> </span>suite<span class="w"> </span>searxng-archlinux +... +Developer<span class="w"> </span>install?<span class="w"> </span><span class="o">(</span>wraps<span class="w"> </span><span class="nb">source</span><span class="w"> </span>from<span class="w"> </span>HOST<span class="w"> </span>into<span class="w"> </span>the<span class="w"> </span>running<span class="w"> </span>instance<span class="o">)</span><span class="w"> </span><span class="o">[</span>YES/no<span class="o">]</span> +</pre></div> +</div> +<p>To wrap the suite into a developer one answer <code class="docutils literal notranslate"><span class="pre">YES</span></code> (or press Enter).</p> +<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>link SearXNG's sources to: /share/SearXNG +========================================= + +mv -f "/usr/local/searxng/searxng-src" "/usr/local/searxng/searxng-src.backup" +ln -s "/share/SearXNG" "/usr/local/searxng/searxng-src" +ls -ld /usr/local/searxng/searxng-src + |searxng| lrwxrwxrwx 1 searxng searxng ... /usr/local/searxng/searxng-src -> /share/SearXNG +</pre></div> +</div> +<p>On code modification the instance has to be restarted (see <a class="reference internal" href="../admin/installation-uwsgi.html#uwsgi-maintenance"><span class="std std-ref">uWSGI maintenance</span></a>):</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>searxng-archlinux<span class="w"> </span>systemctl<span class="w"> </span>restart<span class="w"> </span>uwsgi@searxng +</pre></div> +</div> +<p>To access HTTP from the desktop we installed nginx for the services inside the +container:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>-H<span class="w"> </span>./utils/lxc.sh<span class="w"> </span>cmd<span class="w"> </span>--<span class="w"> </span><span class="nv">FORCE_TIMEOUT</span><span class="o">=</span><span class="m">0</span><span class="w"> </span>./utils/searxng.sh<span class="w"> </span>install<span class="w"> </span>nginx +</pre></div> +</div> +<p>To get information about the SearxNG suite in the archlinux container we can +use:</p> +<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh show suite searxng-archlinux +[searxng-archlinux] INFO: (eth0) docs-live: http:///n.n.n.140:8080/ +[searxng-archlinux] INFO: (eth0) IPv6: http://[fd42:555b:2af9:e121:216:3eff:fe5b:1744] +[searxng-archlinux] uWSGI: +[searxng-archlinux] SEARXNG_UWSGI_SOCKET : /usr/local/searxng/run/socket +[searxng-archlinux] environment /usr/local/searxng/searxng-src/utils/brand.env: +[searxng-archlinux] GIT_URL : https://github.com/searxng/searxng +[searxng-archlinux] GIT_BRANCH : master +[searxng-archlinux] SEARXNG_URL : http:///n.n.n.140/searxng +[searxng-archlinux] SEARXNG_PORT : 8888 +[searxng-archlinux] SEARXNG_BIND_ADDRESS : 127.0.0.1 +</pre></div> +</div> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Developing in Linux Containers</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#motivation">Motivation</a></li> +<li class="toctree-l3"><a class="reference internal" href="#gentlemen-start-your-engines">Gentlemen, start your engines!</a></li> +<li class="toctree-l3"><a class="reference internal" href="#in-containers-work-as-usual">In containers, work as usual</a></li> +<li class="toctree-l3"><a class="reference internal" href="#wrap-production-into-developer-suite">Wrap production into developer suite</a></li> +<li class="toctree-l3"><a class="reference internal" href="#summary">Summary</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="translation.html" title="previous chapter">Translation</a> + <li>Next: <a href="makefile.html" title="next chapter">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/lxcdev.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/makefile.html b/dev/makefile.html new file mode 100644 index 000000000..d77a37dd9 --- /dev/null +++ b/dev/makefile.html @@ -0,0 +1,590 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Makefile & ./manage — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <script src="../_static/tabs.js?v=3030b3cb"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="reST primer" href="reST.html" /> + <link rel="prev" title="Developing in Linux Containers" href="lxcdev.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="reST.html" title="reST primer" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="lxcdev.html" title="Developing in Linux Containers" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="makefile-manage"> +<span id="makefile"></span><h1>Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code><a class="headerlink" href="#makefile-manage" title="Link to this heading">¶</a></h1> +<p>All relevant build and development tasks are implemented in the +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/manage">./manage</a> script and for CI or IDE integration a small +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a> wrapper is available. If you are not 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> +<aside class="sidebar"> +<p class="sidebar-title">build environment</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 (make install)</span></a>.</p> +<p>To install developer requirements follow <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>.</p> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#python-environment-make-install" id="id14">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a></p></li> +<li><p><a class="reference internal" href="#node-js-environment-make-node-env" id="id15">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a></p> +<ul> +<li><p><a class="reference internal" href="#nvm-make-nvm-install-nvm-status" id="id16">NVM <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.install</span> <span class="pre">nvm.status</span></code></a></p></li> +<li><p><a class="reference internal" href="#make-nvm-nodejs" id="id17"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#make-run" id="id18"><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-format-python" id="id19"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</span></code></a></p></li> +<li><p><a class="reference internal" href="#make-clean" id="id20"><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" id="id21"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code></a></p> +<ul> +<li><p><a class="reference internal" href="#make-docs-clean-docs-live" id="id22"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.clean</span> <span class="pre">docs.live</span></code></a></p></li> +<li><p><a class="reference internal" href="#make-docs-gh-pages" id="id23"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#make-test" id="id24"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p> +<ul> +<li><p><a class="reference internal" href="#make-test-shell" id="id25"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a></p></li> +<li><p><a class="reference internal" href="#make-test-pylint" id="id26"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#make-search-checker-engine-name" id="id27"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></p></li> +<li><p><a class="reference internal" href="#make-themes" id="id28"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a></p></li> +<li><p><a class="reference internal" href="#make-static-build" id="id29"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a></p></li> +<li><p><a class="reference internal" href="#manage-redis-help" id="id30"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a></p></li> +<li><p><a class="reference internal" href="#manage-go-help" id="id31"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a></p></li> +</ul> +</nav> +<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> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-YGBtYWtlYGA=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-YGBtYWtlYGA=" name="YGBtYWtlYGA=" role="tab" tabindex="0"><code class="docutils literal notranslate"><span class="pre">make</span></code></button><button aria-controls="panel-0-YGAuL21hbmFnZWBg" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-YGAuL21hbmFnZWBg" name="YGAuL21hbmFnZWBg" role="tab" tabindex="-1"><code class="docutils literal notranslate"><span class="pre">./manage</span></code></button></div><div aria-labelledby="tab-0-YGBtYWtlYGA=" class="sphinx-tabs-panel group-tab" id="panel-0-YGBtYWtlYGA=" name="YGBtYWtlYGA=" role="tabpanel" tabindex="0"><div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm +nvm.: use nvm (without dot) to execute nvm commands directly + install : install NVM locally at /home/runner/work/searxng/searxng/.nvm + clean : remove NVM installation + status : prompt some status information about nvm & node + nodejs : install Node.js latest LTS + cmd ... : run command ... in NVM environment + bash : start bash interpreter with NVM environment sourced +webapp.: + run : run developer instance +docs.: + html : build HTML documentation + live : autobuild HTML documentation while editing + gh-pages : deploy on gh-pages branch + prebuild : build reST include files (./build/docs/includes) + clean : clean documentation build +docker.: + build : build docker image + push : build and push docker image +gecko.driver: + download & install geckodriver if not already installed (required for + robot_tests) +redis: + build : build redis binaries at /home/runner/work/searxng/searxng/dist/redis/6.2.6/amd64 + install : create user (searxng-redis) and install systemd service (searxng-redis) + help : show more redis commands +py.: + build : Build python packages at ./dist + clean : delete virtualenv and intermediate py files +pyenv.: + install : developer install of SearXNG into virtualenv + uninstall : uninstall developer installation + cmd ... : run command ... in virtualenv + OK : test if virtualenv is OK +format.: + python : format Python code source using black +pygments.: + less : build LESS files for pygments +go.: + ls : list golang binary archives (stable) + golang : (re-) install golang binary in user's $HOME/local folder + install : install go package in user's $HOME/go-apps folder + bash : start bash interpreter with golang environment sourced +node.: + env : download & install SearXNG's npm dependencies locally + env.dev : download & install developer and CI tools + clean : drop locally npm installations +weblate.: + push.translations: push translation changes from SearXNG to Weblate's counterpart + to.translations: Update 'translations' branch with last additions from Weblate. +data.: + all : update searx/sxng_locales.py and searx/data/* + traits : update searx/data/engine_traits.json & searx/sxng_locales.py + useragents: update searx/data/useragents.json with the most recent versions of Firefox + locales : update searx/data/locales.json from babel +test.: + yamllint : lint YAML files (YAMLLINT_FILES) + pylint : lint ./searx, ./searxng_extra and ./tests + pyright : static type check of python sources + black : check black code format + unit : run unit tests + coverage : run unit tests with coverage + robot : run robot test + rst : test .rst files incl. README.rst + clean : clean intermediate test stuff +themes.: + all : build all themes + live : to get live builds of CSS & JS use 'LIVE_THEME=simple make run' + simple.: + build : build simple theme + test : test simple theme +static.build.: [build] /static + commit : build & commit /static folder + drop : drop last commit if it was previously done by static.build.commit + restore : git restore of the /static folder (after themes.all) +environment ... + SEARXNG_REDIS_URL : +---- +run - run developer instance +install - developer install of SearxNG into virtualenv +uninstall - uninstall developer installation +clean - clean up working tree +search.checker - check search engines +test - run shell & CI tests +test.shell - test shell scripts +ci.test - run CI tests +</pre></div> +</div> +</div><div aria-labelledby="tab-0-YGAuL21hbmFnZWBg" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-YGAuL21hbmFnZWBg" name="YGAuL21hbmFnZWBg" role="tabpanel" tabindex="0"><p>The Makefile targets are implemented for comfort, if you can do without +tab-completion and need to have a more granular control, use +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/manage">git://manage</a> without the Makefile wrappers.</p> +<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>./manage<span class="w"> </span><span class="nb">help</span> +</pre></div> +</div> +</div></div> +<section id="python-environment-make-install"> +<span id="make-install"></span><h2><a class="toc-backref" href="#id14" role="doc-backlink">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a><a class="headerlink" href="#python-environment-make-install" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<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> +</aside> +<p>We do no longer need to build up the virtualenv manually. Jump into your git +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 +<em>developer install</em> of SearXNG (<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/setup.py">git://setup.py</a>).</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd ~/searxng-clone +$ make install +PYENV [virtualenv] installing ./requirements*.txt into local/py3 +... +PYENV [install] pip install --use-pep517 --no-build-isolation -e 'searx[test]' +... +Successfully installed searxng-2023.7.19+a446dea1b +</pre></div> +</div> +<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 +rebuild if the sha256 sum of the <em>requirement files</em> fails. With other words: +the check fails if you edit the requirements listed in +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/requirements.txt">git://requirements.txt</a>).</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make install +PYENV OK +PYENV [virtualenv] requirements.sha256 failed + [virtualenv] - 6cea6eb6def9e14a18bf32f8a3e... ./requirements-dev.txt + [virtualenv] - 471efef6c73558e391c3adb35f4... ./requirements.txt +... +PYENV [virtualenv] installing ./requirements*.txt into local/py3 +... +PYENV [install] pip install --use-pep517 --no-build-isolation -e 'searx[test]' +... +Successfully installed searxng-2023.7.19+a446dea1b +</pre></div> +</div> +<aside class="sidebar"> +<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> +</aside> +<p>If you think, something goes wrong with your ./local environment or you change +the <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/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> +</section> +<section id="node-js-environment-make-node-env"> +<span id="make-node-env"></span><h2><a class="toc-backref" href="#id15" role="doc-backlink">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a><a class="headerlink" href="#node-js-environment-make-node-env" title="Link to this heading">¶</a></h2> +<p><a class="reference external" href="https://nodejs.org/">Node.js</a> version 16.13.0 or higher is required to build the themes. +If the requirement is not met, the build chain uses <a class="reference external" href="https://github.com/nvm-sh">nvm</a> (Node Version +Manager) to install latest LTS of <a class="reference external" href="https://nodejs.org/">Node.js</a> locally: there is no need to +install <a class="reference external" href="https://github.com/nvm-sh">nvm</a> or <a class="reference external" href="https://www.npmjs.com/">npm</a> on your system.</p> +<p>To install <a class="reference external" href="https://github.com/nvm-sh">NVM</a> and <a class="reference external" href="https://nodejs.org/">Node.js</a> in once you can use <a class="reference internal" href="#make-nvm-nodejs"><span class="std std-ref">make nvm.nodejs</span></a>.</p> +<section id="nvm-make-nvm-install-nvm-status"> +<span id="make-nvm"></span><h3><a class="toc-backref" href="#id16" role="doc-backlink">NVM <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.install</span> <span class="pre">nvm.status</span></code></a><a class="headerlink" href="#nvm-make-nvm-install-nvm-status" title="Link to this heading">¶</a></h3> +<p>Use <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.status</span></code> to get the current status of your <a class="reference external" href="https://nodejs.org/">Node.js</a> and <a class="reference external" href="https://github.com/nvm-sh">nvm</a> +setup.</p> +<div class="sphinx-tabs docutils container"> +<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-bnZtLmluc3RhbGw=" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-bnZtLmluc3RhbGw=" name="bnZtLmluc3RhbGw=" role="tab" tabindex="0">nvm.install</button><button aria-controls="panel-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" name="bnZtLnN0YXR1cyAodWJ1MjAwNCk=" role="tab" tabindex="-1">nvm.status (ubu2004)</button></div><div aria-labelledby="tab-1-bnZtLmluc3RhbGw=" class="sphinx-tabs-panel group-tab" id="panel-1-bnZtLmluc3RhbGw=" name="bnZtLmluc3RhbGw=" role="tabpanel" tabindex="0"><div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nv">LANG</span><span class="o">=</span>C<span class="w"> </span>make<span class="w"> </span>nvm.install +INFO:<span class="w"> </span>install<span class="w"> </span><span class="o">(</span>update<span class="o">)</span><span class="w"> </span>NVM<span class="w"> </span>at<span class="w"> </span>./searxng/.nvm +INFO:<span class="w"> </span>clone:<span class="w"> </span>https://github.com/nvm-sh/nvm.git +<span class="w"> </span><span class="o">||</span><span class="w"> </span>Cloning<span class="w"> </span>into<span class="w"> </span><span class="s1">'./searxng/.nvm'</span>... +INFO:<span class="w"> </span>checkout<span class="w"> </span>v0.39.4 +<span class="w"> </span><span class="o">||</span><span class="w"> </span>HEAD<span class="w"> </span>is<span class="w"> </span>now<span class="w"> </span>at<span class="w"> </span>8fbf8ab<span class="w"> </span>v0.39.4 +</pre></div> +</div> +</div><div aria-labelledby="tab-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-bnZtLnN0YXR1cyAodWJ1MjAwNCk=" name="bnZtLnN0YXR1cyAodWJ1MjAwNCk=" role="tabpanel" tabindex="0"><p>Here is the output you will typically get on a Ubuntu 20.04 system which +serves only a <a class="reference external" href="https://nodejs.org/en/about/releases/">no longer active</a> +Release <a class="reference external" href="https://packages.ubuntu.com/focal/nodejs">Node.js v10.19.0</a>.</p> +<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>nvm.status +INFO:<span class="w"> </span>Node.js<span class="w"> </span>is<span class="w"> </span>installed<span class="w"> </span>at<span class="w"> </span>/usr/bin/node +INFO:<span class="w"> </span>Node.js<span class="w"> </span>is<span class="w"> </span>version<span class="w"> </span>v10.19.0 +WARN:<span class="w"> </span>minimal<span class="w"> </span>Node.js<span class="w"> </span>version<span class="w"> </span>is<span class="w"> </span><span class="m">16</span>.13.0 +INFO:<span class="w"> </span>npm<span class="w"> </span>is<span class="w"> </span>installed<span class="w"> </span>at<span class="w"> </span>/usr/bin/npm +INFO:<span class="w"> </span>npm<span class="w"> </span>is<span class="w"> </span>version<span class="w"> </span><span class="m">6</span>.14.4 +WARN:<span class="w"> </span>NVM<span class="w"> </span>is<span class="w"> </span>not<span class="w"> </span>installed +</pre></div> +</div> +</div></div> +</section> +<section id="make-nvm-nodejs"> +<span id="id1"></span><h3><a class="toc-backref" href="#id17" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a><a class="headerlink" href="#make-nvm-nodejs" title="Link to this heading">¶</a></h3> +<p>Install latest <a class="reference external" href="https://nodejs.org/">Node.js</a> LTS locally (uses <a class="reference external" href="https://github.com/nvm-sh">nvm</a>):</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make nvm.nodejs +INFO: install (update) NVM at /share/searxng/.nvm +INFO: clone: https://github.com/nvm-sh/nvm.git +... +Downloading and installing node v16.13.0... +... +INFO: Node.js is installed at searxng/.nvm/versions/node/v16.13.0/bin/node +INFO: Node.js is version v16.13.0 +INFO: npm is installed at searxng/.nvm/versions/node/v16.13.0/bin/npm +INFO: npm is version 8.1.0 +INFO: NVM is installed at searxng/.nvm +</pre></div> +</div> +</section> +</section> +<section id="make-run"> +<span id="id2"></span><h2><a class="toc-backref" href="#id18" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Link to this heading">¶</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 +<em>debug</em> option in <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/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 and opens the URL in your favorite WEB browser (<a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=xdg-open">xdg-open</a>):</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make run +</pre></div> +</div> +<p>Changes to theme’s HTML templates (jinja2) are instant. Changes to the CSS & JS +sources of the theme need to be rebuild. You can do that by running:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make themes.all +</pre></div> +</div> +<p>Alternatively to <code class="docutils literal notranslate"><span class="pre">themes.all</span></code> you can run <em>live builds</em> of the theme you are +modify (<a class="reference internal" href="#make-themes"><span class="std std-ref">make themes.*</span></a>):</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ LIVE_THEME=simple make run +</pre></div> +</div> +</section> +<section id="make-format-python"> +<span id="id3"></span><h2><a class="toc-backref" href="#id19" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</span></code></a><a class="headerlink" href="#make-format-python" title="Link to this heading">¶</a></h2> +<p>Format Python source code using <a class="reference external" href="https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html">Black code style</a>. See <code class="docutils literal notranslate"><span class="pre">$BLACK_OPTIONS</span></code> +and <code class="docutils literal notranslate"><span class="pre">$BLACK_TARGETS</span></code> in <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a>.</p> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>We stuck at Black 22.12.0, please read comment in PR <a class="reference external" href="https://github.com/searxng/searxng/pull/2159#pullrequestreview-1284094735">Bump black from 22.12.0 +to 23.1.0</a></p> +</div> +</section> +<section id="make-clean"> +<span id="id4"></span><h2><a class="toc-backref" href="#id20" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Link to this heading">¶</a></h2> +<p>Drops all intermediate files, all builds, but keep sources untouched. Before +calling <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code> stop all processes using the <a class="reference internal" href="#make-install"><span class="std std-ref">Python environment (make install)</span></a> or +<a class="reference internal" href="#make-node-env"><span class="std std-ref">Node.js environment (make node.env)</span></a>.</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make clean +CLEAN pyenv +PYENV [virtualenv] drop local/py3 +CLEAN docs -- build/docs dist/docs +CLEAN themes -- locally installed npm dependencies +... +CLEAN test stuff +CLEAN common files +</pre></div> +</div> +</section> +<section id="make-docs"> +<span id="id5"></span><h2><a class="toc-backref" href="#id21" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code></a><a class="headerlink" href="#make-docs" title="Link to this heading">¶</a></h2> +<p>Target <code class="docutils literal notranslate"><span class="pre">docs</span></code> builds the documentation:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>make<span class="w"> </span>docs +HTML<span class="w"> </span>./docs<span class="w"> </span>--><span class="w"> </span>file:// +DOCS<span class="w"> </span>build<span class="w"> </span>build/docs/includes +... +The<span class="w"> </span>HTML<span class="w"> </span>pages<span class="w"> </span>are<span class="w"> </span><span class="k">in</span><span class="w"> </span>dist/docs. +</pre></div> +</div> +<section id="make-docs-clean-docs-live"> +<span id="make-docs-clean"></span><h3><a class="toc-backref" href="#id22" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.clean</span> <span class="pre">docs.live</span></code></a><a class="headerlink" href="#make-docs-clean-docs-live" title="Link to this heading">¶</a></h3> +<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 +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/settings_brand.html#settings-brand"><span class="std std-ref">brand:</span></a>.</p> +</section> +<section id="make-docs-gh-pages"> +<span id="id6"></span><h3><a class="toc-backref" href="#id23" role="doc-backlink"><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="Link to this heading">¶</a></h3> +<p>To deploy on github.io first adjust your <a class="reference internal" href="../admin/settings/settings_brand.html#settings-brand"><span class="std std-ref">brand:</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> +</section> +</section> +<section id="make-test"> +<span id="id7"></span><h2><a class="toc-backref" href="#id24" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Link to this heading">¶</a></h2> +<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> +and <code class="docutils literal notranslate"><span class="pre">test.robot</span></code>. You can run tests selective, e.g.:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit test.shell +TEST test.pep8 OK +... +TEST test.unit OK +... +TEST test.shell OK +</pre></div> +</div> +<section id="make-test-shell"> +<span id="id8"></span><h3><a class="toc-backref" href="#id25" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a><a class="headerlink" href="#make-test-shell" title="Link to this heading">¶</a></h3> +<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 +commit.</p> +</section> +<section id="make-test-pylint"> +<span id="id9"></span><h3><a class="toc-backref" href="#id26" role="doc-backlink"><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="Link to this heading">¶</a></h3> +<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 +Python programming language. The pylint profile used in the SearXNG project is +found in project’s root folder <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/.pylintrc">git://.pylintrc</a>.</p> +</section> +</section> +<section id="make-search-checker-engine-name"> +<span id="make-search-checker"></span><h2><a class="toc-backref" href="#id27" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a><a class="headerlink" href="#make-search-checker-engine-name" title="Link to this heading">¶</a></h2> +<p>To check all engines:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span> +</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-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span> +</pre></div> +</div> +<p>To see HTTP requests and more use SEARXNG_DEBUG:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">SEARXNG_DEBUG</span><span class="o">=</span><span class="mi">1</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span> +</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-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">SEARXNG_DEBUG</span><span class="o">=</span><span class="mi">1</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span> <span class="o">|</span> <span class="n">grep</span> <span class="o">-</span><span class="n">A1</span> <span class="s2">"HTTP/1.1</span><span class="se">\"</span><span class="s2"> 3[0-9][0-9]"</span> +<span class="o">...</span> +<span class="n">Engine</span> <span class="n">google</span> <span class="n">news</span> <span class="n">Checking</span> +<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=life&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1"</span> <span class="mi">302</span> <span class="mi">0</span> +<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=life&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1"</span> <span class="mi">200</span> <span class="kc">None</span> +<span class="o">--</span> +<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=computer&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1"</span> <span class="mi">302</span> <span class="mi">0</span> +<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=computer&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1"</span> <span class="mi">200</span> <span class="kc">None</span> +<span class="o">--</span> +</pre></div> +</div> +</section> +<section id="make-themes"> +<span id="id10"></span><h2><a class="toc-backref" href="#id28" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a><a class="headerlink" href="#make-themes" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a></p></li> +</ul> +</aside> +<p>The <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a> targets <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">theme.*</span></code> cover common tasks to build the +theme(s). The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">themes.*</span></code> command line can be used to convenient run +common theme build tasks.</p> +<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm +themes.: + all : build all themes + live : to get live builds of CSS & JS use 'LIVE_THEME=simple make run' + simple.: + build : build simple theme + test : test simple theme +</pre></div> +</div> +<p>To get live builds while modifying CSS & JS use (<a class="reference internal" href="#make-run"><span class="std std-ref">make run</span></a>):</p> +<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nv">LIVE_THEME</span><span class="o">=</span>simple<span class="w"> </span>make<span class="w"> </span>run +</pre></div> +</div> +</section> +<section id="make-static-build"> +<span id="id11"></span><h2><a class="toc-backref" href="#id29" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a><a class="headerlink" href="#make-static-build" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a></p></li> +</ul> +</aside> +<p>The <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/Makefile">git://Makefile</a> targets <code class="docutils literal notranslate"><span class="pre">static.build.*</span></code> cover common tasks to build (a +commit of) the static files. The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">static.build..*</span></code> command line +can be used to convenient run common build tasks of the static files.</p> +<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm +static.build.: [build] /static + commit : build & commit /static folder + drop : drop last commit if it was previously done by static.build.commit + restore : git restore of the /static folder (after themes.all) +</pre></div> +</div> +</section> +<section id="manage-redis-help"> +<span id="id12"></span><h2><a class="toc-backref" href="#id30" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a><a class="headerlink" href="#manage-redis-help" title="Link to this heading">¶</a></h2> +<p>The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.*</span></code> command line can be used to convenient run common Redis +tasks (<a class="reference internal" href="../admin/settings/settings_redis.html#redis-developer-notes"><span class="std std-ref">Redis Developer Notes</span></a>).</p> +<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm +redis.: + devpkg : install essential packages to compile redis + build : build redis binaries at /home/runner/work/searxng/searxng/dist/redis/6.2.6/amd64 + install : create user (searxng-redis) and install systemd service (searxng-redis) + remove : delete user (searxng-redis) and remove service (searxng-redis) + shell : start bash interpreter from user searxng-redis + src : clone redis source code to <path> and checkput 6.2.6 + useradd : create user (searxng-redis) at /usr/local/searxng-redis + userdel : delete user (searxng-redis) + addgrp : add <user> to group (searxng-redis) + rmgrp : remove <user> from group (searxng-redis) +</pre></div> +</div> +</section> +<section id="manage-go-help"> +<span id="id13"></span><h2><a class="toc-backref" href="#id31" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a><a class="headerlink" href="#manage-go-help" title="Link to this heading">¶</a></h2> +<p>The <code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.*</span></code> command line can be used to convenient run common <a class="reference external" href="https://en.wikipedia.org/wiki/Go_(programming_language)">go +(wiki)</a> tasks.</p> +<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm +go.: + ls : list golang binary archives (stable) + golang : (re-) install golang binary in user's $HOME/local folder + install : install go package in user's $HOME/go-apps folder + bash : start bash interpreter with golang environment sourced +</pre></div> +</div> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="#python-environment-make-install">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a></li> +<li class="toctree-l3"><a class="reference internal" href="#node-js-environment-make-node-env">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#nvm-make-nvm-install-nvm-status">NVM <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.install</span> <span class="pre">nvm.status</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#make-nvm-nodejs"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#make-run"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#make-format-python"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">format.python</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#make-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#make-docs"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code></a><ul> +<li class="toctree-l4"><a class="reference internal" href="#make-docs-clean-docs-live"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.clean</span> <span class="pre">docs.live</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#make-docs-gh-pages"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#make-test"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><ul> +<li class="toctree-l4"><a class="reference internal" href="#make-test-shell"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#make-test-pylint"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#make-search-checker-engine-name"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#make-themes"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.*</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#make-static-build"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">static.build.*</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#manage-redis-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">redis.help</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="#manage-go-help"><code class="docutils literal notranslate"><span class="pre">./manage</span> <span class="pre">go.help</span></code></a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="lxcdev.html" title="previous chapter">Developing in Linux Containers</a> + <li>Next: <a href="reST.html" title="next chapter">reST primer</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/makefile.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/plugins.html b/dev/plugins.html new file mode 100644 index 000000000..ba9949b45 --- /dev/null +++ b/dev/plugins.html @@ -0,0 +1,262 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Plugins — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Translation" href="translation.html" /> + <link rel="prev" title="Search API" href="search_api.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="translation.html" title="Translation" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="search_api.html" title="Search API" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Plugins</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="plugins"> +<span id="dev-plugin"></span><h1>Plugins<a class="headerlink" href="#plugins" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">Further reading ..</p> +<ul class="simple"> +<li><p><a class="reference internal" href="../admin/plugins.html#plugins-generic"><span class="std std-ref">Plugins builtin</span></a></p></li> +</ul> +</aside> +<p>Plugins can extend or replace functionality of various components of searx.</p> +<section id="example-plugin"> +<h2>Example plugin<a class="headerlink" href="#example-plugin" title="Link to this heading">¶</a></h2> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">name</span> <span class="o">=</span> <span class="s1">'Example plugin'</span> +<span class="n">description</span> <span class="o">=</span> <span class="s1">'This plugin extends the suggestions with the word "example"'</span> +<span class="n">default_on</span> <span class="o">=</span> <span class="kc">False</span> <span class="c1"># disabled by default</span> + +<span class="c1"># attach callback to the post search hook</span> +<span class="c1"># request: flask request object</span> +<span class="c1"># ctx: the whole local context of the post search hook</span> +<span class="k">def</span> <span class="nf">post_search</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">search</span><span class="p">):</span> + <span class="n">search</span><span class="o">.</span><span class="n">result_container</span><span class="o">.</span><span class="n">suggestions</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s1">'example'</span><span class="p">)</span> + <span class="k">return</span> <span class="kc">True</span> +</pre></div> +</div> +</section> +<section id="external-plugins"> +<h2>External plugins<a class="headerlink" href="#external-plugins" title="Link to this heading">¶</a></h2> +<p>SearXNG supports <em>external plugins</em> / there is no need to install one, SearXNG +runs out of the box. But to demonstrate; in the example below we install the +SearXNG plugins from <em>The Green Web Foundation</em> <a class="reference external" href="https://www.thegreenwebfoundation.org/news/searching-the-green-web-with-searx/">[ref]</a>:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>utils/searxng.sh<span class="w"> </span>instance<span class="w"> </span>cmd<span class="w"> </span>bash<span class="w"> </span>-c +<span class="o">(</span>searxng-pyenv<span class="o">)</span>$<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>git+https://github.com/return42/tgwf-searx-plugins +</pre></div> +</div> +<p>In the <a class="reference internal" href="../admin/settings/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a> activate the <code class="docutils literal notranslate"><span class="pre">plugins:</span></code> section and add module +<code class="docutils literal notranslate"><span class="pre">only_show_green_results</span></code> from <code class="docutils literal notranslate"><span class="pre">tgwf-searx-plugins</span></code>.</p> +<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">plugins</span><span class="p">:</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">- only_show_green_results</span> +<span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span> +</pre></div> +</div> +</section> +<section id="plugin-entry-points"> +<h2>Plugin entry points<a class="headerlink" href="#plugin-entry-points" title="Link to this heading">¶</a></h2> +<p>Entry points (hooks) define when a plugin runs. Right now only three hooks are +implemented. So feel free to implement a hook if it fits the behaviour of your +plugin. A plugin doesn’t need to implement all the hooks.</p> +<dl class="py function"> +<dt class="sig sig-object py" id="pre_search"> +<span class="sig-name descname"><span class="pre">pre_search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></span></span><a class="headerlink" href="#pre_search" title="Link to this definition">¶</a></dt> +<dd><p>Runs BEFORE the search request.</p> +<p><cite>search.result_container</cite> can be changed.</p> +<p>Return a boolean:</p> +<ul class="simple"> +<li><p>True to continue the search</p></li> +<li><p>False to stop the search</p></li> +</ul> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>request</strong> (<em>flask.request</em>)</p></li> +<li><p><strong>search</strong> (<a class="reference internal" href="../src/searx.search.html#searx.search.SearchWithPlugins" title="searx.search.SearchWithPlugins"><em>searx.search.SearchWithPlugins</em></a>)</p></li> +</ul> +</dd> +<dt class="field-even">Returns<span class="colon">:</span></dt> +<dd class="field-even"><p>False to stop the search</p> +</dd> +<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)">bool</a></p> +</dd> +</dl> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="post_search"> +<span class="sig-name descname"><span class="pre">post_search</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="headerlink" href="#post_search" title="Link to this definition">¶</a></dt> +<dd><p>Runs AFTER the search request.</p> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>request</strong> (<em>flask.request</em>) – Flask request.</p></li> +<li><p><strong>search</strong> (<a class="reference internal" href="../src/searx.search.html#searx.search.SearchWithPlugins" title="searx.search.SearchWithPlugins"><em>searx.search.SearchWithPlugins</em></a>) – Context.</p></li> +</ul> +</dd> +</dl> +</dd></dl> + +<dl class="py function"> +<dt class="sig sig-object py" id="on_result"> +<span class="sig-name descname"><span class="pre">on_result</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">result</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></span></span><a class="headerlink" href="#on_result" title="Link to this definition">¶</a></dt> +<dd><p>Runs for each result of each engine.</p> +<p><cite>result</cite> can be changed.</p> +<p>If <cite>result[“url”]</cite> is defined, then <cite>result[“parsed_url”] = urlparse(result[‘url’])</cite></p> +<div class="admonition warning"> +<p class="admonition-title">Warning</p> +<p><cite>result[“url”]</cite> can be changed, but <cite>result[“parsed_url”]</cite> must be updated too.</p> +</div> +<p>Return a boolean:</p> +<ul class="simple"> +<li><p>True to keep the result</p></li> +<li><p>False to remove the result</p></li> +</ul> +<dl class="field-list simple"> +<dt class="field-odd">Parameters<span class="colon">:</span></dt> +<dd class="field-odd"><ul class="simple"> +<li><p><strong>request</strong> (<em>flask.request</em>)</p></li> +<li><p><strong>search</strong> (<a class="reference internal" href="../src/searx.search.html#searx.search.SearchWithPlugins" title="searx.search.SearchWithPlugins"><em>searx.search.SearchWithPlugins</em></a>)</p></li> +<li><p><strong>result</strong> (<a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Dict" title="(in Python v3.13)"><em>Dict</em></a>) – Result, see - <a class="reference internal" href="engines/engine_overview.html#engine-results"><span class="std std-ref">Result Types (template)</span></a></p></li> +</ul> +</dd> +<dt class="field-even">Returns<span class="colon">:</span></dt> +<dd class="field-even"><p>True to keep the result</p> +</dd> +<dt class="field-odd">Return type<span class="colon">:</span></dt> +<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)">bool</a></p> +</dd> +</dl> +</dd></dl> + +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Plugins</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#example-plugin">Example plugin</a></li> +<li class="toctree-l3"><a class="reference internal" href="#external-plugins">External plugins</a></li> +<li class="toctree-l3"><a class="reference internal" href="#plugin-entry-points">Plugin entry points</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#pre_search"><code class="docutils literal notranslate"><span class="pre">pre_search()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#post_search"><code class="docutils literal notranslate"><span class="pre">post_search()</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#on_result"><code class="docutils literal notranslate"><span class="pre">on_result()</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="search_api.html" title="previous chapter">Search API</a> + <li>Next: <a href="translation.html" title="next chapter">Translation</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/plugins.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/quickstart.html b/dev/quickstart.html new file mode 100644 index 000000000..23e22476a --- /dev/null +++ b/dev/quickstart.html @@ -0,0 +1,198 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Development Quickstart — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Runtime Management" href="rtm_asdf.html" /> + <link rel="prev" title="Developer documentation" href="index.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="rtm_asdf.html" title="Runtime Management" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="Developer documentation" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Development Quickstart</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="development-quickstart"> +<span id="devquickstart"></span><h1>Development Quickstart<a class="headerlink" href="#development-quickstart" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">Makefile & ./manage</span></a></p></li> +<li><p><a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a></p></li> +</ul> +</aside> +<p>SearXNG loves developers; Developers do not need to worry about tool chains, the +usual developer tasks can be comfortably executed via <a class="reference internal" href="makefile.html#makefile"><span class="std std-ref">make</span></a>.</p> +<p>Don’t hesitate, just clone SearXNG’s sources and start hacking right now ..</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/searxng/searxng.git<span class="w"> </span>searxng +</pre></div> +</div> +<p>Here is how a minimal workflow looks like:</p> +<ol class="arabic simple"> +<li><p><em>start</em> hacking</p></li> +<li><p><em>run</em> your code: <a class="reference internal" href="makefile.html#make-run"><span class="std std-ref">make run</span></a></p></li> +<li><p><em>format & test</em> your code: <a class="reference internal" href="makefile.html#make-format-python"><span class="std std-ref">make format.python</span></a> and <a class="reference internal" href="makefile.html#make-test"><span class="std std-ref">make test</span></a></p></li> +</ol> +<p>If you think at some point something fails, go back to <em>start</em>. Otherwise, +choose a meaningful commit message and we are happy to receive your pull +request. To not end in <em>wild west</em> we have some directives, please pay attention +to our “<a class="reference internal" href="contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>” guideline.</p> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference internal" href="makefile.html#make-nvm"><span class="std std-ref">NVM make nvm.install nvm.status</span></a></p></li> +<li><p><a class="reference internal" href="makefile.html#make-themes"><span class="std std-ref">make themes.*</span></a></p></li> +</ul> +</aside> +<p>If you implement themes, you will need to setup a <a class="reference internal" href="makefile.html#make-node-env"><span class="std std-ref">Node.js environment</span></a>: <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code></p> +<p>Before you call <em>make run</em> (2.), you need to compile the modified styles and +JavaScript: <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">themes.all</span></code></p> +<p>Alternatively you can also compile selective the theme you have modified, +e.g. the <em>simple</em> theme.</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>themes.simple +</pre></div> +</div> +<div class="admonition tip"> +<p class="admonition-title">Tip</p> +<p>To get live builds while modifying CSS & JS use: <code class="docutils literal notranslate"><span class="pre">LIVE_THEME=simple</span> <span class="pre">make</span> <span class="pre">run</span></code></p> +</div> +<aside class="sidebar"> +<p class="sidebar-title">further read</p> +<ul class="simple"> +<li><p><a class="reference internal" href="makefile.html#make-static-build"><span class="std std-ref">make static.build.*</span></a></p></li> +</ul> +</aside> +<p>If you finished your <em>tests</em> you can start to commit your changes. To separate +the modified source code from the build products first run:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>static.build.restore +</pre></div> +</div> +<p>This will restore the old build products and only your changes of the code +remain in the working tree which can now be added & committed. When all sources +are committed, you can commit the build products simply by:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>static.build.commit +</pre></div> +</div> +<p>Committing the build products should be the last step, just before you send us +your PR. There is also a make target to rewind this last build commit:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>static.build.drop +</pre></div> +</div> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="index.html" title="previous chapter">Developer documentation</a> + <li>Next: <a href="rtm_asdf.html" title="next chapter">Runtime Management</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/quickstart.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/reST.html b/dev/reST.html new file mode 100644 index 000000000..19714f5ed --- /dev/null +++ b/dev/reST.html @@ -0,0 +1,1749 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>reST primer — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Tooling box searxng_extra" href="searxng_extra/index.html" /> + <link rel="prev" title="Makefile & ./manage" href="makefile.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="searxng_extra/index.html" title="Tooling box searxng_extra" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="makefile.html" title="Makefile & ./manage" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">reST primer</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="rest-primer"> +<span id="id1"></span><h1>reST primer<a class="headerlink" href="#rest-primer" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title"><a class="reference external" href="https://en.wikipedia.org/wiki/KISS_principle">KISS</a> and <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a></p> +<p>Instead of defining more and more roles, we at SearXNG encourage our +contributors to follow principles like <a class="reference external" href="https://en.wikipedia.org/wiki/KISS_principle">KISS</a> and <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a>.</p> +</aside> +<p>We at SearXNG are using reStructuredText (aka <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a>) markup for all kind of +documentation. With the builders from the <a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a> project a HTML output is +generated and deployed at <a class="reference external" href="https://docs.searxng.org/">docs.searxng.org</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> +<p>The source files of SearXNG’s documentation are located at <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs">git://docs</a>. +Sphinx assumes source files to be encoded in UTF-8 by default. 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> +<aside class="sidebar"> +<p class="sidebar-title">Further reading</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html">Sphinx-Primer</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/markup/index.html">Sphinx markup constructs</a></p></li> +<li><p><a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a>, <a class="reference external" href="http://docutils.sourceforge.net/docs/index.html">docutils</a>, <a class="reference external" href="http://docutils.sourceforge.net/FAQ.html">docutils FAQ</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a>, <a class="reference external" href="https://www.sphinx-doc.org/en/stable/faq.html">sphinx-doc FAQ</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/config.html">sphinx config</a>, <a class="reference external" href="https://www.sphinx-doc.org/en/master/extdev/tutorial.html?highlight=doctree#build-phases">doctree</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/markup/inline.html#cross-referencing-arbitrary-locations">sphinx cross references</a></p></li> +<li><p><a class="reference external" href="https://return42.github.io/linuxdoc">linuxdoc</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></p></li> +<li><p><a class="reference external" href="https://github.com/tardyp/sphinx-jinja">sphinx-jinja</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/autodoc.html">Sphinx’s autodoc</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/domains.html#the-python-domain">Sphinx’s Python domain</a>, <a class="reference external" href="https://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-c-constructs">Sphinx’s C domain</a></p></li> +<li><p><a class="reference external" href="https://www.w3.org/TR/SVG11/expanded-toc.html">SVG</a>, <a class="reference external" href="https://www.imagemagick.org">ImageMagick</a></p></li> +<li><p><a class="reference external" href="https://graphviz.gitlab.io/_pages/doc/info/lang.html">DOT</a>, <a class="reference external" href="https://graphviz.gitlab.io/_pages/pdf/dotguide.pdf">Graphviz’s dot</a>, <a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li> +</ul> +</aside> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#soft-skills" id="id15">Soft skills</a></p></li> +<li><p><a class="reference internal" href="#basic-inline-markup" id="id16">Basic inline markup</a></p></li> +<li><p><a class="reference internal" href="#basic-article-structure" id="id17">Basic article structure</a></p> +<ul> +<li><p><a class="reference internal" href="#rest-template" id="id18">reST template</a></p></li> +<li><p><a class="reference internal" href="#headings" id="id19">Headings</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#anchors-links" id="id20">Anchors & Links</a></p> +<ul> +<li><p><a class="reference internal" href="#anchors" id="id21">Anchors</a></p></li> +<li><p><a class="reference internal" href="#link-ordinary-url" id="id22">Link ordinary URL</a></p></li> +<li><p><a class="reference internal" href="#smart-refs" id="id23">Smart refs</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#literal-blocks" id="id24">Literal blocks</a></p> +<ul> +<li><p><a class="reference internal" href="#rest-literal" id="id25"><code class="docutils literal notranslate"><span class="pre">::</span></code></a></p></li> +<li><p><a class="reference internal" href="#code-block" id="id26"><code class="docutils literal notranslate"><span class="pre">code-block</span></code></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#unicode-substitution" id="id27">Unicode substitution</a></p></li> +<li><p><a class="reference internal" href="#roles" id="id28">Roles</a></p></li> +<li><p><a class="reference internal" href="#figures-images" id="id29">Figures & Images</a></p> +<ul> +<li><p><a class="reference internal" href="#dot-files-aka-graphviz" id="id30">DOT files (aka Graphviz)</a></p></li> +<li><p><a class="reference internal" href="#kernel-render-dot" id="id31"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> DOT</a></p></li> +<li><p><a class="reference internal" href="#kernel-render-svg" id="id32"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> SVG</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#list-markups" id="id33">List markups</a></p> +<ul> +<li><p><a class="reference internal" href="#bullet-list" id="id34">Bullet list</a></p></li> +<li><p><a class="reference internal" href="#horizontal-list" id="id35">Horizontal list</a></p></li> +<li><p><a class="reference internal" href="#definition-list" id="id36">Definition list</a></p></li> +<li><p><a class="reference internal" href="#quoted-paragraphs" id="id37">Quoted paragraphs</a></p></li> +<li><p><a class="reference internal" href="#field-lists" id="id38">Field Lists</a></p></li> +<li><p><a class="reference internal" href="#further-list-blocks" id="id39">Further list blocks</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#admonitions" id="id40">Admonitions</a></p> +<ul> +<li><p><a class="reference internal" href="#sidebar" id="id41">Sidebar</a></p></li> +<li><p><a class="reference internal" href="#generic-admonition" id="id42">Generic admonition</a></p></li> +<li><p><a class="reference internal" href="#specific-admonitions" id="id43">Specific admonitions</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#tables" id="id44">Tables</a></p> +<ul> +<li><p><a class="reference internal" href="#simple-tables" id="id45">Simple tables</a></p></li> +<li><p><a class="reference internal" href="#grid-tables" id="id46">Grid tables</a></p></li> +<li><p><a class="reference internal" href="#flat-table" id="id47">flat-table</a></p></li> +<li><p><a class="reference internal" href="#csv-table" id="id48">CSV table</a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#templating" id="id49">Templating</a></p></li> +<li><p><a class="reference internal" href="#tabbed-views" id="id50">Tabbed views</a></p></li> +<li><p><a class="reference internal" href="#math-equations" id="id51">Math equations</a></p></li> +</ul> +</nav> +<p><a class="reference external" href="https://www.sphinx-doc.org">Sphinx</a> and <a class="reference external" href="https://docutils.sourceforge.io/rst.html">reST</a> have their place in the python ecosystem. Over that reST is +used in popular projects, e.g the Linux kernel documentation <a class="reference external" href="https://www.kernel.org/doc/html/latest/doc-guide/sphinx.html">[kernel doc]</a>.</p> +<aside class="sidebar"> +<p class="sidebar-title">Content matters</p> +<p>The <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a> of the reST sources has its value, therefore we recommend to +make sparse usage of reST markup / .. content matters!</p> +</aside> +<p><strong>reST</strong> is a plaintext markup language, its markup is <em>mostly</em> intuitive and +you will not need to learn much to produce well formed articles with. I use the +word <em>mostly</em>: like everything in live, reST has its advantages and +disadvantages, some markups feel a bit grumpy (especially if you are used to +other plaintext markups).</p> +<section id="soft-skills"> +<h2><a class="toc-backref" href="#id15" role="doc-backlink">Soft skills</a><a class="headerlink" href="#soft-skills" title="Link to this heading">¶</a></h2> +<p>Before going any deeper into the markup let’s face on some <strong>soft skills</strong> a +trained author brings with, to reach a well feedback from readers:</p> +<ul class="simple"> +<li><p>Documentation is dedicated to an audience and answers questions from the +audience point of view.</p></li> +<li><p>Don’t detail things which are general knowledge from the audience point of +view.</p></li> +<li><p>Limit the subject, use cross links for any further reading.</p></li> +</ul> +<p>To be more concrete what a <em>point of view</em> means. In the (<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs">git://docs</a>) +folder we have three sections (and the <em>blog</em> folder), each dedicate to a +different group of audience.</p> +<dl class="simple"> +<dt>User’s POV: <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/user">git://docs/user</a></dt><dd><p>A typical user knows about search engines and might have heard about +meta crawlers and privacy.</p> +</dd> +<dt>Admin’s POV: <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/admin">git://docs/admin</a></dt><dd><p>A typical Admin knows about setting up services on a linux system, but he does +not know all the pros and cons of a SearXNG setup.</p> +</dd> +<dt>Developer’s POV: <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/dev">git://docs/dev</a></dt><dd><p>Depending on the <a class="reference external" href="https://docs.python-guide.org/writing/style/">readability</a> of code, a typical developer is able to read and +understand source code. Describe what a item aims to do (e.g. a function). +If the chronological order matters, describe it. Name the <em>out-of-limits +conditions</em> and all the side effects a external developer will not know.</p> +</dd> +</dl> +</section> +<section id="basic-inline-markup"> +<span id="rest-inline-markup"></span><h2><a class="toc-backref" href="#id16" role="doc-backlink">Basic inline markup</a><a class="headerlink" href="#basic-inline-markup" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">Inline markup</p> +<ul class="simple"> +<li><p><a class="reference internal" href="#rest-roles"><span class="std std-ref">Roles</span></a></p></li> +<li><p><a class="reference internal" href="#rest-smart-ref"><span class="std std-ref">Smart refs</span></a></p></li> +</ul> +</aside> +<p>Basic inline markup is done with asterisks and backquotes. If asterisks or +backquotes appear in running text and could be confused with inline markup +delimiters, they have to be escaped with a backslash (<code class="docutils literal notranslate"><span class="pre">\*pointer</span></code>).</p> +<table class="docutils align-default" id="id4"> +<caption><span class="caption-number">Table 16 </span><span class="caption-text">basic inline markup</span><a class="headerlink" href="#id4" title="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 28.6%" /> +<col style="width: 21.4%" /> +<col style="width: 50.0%" /> +</colgroup> +<thead> +<tr class="row-odd"><th class="head"><p>description</p></th> +<th class="head"><p>rendered</p></th> +<th class="head"><p>markup</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>one asterisk for emphasis</p></td> +<td><p><em>italics</em></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">*italics*</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>two asterisks for strong emphasis</p></td> +<td><p><strong>boldface</strong></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">**boldface**</span></code></p></td> +</tr> +<tr class="row-even"><td><p>backquotes for code samples and literals</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">foo()</span></code></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">``foo()``</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>quote asterisks or backquotes</p></td> +<td><p>*foo is a pointer</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">\*foo</span> <span class="pre">is</span> <span class="pre">a</span> <span class="pre">pointer</span></code></p></td> +</tr> +</tbody> +</table> +</section> +<section id="basic-article-structure"> +<span id="rest-basic-structure"></span><h2><a class="toc-backref" href="#id17" role="doc-backlink">Basic article structure</a><a class="headerlink" href="#basic-article-structure" title="Link to this heading">¶</a></h2> +<p>The basic structure of an article makes use of heading adornments to markup +chapter, sections and subsections.</p> +<section id="rest-template"> +<span id="id2"></span><h3><a class="toc-backref" href="#id18" role="doc-backlink">reST template</a><a class="headerlink" href="#rest-template" title="Link to this heading">¶</a></h3> +<p>reST template for an simple article:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_doc refname:</span> + +<span class="gh">==============</span> +<span class="gh">Document title</span> +<span class="gh">==============</span> + +Lorem ipsum dolor sit amet, consectetur adipisici elit .. Further read +<span class="na">:ref:</span><span class="nv">`chapter refname`</span>. + +<span class="p">..</span> <span class="nt">_chapter refname:</span> + +<span class="gh">Chapter</span> +<span class="gh">=======</span> + +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut +aliquid ex ea commodi consequat ... + +<span class="p">..</span> <span class="nt">_section refname:</span> + +<span class="gh">Section</span> +<span class="gh">-------</span> + +lorem .. + +<span class="p">..</span> <span class="nt">_subsection refname:</span> + +<span class="gh">Subsection</span> +<span class="gh">~~~~~~~~~~</span> + +lorem .. +</pre></div> +</div> +</section> +<section id="headings"> +<h3><a class="toc-backref" href="#id19" role="doc-backlink">Headings</a><a class="headerlink" href="#headings" title="Link to this heading">¶</a></h3> +<ol class="arabic simple"> +<li><p>title - with overline for document title:</p></li> +</ol> +<blockquote> +<div><div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="gh">==============</span> +<span class="gh">Document title</span> +<span class="gh">==============</span> +</pre></div> +</div> +</div></blockquote> +<ol class="arabic"> +<li><p>chapter - with anchor named <code class="docutils literal notranslate"><span class="pre">anchor</span> <span class="pre">name</span></code>:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_anchor name:</span> + +<span class="gh">Chapter</span> +<span class="gh">=======</span> +</pre></div> +</div> +</li> +<li><p>section</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="gh">Section</span> +<span class="gh">-------</span> +</pre></div> +</div> +</li> +<li><p>subsection</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="gh">Subsection</span> +<span class="gh">~~~~~~~~~~</span> +</pre></div> +</div> +</li> +</ol> +</section> +</section> +<section id="anchors-links"> +<h2><a class="toc-backref" href="#id20" role="doc-backlink">Anchors & Links</a><a class="headerlink" href="#anchors-links" title="Link to this heading">¶</a></h2> +<section id="anchors"> +<span id="rest-anchor"></span><h3><a class="toc-backref" href="#id21" role="doc-backlink">Anchors</a><a class="headerlink" href="#anchors" title="Link to this heading">¶</a></h3> +<p>To refer a point in the documentation a anchor is needed. The <a class="reference internal" href="#rest-template"><span class="std std-ref">reST +template</span></a> shows an example where a chapter titled <em>“Chapters”</em> +gets an anchor named <code class="docutils literal notranslate"><span class="pre">chapter</span> <span class="pre">title</span></code>. Another example from <em>this</em> document, +where the anchor named <code class="docutils literal notranslate"><span class="pre">reST</span> <span class="pre">anchor</span></code>:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_reST anchor:</span> + +<span class="gh">Anchors</span> +<span class="gh">-------</span> + +To refer a point in the documentation a anchor is needed ... +</pre></div> +</div> +<p>To refer anchors use the <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref">ref role</a> markup:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>Visit chapter <span class="na">:ref:</span><span class="nv">`reST anchor`</span>. Or set hyperlink text manually :ref:`foo +bar <reST anchor>`. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title"><code class="docutils literal notranslate"><span class="pre">:ref:</span></code> role</p> +<p>Visit chapter <a class="reference internal" href="#rest-anchor"><span class="std std-ref">Anchors</span></a>. Or set hyperlink text manually <a class="reference internal" href="#rest-anchor"><span class="std std-ref">foo +bar</span></a>.</p> +</div> +</section> +<section id="link-ordinary-url"> +<span id="rest-ordinary-ref"></span><h3><a class="toc-backref" href="#id22" role="doc-backlink">Link ordinary URL</a><a class="headerlink" href="#link-ordinary-url" title="Link to this heading">¶</a></h3> +<p>If you need to reference external URLs use <em>named</em> hyperlinks to maintain +readability of reST sources. Here is a example taken from <em>this</em> article:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_Sphinx Field Lists:</span> + https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html + +With the <span class="ge">*named*</span> hyperlink <span class="s">`Sphinx Field Lists`_</span>, the raw text is much more +readable. + +And this shows the alternative (less readable) hyperlink markup `Sphinx Field +Lists +<span class="nt"><https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html></span>`__. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Named hyperlink</p> +<p>With the <em>named</em> hyperlink <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html">Sphinx Field Lists</a>, the raw text is much more +readable.</p> +<p>And this shows the alternative (less readable) hyperlink markup <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html">Sphinx Field +Lists</a>.</p> +</div> +</section> +<section id="smart-refs"> +<span id="rest-smart-ref"></span><h3><a class="toc-backref" href="#id23" role="doc-backlink">Smart refs</a><a class="headerlink" href="#smart-refs" title="Link to this heading">¶</a></h3> +<p>With the power of <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a> and <a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a> referencing external +content becomes smart.</p> +<table class="docutils align-default" id="id5"> +<caption><span class="caption-number">Table 17 </span><span class="caption-text">smart refs with <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a> and <a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></span><a class="headerlink" href="#id5" title="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 28.6%" /> +<col style="width: 21.4%" /> +<col style="width: 50.0%" /> +</colgroup> +<thead> +<tr class="row-odd"><th class="head"><p>refer …</p></th> +<th class="head"><p>rendered example</p></th> +<th class="head"><p>markup</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-rfc" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">rfc</span></code></a></p></td> +<td><p><span class="target" id="index-0"></span><a class="rfc reference external" href="https://datatracker.ietf.org/doc/html/rfc822.html"><strong>RFC 822</strong></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:rfc:`822`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-pep" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">pep</span></code></a></p></td> +<td><p><span class="target" id="index-1"></span><a class="pep reference external" href="https://peps.python.org/pep-0008/"><strong>PEP 8</strong></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:pep:`8`</span></code></p></td> +</tr> +<tr class="row-even"><td colspan="3"><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a></p></td> +</tr> +<tr class="row-odd"><td><p>project’s wiki article</p></td> +<td><p><a class="extlink-wiki reference external" href="https://github.com/searxng/searxng/wiki/Offline-engines"> Offline-engines</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:wiki:`Offline-engines`</span></code></p></td> +</tr> +<tr class="row-even"><td><p>to docs public URL</p></td> +<td><p><a class="extlink-docs reference external" href="https://docs.searxng.org//dev/reST.html">docs: dev/reST.html</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:docs:`dev/reST.html`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>files & folders origin</p></td> +<td><p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/dev/reST.rst">git://docs/dev/reST.rst</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:origin:`docs/dev/reST.rst`</span></code></p></td> +</tr> +<tr class="row-even"><td><p>pull request</p></td> +<td><p><a class="extlink-pull reference external" href="https://github.com/searxng/searxng/pull/4">PR 4</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:pull:`4`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>patch</p></td> +<td><p><a class="extlink-patch reference external" href="https://github.com/searxng/searxng/commit/af2cae6">#af2cae6</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:patch:`af2cae6`</span></code></p></td> +</tr> +<tr class="row-even"><td><p>PyPi package</p></td> +<td><p><a class="extlink-pypi reference external" href="https://pypi.org/project/httpx">PyPi: httpx</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:pypi:`httpx`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>manual page man</p></td> +<td><p><a class="extlink-man reference external" href="https://manpages.debian.org/jump?q=bash">bash</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:man:`bash`</span></code></p></td> +</tr> +<tr class="row-even"><td colspan="3"><p><a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></p></td> +</tr> +<tr class="row-odd"><td><p>external anchor</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/reference/expressions.html#and" title="(in Python v3.13)"><span>Boolean operations</span></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:ref:`python:and`</span></code></p></td> +</tr> +<tr class="row-even"><td><p>external doc anchor</p></td> +<td><p><a class="reference external" href="https://jinja.palletsprojects.com/en/stable/templates/" title="(in Jinja v3.1.x)"><span>Template Designer Documentation</span></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:doc:`jinja:templates`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p>python code object</p></td> +<td><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">datetime.datetime</span></code></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:py:obj:`datetime.datetime`</span></code></p></td> +</tr> +<tr class="row-even"><td><p>flask code object</p></td> +<td><p><a class="reference external" href="https://flask.palletsprojects.com/en/stable/api/#flask.Flask" title="(in Flask v3.1.x)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flask.Flask</span></code></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:py:obj:`flask.Flask`</span></code></p></td> +</tr> +</tbody> +</table> +<p>Intersphinx is configured in <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/conf.py">git://docs/conf.py</a>:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">intersphinx_mapping</span> <span class="o">=</span> <span class="p">{</span> + <span class="s2">"python"</span><span class="p">:</span> <span class="p">(</span><span class="s2">"https://docs.python.org/3/"</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span> + <span class="s2">"flask"</span><span class="p">:</span> <span class="p">(</span><span class="s2">"https://flask.palletsprojects.com/"</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span> + <span class="s2">"jinja"</span><span class="p">:</span> <span class="p">(</span><span class="s2">"https://jinja.palletsprojects.com/"</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span> + <span class="s2">"linuxdoc"</span> <span class="p">:</span> <span class="p">(</span><span class="s2">"https://return42.github.io/linuxdoc/"</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span> + <span class="s2">"sphinx"</span> <span class="p">:</span> <span class="p">(</span><span class="s2">"https://www.sphinx-doc.org/en/master/"</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span> +<span class="p">}</span> +</pre></div> +</div> +<p>To list all anchors of the inventory (e.g. <code class="docutils literal notranslate"><span class="pre">python</span></code>) use:</p> +<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>python<span class="w"> </span>-m<span class="w"> </span>sphinx.ext.intersphinx<span class="w"> </span>https://docs.python.org/3/objects.inv +... +$<span class="w"> </span>python<span class="w"> </span>-m<span class="w"> </span>sphinx.ext.intersphinx<span class="w"> </span>https://docs.searxng.org/objects.inv +... +</pre></div> +</div> +</section> +</section> +<section id="literal-blocks"> +<h2><a class="toc-backref" href="#id24" role="doc-backlink">Literal blocks</a><a class="headerlink" href="#literal-blocks" title="Link to this heading">¶</a></h2> +<p>The simplest form of <a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#literal-blocks">literal-blocks</a> is a indented block introduced by +two colons (<code class="docutils literal notranslate"><span class="pre">::</span></code>). For highlighting use <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#highlight">highlight</a> or <a class="reference internal" href="#rest-code"><span class="std std-ref">code-block</span></a> directive. To include literals from external files use +<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude" title="(in Sphinx v8.2.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">literalinclude</span></code></a> or <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kernel-include-directive.html#kernel-include-directive" title="(in LinuxDoc v20240509)"><span class="xref std std-ref">kernel-include</span></a> +directive (latter one expands environment variables in the path name).</p> +<section id="rest-literal"> +<span id="id3"></span><h3><a class="toc-backref" href="#id25" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">::</span></code></a><a class="headerlink" href="#rest-literal" title="Link to this heading">¶</a></h3> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="se">::</span> + +<span class="s"> Literal block</span> + +Lorem ipsum dolor<span class="se">::</span> + +<span class="s"> Literal block</span> + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore :: + + Literal block +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Literal block</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Literal</span> <span class="n">block</span> +</pre></div> +</div> +<p>Lorem ipsum dolor:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Literal</span> <span class="n">block</span> +</pre></div> +</div> +<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Literal</span> <span class="n">block</span> +</pre></div> +</div> +</div> +</section> +<section id="code-block"> +<span id="rest-code"></span><h3><a class="toc-backref" href="#id26" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">code-block</span></code></a><a class="headerlink" href="#code-block" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">Syntax highlighting</p> +<p>is handled by <a class="reference external" href="https://pygments.org/languages/">pygments</a>.</p> +</aside> +<p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block" title="(in Sphinx v8.2.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">code-block</span></code></a> directive is a variant of the <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#code">code</a> directive +with additional options. To learn more about code literals visit +<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#code-examples" title="(in Sphinx v8.2.0)"><span>Showing code examples</span></a>.</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>The URL <span class="s">``/stats``</span> handle is shown in <span class="na">:ref:</span><span class="nv">`stats-handle`</span> + +<span class="p">..</span> <span class="ow">code-block</span><span class="p">::</span> Python + <span class="nc">:caption:</span> python code block + <span class="nc">:name:</span> stats-handle + + @app.route('/stats', methods=['GET']) + def stats(): + """Render engine statistics page.""" + stats = get_engines_stats() + return render( + 'stats.html' + , stats = stats ) +</pre></div> +</div> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span> +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Code block</p> +<p>The URL <code class="docutils literal notranslate"><span class="pre">/stats</span></code> handle is shown in <a class="reference internal" href="#stats-handle"><span class="std std-ref">python code block</span></a></p> +<div class="literal-block-wrapper docutils container" id="stats-handle"> +<div class="code-block-caption"><span class="caption-number">Listing 1 </span><span class="caption-text">python code block</span><a class="headerlink" href="#stats-handle" title="Link to this code">¶</a></div> +<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="nd">@app</span><span class="o">.</span><span class="n">route</span><span class="p">(</span><span class="s1">'/stats'</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s1">'GET'</span><span class="p">])</span> +<span class="k">def</span> <span class="nf">stats</span><span class="p">():</span> +<span class="w"> </span><span class="sd">"""Render engine statistics page."""</span> + <span class="n">stats</span> <span class="o">=</span> <span class="n">get_engines_stats</span><span class="p">()</span> + <span class="k">return</span> <span class="n">render</span><span class="p">(</span> + <span class="s1">'stats.html'</span> + <span class="p">,</span> <span class="n">stats</span> <span class="o">=</span> <span class="n">stats</span> <span class="p">)</span> +</pre></div> +</div> +</div> +</div> +</section> +</section> +<section id="unicode-substitution"> +<h2><a class="toc-backref" href="#id27" role="doc-backlink">Unicode substitution</a><a class="headerlink" href="#unicode-substitution" title="Link to this heading">¶</a></h2> +<p>The <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#unicode-character-codes">unicode directive</a> converts Unicode +character codes (numerical values) to characters. This directive can only be +used within a substitution definition.</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">|copy|</span> <span class="ow">unicode</span><span class="p">::</span> 0xA9 .. copyright sign +<span class="p">..</span> <span class="nt">|(TM)|</span> <span class="ow">unicode</span><span class="p">::</span> U+2122 + +Trademark |(TM)| and copyright |copy| glyphs. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Unicode</p> +<p>Trademark ™ and copyright © glyphs.</p> +</div> +</section> +<section id="roles"> +<span id="rest-roles"></span><h2><a class="toc-backref" href="#id28" role="doc-backlink">Roles</a><a class="headerlink" href="#roles" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">Further reading</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html">Sphinx Roles</a></p></li> +<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html" title="(in Sphinx v8.2.0)"><span>MOVED: Domains</span></a></p></li> +</ul> +</aside> +<p>A <em>custom interpreted text role</em> (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#roles">ref</a>) is an inline piece of +explicit markup. It signifies that that the enclosed text should be interpreted +in a specific way.</p> +<p>The general markup is one of:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="na">:rolename:</span><span class="nv">`ref-name`</span> +<span class="na">:rolename:</span><span class="nv">`ref text <ref-name>`</span> +</pre></div> +</div> +<table class="docutils align-default" id="id6"> +<caption><span class="caption-number">Table 18 </span><span class="caption-text">smart refs with <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html">sphinx.ext.extlinks</a> and <a class="reference external" href="https://www.sphinx-doc.org/en/stable/ext/intersphinx.html">intersphinx</a></span><a class="headerlink" href="#id6" title="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 28.6%" /> +<col style="width: 21.4%" /> +<col style="width: 50.0%" /> +</colgroup> +<thead> +<tr class="row-odd"><th class="head"><p>role</p></th> +<th class="head"><p>rendered example</p></th> +<th class="head"><p>markup</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-guilabel" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">guilabel</span></code></a></p></td> +<td><p><span class="guilabel"><span class="accelerator">C</span>ancel</span></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:guilabel:`&Cancel`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-kbd" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">kbd</span></code></a></p></td> +<td><p><kbd class="kbd compound docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kbd docutils literal notranslate">x</kbd> <kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kbd docutils literal notranslate">f</kbd></kbd></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:kbd:`C-x</span> <span class="pre">C-f`</span></code></p></td> +</tr> +<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-menuselection" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">menuselection</span></code></a></p></td> +<td><p><span class="menuselection">Open ‣ File</span></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:menuselection:`Open</span> <span class="pre">--></span> <span class="pre">File`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/referencing.html#role-download" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">download</span></code></a></p></td> +<td><p><a class="reference download internal" download="" href="../_downloads/ad0ebe55d6b53b1559e0ca8dee6f30b9/reST.rst"><code class="xref download docutils literal notranslate"><span class="pre">this</span> <span class="pre">file</span></code></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:download:`this</span> <span class="pre">file</span> <span class="pre"><reST.rst>`</span></code></p></td> +</tr> +<tr class="row-even"><td><p><a class="reference internal" href="#math">math</a></p></td> +<td><p><img class="math" src="../_images/math/6673b43f9fe29455c1fcd1164e5844698cc64d38.svg" alt="a^2 + b^2 = c^2"/></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:math:`a^2</span> <span class="pre">+</span> <span class="pre">b^2</span> <span class="pre">=</span> <span class="pre">c^2`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/referencing.html#role-ref" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">ref</span></code></a></p></td> +<td><p><a class="reference internal" href="#svg-image-example"><span class="std std-ref">Simple SVG image.</span></a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:ref:`svg</span> <span class="pre">image</span> <span class="pre">example`</span></code></p></td> +</tr> +<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-command" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">command</span></code></a></p></td> +<td><p><strong class="command">ls -la</strong></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:command:`ls</span> <span class="pre">-la`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#emphasis">emphasis</a></p></td> +<td><p><em>italic</em></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:emphasis:`italic`</span></code></p></td> +</tr> +<tr class="row-even"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#strong">strong</a></p></td> +<td><p><strong>bold</strong></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:strong:`bold`</span></code></p></td> +</tr> +<tr class="row-odd"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#literal">literal</a></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">foo()</span></code></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:literal:`foo()`</span></code></p></td> +</tr> +<tr class="row-even"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#subscript">subscript</a></p></td> +<td><p>H<sub>2</sub>O</p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">H\</span> <span class="pre">:sub:`2`\</span> <span class="pre">O</span></code></p></td> +</tr> +<tr class="row-odd"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#superscript">superscript</a></p></td> +<td><p>E = mc<sup>2</sup></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">E</span> <span class="pre">=</span> <span class="pre">mc\</span> <span class="pre">:sup:`2`</span></code></p></td> +</tr> +<tr class="row-even"><td><p><a class="extlink-durole reference external" href="https://docutils.sourceforge.io/docs/ref/rst/roles.html#title-reference">title-reference</a></p></td> +<td><p><cite>Time</cite></p></td> +<td><p><code class="docutils literal notranslate"><span class="pre">:title:`Time`</span></code></p></td> +</tr> +</tbody> +</table> +</section> +<section id="figures-images"> +<h2><a class="toc-backref" href="#id29" role="doc-backlink">Figures & Images</a><a class="headerlink" href="#figures-images" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">Image processing</p> +<p>With the directives from <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure" title="(in LinuxDoc v20240509)"><span class="xref std std-ref">linuxdoc</span></a> the build process +is flexible. To get best results in the generated output format, install +<a class="reference external" href="https://www.imagemagick.org">ImageMagick</a> and <a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a>.</p> +</aside> +<p>SearXNG’s sphinx setup includes: <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure" title="(in LinuxDoc v20240509)"><span>Scalable figure and image handling</span></a>. Scalable here means; +scalable in sense of the build process. Normally in absence of a converter +tool, the build process will break. From the authors POV it’s annoying to care +about the build process when handling with images, especially since he has no +access to the build process. With <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure" title="(in LinuxDoc v20240509)"><span>Scalable figure and image handling</span></a> the build process +continues and scales output quality in dependence of installed image processors.</p> +<p>If you want to add an image, you should use the <code class="docutils literal notranslate"><span class="pre">kernel-figure</span></code> (inheritance +of <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#figure">figure</a>) and <code class="docutils literal notranslate"><span class="pre">kernel-image</span></code> (inheritance of <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#image">image</a>) +directives. E.g. to insert a figure with a scalable image format use SVG +(<a class="reference internal" href="#svg-image-example"><span class="std std-ref">Simple SVG image.</span></a>):</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_svg image example:</span> + +<span class="p">..</span> <span class="ow">kernel-figure</span><span class="p">::</span> svg_image.svg + <span class="nc">:alt:</span> SVG image example + + Simple SVG image + + To refer the figure, a caption block is needed: <span class="na">:ref:</span><span class="nv">`svg image example`</span>. +</pre></div> +</div> +<figure class="align-default" id="id7"> +<img alt="SVG image example" src="../_images/svg_image.svg" /> +<figcaption> +<p><span class="caption-number">Fig. 4 </span><span class="caption-text">Simple SVG image.</span><a class="headerlink" href="#id7" title="Link to this image">¶</a></p> +</figcaption> +</figure> +<p>To refer the figure, a caption block is needed: <a class="reference internal" href="#svg-image-example"><span class="std std-ref">Simple SVG image.</span></a>.</p> +<section id="dot-files-aka-graphviz"> +<h3><a class="toc-backref" href="#id30" role="doc-backlink">DOT files (aka Graphviz)</a><a class="headerlink" href="#dot-files-aka-graphviz" title="Link to this heading">¶</a></h3> +<p>With <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kernel-figure" title="(in LinuxDoc v20240509)"><span>kernel-figure & kernel-image</span></a> reST support for <strong>DOT</strong> formatted files is +given.</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://graphviz.gitlab.io/_pages/pdf/dotguide.pdf">Graphviz’s dot</a></p></li> +<li><p><a class="reference external" href="https://graphviz.gitlab.io/_pages/doc/info/lang.html">DOT</a></p></li> +<li><p><a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a></p></li> +</ul> +<p>A simple example is shown in <a class="reference internal" href="#dot-file-example"><span class="std std-ref">DOT’s hello world example</span></a>:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_dot file example:</span> + +<span class="p">..</span> <span class="ow">kernel-figure</span><span class="p">::</span> hello.dot + <span class="nc">:alt:</span> hello world + + DOT's hello world example +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">hello.dot</p> +<figure class="align-default" id="id8"> +<img alt="hello world" src="../_images/hello.svg" /> +<figcaption> +<p><span class="caption-number">Fig. 5 </span><span class="caption-text">DOT’s hello world example</span><a class="headerlink" href="#id8" title="Link to this image">¶</a></p> +</figcaption> +</figure> +</div> +</section> +<section id="kernel-render-dot"> +<h3><a class="toc-backref" href="#id31" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> DOT</a><a class="headerlink" href="#kernel-render-dot" title="Link to this heading">¶</a></h3> +<p>Embed <em>render</em> markups (or languages) like Graphviz’s <strong>DOT</strong> is provided by the +<a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kernel-render" title="(in LinuxDoc v20240509)"><span>kernel-render</span></a> directive. A simple example of embedded <a class="reference external" href="https://graphviz.gitlab.io/_pages/doc/info/lang.html">DOT</a> is +shown in figure <a class="reference internal" href="#dot-render-example"><span class="std std-ref">Embedded DOT (Graphviz) code</span></a>:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_dot render example:</span> + +<span class="p">..</span> <span class="ow">kernel-render</span><span class="p">::</span> DOT + <span class="nc">:alt:</span> digraph + <span class="nc">:caption:</span> Embedded DOT (Graphviz) code + + digraph foo { + "bar" -> "baz"; + } + +Attribute <span class="s">``caption``</span> is needed, if you want to refer the figure: :ref:`dot +render example`. +</pre></div> +</div> +<p>Please note <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kfigure.html#kfigure-build-tools" title="(in LinuxDoc v20240509)"><span class="xref std std-ref">build tools</span></a>. If <a class="reference external" href="https://graphviz.gitlab.io">Graphviz</a> is +installed, you will see an vector image. If not, the raw markup is inserted as +<em>literal-block</em>.</p> +<div class="rst-example admonition"> +<p class="admonition-title">kernel-render DOT</p> +<figure class="align-default" id="id9"> +<span id="dot-render-example"></span><img alt="digraph" src="../_images/DOT-57a4a7f78690d0b6b884bc59f36e84cfb0b61f76.svg" /> +<figcaption> +<p><span class="caption-number">Fig. 6 </span><span class="caption-text">Embedded DOT (Graphviz) code</span><a class="headerlink" href="#id9" title="Link to this image">¶</a></p> +</figcaption> +</figure> +<p>Attribute <code class="docutils literal notranslate"><span class="pre">caption</span></code> is needed, if you want to refer the figure: <a class="reference internal" href="#dot-render-example"><span class="std std-ref">Embedded DOT (Graphviz) code</span></a>.</p> +</div> +</section> +<section id="kernel-render-svg"> +<h3><a class="toc-backref" href="#id32" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> SVG</a><a class="headerlink" href="#kernel-render-svg" title="Link to this heading">¶</a></h3> +<p>A simple example of embedded <a class="reference external" href="https://www.w3.org/TR/SVG11/expanded-toc.html">SVG</a> is shown in figure <a class="reference internal" href="#svg-render-example"><span class="std std-ref">Embedded SVG markup</span></a>:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="nt">_svg render example:</span> + +<span class="p">..</span> <span class="ow">kernel-render</span><span class="p">::</span> SVG + <span class="nc">:caption:</span> Embedded <span class="gs">**SVG**</span> markup + <span class="nc">:alt:</span> so-nw-arrow +</pre></div> +</div> +<blockquote> +<div><div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> +<span class="nt"><svg</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span><span class="w"> </span><span class="na">version=</span><span class="s">"1.1"</span> +<span class="w"> </span><span class="na">baseProfile=</span><span class="s">"full"</span><span class="w"> </span><span class="na">width=</span><span class="s">"70px"</span><span class="w"> </span><span class="na">height=</span><span class="s">"40px"</span> +<span class="w"> </span><span class="na">viewBox=</span><span class="s">"0 0 700 400"</span> +<span class="w"> </span><span class="nt">></span> +<span class="w"> </span><span class="nt"><line</span><span class="w"> </span><span class="na">x1=</span><span class="s">"180"</span><span class="w"> </span><span class="na">y1=</span><span class="s">"370"</span> +<span class="w"> </span><span class="na">x2=</span><span class="s">"500"</span><span class="w"> </span><span class="na">y2=</span><span class="s">"50"</span> +<span class="w"> </span><span class="na">stroke=</span><span class="s">"black"</span><span class="w"> </span><span class="na">stroke-width=</span><span class="s">"15px"</span> +<span class="w"> </span><span class="nt">/></span> +<span class="w"> </span><span class="nt"><polygon</span><span class="w"> </span><span class="na">points=</span><span class="s">"585 0 525 25 585 50"</span> +<span class="w"> </span><span class="na">transform=</span><span class="s">"rotate(135 525 25)"</span> +<span class="w"> </span><span class="nt">/></span> +<span class="nt"></svg></span> +</pre></div> +</div> +</div></blockquote> +<div class="rst-example admonition"> +<p class="admonition-title">kernel-render SVG</p> +<figure class="align-default" id="id10"> +<span id="svg-render-example"></span><img alt="so-nw-arrow" src="../_images/SVG-1fb7029fa2cc454a267bae271cccb2c591387416.svg" /> +<figcaption> +<p><span class="caption-number">Fig. 7 </span><span class="caption-text">Embedded <strong>SVG</strong> markup</span><a class="headerlink" href="#id10" title="Link to this image">¶</a></p> +</figcaption> +</figure> +</div> +</section> +</section> +<section id="list-markups"> +<span id="rest-lists"></span><h2><a class="toc-backref" href="#id33" role="doc-backlink">List markups</a><a class="headerlink" href="#list-markups" title="Link to this heading">¶</a></h2> +<section id="bullet-list"> +<h3><a class="toc-backref" href="#id34" role="doc-backlink">Bullet list</a><a class="headerlink" href="#bullet-list" title="Link to this heading">¶</a></h3> +<p>List markup (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#bullet-lists">ref</a>) is simple:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="m">-</span> This is a bulleted list. + + <span class="m">1.</span> Nested lists are possible, but be aware that they must be separated from + the parent list items by blank line + <span class="m">2.</span> Second item of nested list + +<span class="m">-</span> It has two items, the second + item uses two lines. + +<span class="m">#.</span> This is a numbered list. +<span class="m">#.</span> It has two items too. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">bullet list</p> +<ul class="simple"> +<li><p>This is a bulleted list.</p> +<ol class="arabic simple"> +<li><p>Nested lists are possible, but be aware that they must be separated from +the parent list items by blank line</p></li> +<li><p>Second item of nested list</p></li> +</ol> +</li> +<li><p>It has two items, the second +item uses two lines.</p></li> +</ul> +<ol class="arabic simple"> +<li><p>This is a numbered list.</p></li> +<li><p>It has two items too.</p></li> +</ol> +</div> +</section> +<section id="horizontal-list"> +<h3><a class="toc-backref" href="#id35" role="doc-backlink">Horizontal list</a><a class="headerlink" href="#horizontal-list" title="Link to this heading">¶</a></h3> +<p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-hlist" title="(in Sphinx v8.2.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">hlist::</span></code></a> transforms a bullet list into a more compact +list.</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">hlist</span><span class="p">::</span> + + <span class="m">-</span> first list item + <span class="m">-</span> second list item + <span class="m">-</span> third list item +<span class="c"> ...</span> +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">hlist</p> +<table class="hlist"><tr><td><ul class="simple"> +<li><p>first list item</p></li> +<li><p>second list item</p></li> +<li><p>third list item</p></li> +<li><p>next list item</p></li> +</ul> +</td><td><ul class="simple"> +<li><p>next list item xxxx</p></li> +<li><p>next list item yyyy</p></li> +<li><p>next list item zzzz</p></li> +</ul> +</td></tr></table> +</div> +</section> +<section id="definition-list"> +<h3><a class="toc-backref" href="#id36" role="doc-backlink">Definition list</a><a class="headerlink" href="#definition-list" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">Note ..</p> +<ul class="simple"> +<li><p>the term cannot have more than one line of text</p></li> +<li><p>there is <strong>no blank line between term and definition block</strong> // this +distinguishes definition lists (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#definition-lists">ref</a>) from block +quotes (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes">ref</a>).</p></li> +</ul> +</aside> +<p>Each definition list (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#definition-lists">ref</a>) item contains a term, +optional classifiers and a definition. A term is a simple one-line word or +phrase. Optional classifiers may follow the term on the same line, each after +an inline ‘ : ‘ (<strong>space, colon, space</strong>). A definition is a block indented +relative to the term, and may contain multiple paragraphs and other body +elements. There may be no blank line between a term line and a definition block +(<em>this distinguishes definition lists from block quotes</em>). Blank lines are +required before the first and after the last definition list item, but are +optional in-between.</p> +<p>Definition lists are created as follows:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>term 1 (up to a line of text) + Definition 1. + +See the typo : this line is not a term! + + And this is not term's definition. <span class="gs">**There is a blank line**</span> in between + the line above and this paragraph. That's why this paragraph is taken as + <span class="gs">**block quote**</span> (<span class="na">:duref:</span><span class="nv">`ref <block-quotes>`</span>) and not as term's definition! + +term 2 + Definition 2, paragraph 1. + + Definition 2, paragraph 2. + +term 3 : classifier + Definition 3. + +term 4 : classifier one : classifier two + Definition 4. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">definition list</p> +<dl class="simple"> +<dt>term 1 (up to a line of text)</dt><dd><p>Definition 1.</p> +</dd> +</dl> +<p>See the typo : this line is not a term!</p> +<blockquote> +<div><p>And this is not term’s definition. <strong>There is a blank line</strong> in between +the line above and this paragraph. That’s why this paragraph is taken as +<strong>block quote</strong> (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes">ref</a>) and not as term’s definition!</p> +</div></blockquote> +<dl> +<dt>term 2</dt><dd><p>Definition 2, paragraph 1.</p> +<p>Definition 2, paragraph 2.</p> +</dd> +<dt>term 3<span class="classifier">classifier</span></dt><dd><p>Definition 3.</p> +</dd> +</dl> +<p>term 4 : classifier one : classifier two</p> +</div> +</section> +<section id="quoted-paragraphs"> +<h3><a class="toc-backref" href="#id37" role="doc-backlink">Quoted paragraphs</a><a class="headerlink" href="#quoted-paragraphs" title="Link to this heading">¶</a></h3> +<p>Quoted paragraphs (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes">ref</a>) are created by just indenting +them more than the surrounding paragraphs. Line blocks (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#line-blocks">ref</a>) are a way of preserving line breaks:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>normal paragraph ... +lorem ipsum. + + Quoted paragraph ... + lorem ipsum. + +<span class="o">|</span> These lines are +<span class="o">|</span> broken exactly like in +<span class="o">|</span> the source file. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Quoted paragraph and line block</p> +<p>normal paragraph … +lorem ipsum.</p> +<blockquote> +<div><p>Quoted paragraph … +lorem ipsum.</p> +</div></blockquote> +<div class="line-block"> +<div class="line">These lines are</div> +<div class="line">broken exactly like in</div> +<div class="line">the source file.</div> +</div> +</div> +</section> +<section id="field-lists"> +<span id="rest-field-list"></span><h3><a class="toc-backref" href="#id38" role="doc-backlink">Field Lists</a><a class="headerlink" href="#field-lists" title="Link to this heading">¶</a></h3> +<aside class="sidebar"> +<p class="sidebar-title">bibliographic fields</p> +<p>First lines fields are bibliographic fields, see <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html">Sphinx Field Lists</a>.</p> +</aside> +<p>Field lists are used as part of an extension syntax, such as options for +directives, or database-like records meant for further processing. Field lists +are mappings from field names to field bodies. They marked up like this:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="nc">:fieldname:</span> Field content +<span class="nc">:foo:</span> first paragraph in field foo + + second paragraph in field foo + +<span class="nc">:bar:</span> Field content +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Field List</p> +<dl class="field-list"> +<dt class="field-odd">fieldname<span class="colon">:</span></dt> +<dd class="field-odd"><p>Field content</p> +</dd> +<dt class="field-even">foo<span class="colon">:</span></dt> +<dd class="field-even"><p>first paragraph in field foo</p> +<p>second paragraph in field foo</p> +</dd> +<dt class="field-odd">bar<span class="colon">:</span></dt> +<dd class="field-odd"><p>Field content</p> +</dd> +</dl> +</div> +<p>They are commonly used in Python documentation:</p> +<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">my_function</span><span class="p">(</span><span class="n">my_arg</span><span class="p">,</span> <span class="n">my_other_arg</span><span class="p">):</span> +<span class="w"> </span><span class="sd">"""A function just for me.</span> + +<span class="sd"> :param my_arg: The first of my arguments.</span> +<span class="sd"> :param my_other_arg: The second of my arguments.</span> + +<span class="sd"> :returns: A message (just for me, of course).</span> +<span class="sd"> """</span> +</pre></div> +</div> +</section> +<section id="further-list-blocks"> +<h3><a class="toc-backref" href="#id39" role="doc-backlink">Further list blocks</a><a class="headerlink" href="#further-list-blocks" title="Link to this heading">¶</a></h3> +<ul class="simple"> +<li><p>field lists (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#field-lists">ref</a>, with caveats noted in +<a class="reference internal" href="#rest-field-list"><span class="std std-ref">Field Lists</span></a>)</p></li> +<li><p>option lists (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#option-lists">ref</a>)</p></li> +<li><p>quoted literal blocks (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#quoted-literal-blocks">ref</a>)</p></li> +<li><p>doctest blocks (<a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#doctest-blocks">ref</a>)</p></li> +</ul> +</section> +</section> +<section id="admonitions"> +<h2><a class="toc-backref" href="#id40" role="doc-backlink">Admonitions</a><a class="headerlink" href="#admonitions" title="Link to this heading">¶</a></h2> +<section id="sidebar"> +<h3><a class="toc-backref" href="#id41" role="doc-backlink">Sidebar</a><a class="headerlink" href="#sidebar" title="Link to this heading">¶</a></h3> +<p>Sidebar is an eye catcher, often used for admonitions pointing further stuff or +site effects. Here is the source of the sidebar <a class="reference internal" href="#rest-primer"><span class="std std-ref">on top of this page</span></a>.</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">sidebar</span><span class="p">::</span> KISS_ and readability_ + + Instead of defining more and more roles, we at SearXNG encourage our + contributors to follow principles like KISS_ and readability_. +</pre></div> +</div> +</section> +<section id="generic-admonition"> +<h3><a class="toc-backref" href="#id42" role="doc-backlink">Generic admonition</a><a class="headerlink" href="#generic-admonition" title="Link to this heading">¶</a></h3> +<p>The generic <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#admonitions">admonition</a> needs a title:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">admonition</span><span class="p">::</span> generic admonition title + + lorem ipsum .. +</pre></div> +</div> +<div class="admonition-generic-admonition-title admonition"> +<p class="admonition-title">generic admonition title</p> +<p>lorem ipsum ..</p> +</div> +</section> +<section id="specific-admonitions"> +<h3><a class="toc-backref" href="#id43" role="doc-backlink">Specific admonitions</a><a class="headerlink" href="#specific-admonitions" title="Link to this heading">¶</a></h3> +<p>Specific admonitions: <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#hint">hint</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#note">note</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#tip">tip</a> <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#attention">attention</a>, +<a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#caution">caution</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#danger">danger</a>, <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#error">error</a>, , <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#important">important</a>, and +<a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#warning">warning</a> .</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">hint</span><span class="p">::</span> + + lorem ipsum .. + +<span class="p">..</span> <span class="ow">note</span><span class="p">::</span> + + lorem ipsum .. + +<span class="p">..</span> <span class="ow">warning</span><span class="p">::</span> + + lorem ipsum .. +</pre></div> +</div> +<div class="admonition hint"> +<p class="admonition-title">Hint</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition note"> +<p class="admonition-title">Note</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition tip"> +<p class="admonition-title">Tip</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition caution"> +<p class="admonition-title">Caution</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition danger"> +<p class="admonition-title">Danger</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition important"> +<p class="admonition-title">Important</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition error"> +<p class="admonition-title">Error</p> +<p>lorem ipsum ..</p> +</div> +<div class="admonition warning"> +<p class="admonition-title">Warning</p> +<p>lorem ipsum ..</p> +</div> +</section> +</section> +<section id="tables"> +<h2><a class="toc-backref" href="#id44" role="doc-backlink">Tables</a><a class="headerlink" href="#tables" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">Nested tables</p> +<p>Nested tables are ugly! Not all builder support nested tables, don’t use +them!</p> +</aside> +<p>ASCII-art tables like <a class="reference internal" href="#rest-simple-table"><span class="std std-ref">Simple tables</span></a> and <a class="reference internal" href="#rest-grid-table"><span class="std std-ref">Grid tables</span></a> might +be comfortable for readers of the text-files, but they have huge disadvantages +in the creation and modifying. First, they are hard to edit. Think about +adding a row or a column to a ASCII-art table or adding a paragraph in a cell, +it is a nightmare on big tables.</p> +<aside class="sidebar"> +<p class="sidebar-title">List tables</p> +<p>For meaningful patch and diff use <a class="reference internal" href="#rest-flat-table"><span class="std std-ref">flat-table</span></a>.</p> +</aside> +<p>Second the diff of modifying ASCII-art tables is not meaningful, e.g. widening a +cell generates a diff in which also changes are included, which are only +ascribable to the ASCII-art. Anyway, if you prefer ASCII-art for any reason, +here are some helpers:</p> +<ul class="simple"> +<li><p><a class="reference external" href="https://www.emacswiki.org/emacs/TableMode">Emacs Table Mode</a></p></li> +<li><p><a class="reference external" href="https://www.tablesgenerator.com/text_tables">Online Tables Generator</a></p></li> +</ul> +<section id="simple-tables"> +<span id="rest-simple-table"></span><h3><a class="toc-backref" href="#id45" role="doc-backlink">Simple tables</a><a class="headerlink" href="#simple-tables" title="Link to this heading">¶</a></h3> +<p><a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#simple-tables">Simple tables</a> allow <em>colspan</em> but not <em>rowspan</em>. If +your table need some metadata (e.g. a title) you need to add the <code class="docutils literal notranslate"><span class="pre">..</span> <span class="pre">table::</span> +<span class="pre">directive</span></code> <a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#table">(ref)</a> in front and place the table in its body:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">table</span><span class="p">::</span> foo gate truth table + <span class="nc">:widths:</span> grid + <span class="nc">:align:</span> left + + ====== ====== ====== + Inputs Output + ------------- ------ + A B A or B + ====== ====== ====== + False + -------------------- + True + -------------------- + True False True + (foo) + ------ ------ ------ + False True + (foo) + ====== ============= +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Simple ASCII table</p> +<table class="docutils align-left" id="id11"> +<caption><span class="caption-number">Table 19 </span><span class="caption-text">foo gate truth table</span><a class="headerlink" href="#id11" title="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 33.3%" /> +<col style="width: 33.3%" /> +<col style="width: 33.3%" /> +</colgroup> +<thead> +<tr class="row-odd"><th class="head" colspan="2"><p>Inputs</p></th> +<th class="head"><p>Output</p></th> +</tr> +<tr class="row-even"><th class="head"><p>A</p></th> +<th class="head"><p>B</p></th> +<th class="head"><p>A or B</p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><td colspan="3"><p>False</p></td> +</tr> +<tr class="row-even"><td colspan="3"><p>True</p></td> +</tr> +<tr class="row-odd"><td><p>True</p></td> +<td><p>False +(foo)</p></td> +<td><p>True</p></td> +</tr> +<tr class="row-even"><td><p>False</p></td> +<td colspan="2"><p>True +(foo)</p></td> +</tr> +</tbody> +</table> +</div> +</section> +<section id="grid-tables"> +<span id="rest-grid-table"></span><h3><a class="toc-backref" href="#id46" role="doc-backlink">Grid tables</a><a class="headerlink" href="#grid-tables" title="Link to this heading">¶</a></h3> +<p><a class="extlink-duref reference external" href="https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#grid-tables">Grid tables</a> allow colspan <em>colspan</em> and <em>rowspan</em>:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">table</span><span class="p">::</span> grid table example + <span class="nc">:widths:</span> 1 1 5 + + +------------+------------+-----------+ + <span class="o">|</span> Header 1 | Header 2 | Header 3 | + +============+============+===========+ + <span class="o">|</span> body row 1 | column 2 | column 3 | + +------------+------------+-----------+ + <span class="o">|</span> body row 2 | Cells may span columns.| + +------------+------------+-----------+ + <span class="o">|</span> body row 3 | Cells may | - Cells | + +------------+ span rows. | - contain | + <span class="o">|</span> body row 4 | | - blocks. | + +------------+------------+-----------+ +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">ASCII grid table</p> +<table class="docutils align-default" id="id12"> +<caption><span class="caption-number">Table 20 </span><span class="caption-text">grid table example</span><a class="headerlink" href="#id12" title="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 14.3%" /> +<col style="width: 14.3%" /> +<col style="width: 71.4%" /> +</colgroup> +<thead> +<tr class="row-odd"><th class="head"><p>Header 1</p></th> +<th class="head"><p>Header 2</p></th> +<th class="head"><p>Header 3</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><td><p>body row 1</p></td> +<td><p>column 2</p></td> +<td><p>column 3</p></td> +</tr> +<tr class="row-odd"><td><p>body row 2</p></td> +<td colspan="2"><p>Cells may span columns.</p></td> +</tr> +<tr class="row-even"><td><p>body row 3</p></td> +<td rowspan="2"><p>Cells may +span rows.</p></td> +<td rowspan="2"><ul class="simple"> +<li><p>Cells</p></li> +<li><p>contain</p></li> +<li><p>blocks.</p></li> +</ul> +</td> +</tr> +<tr class="row-odd"><td><p>body row 4</p></td> +</tr> +</tbody> +</table> +</div> +</section> +<section id="flat-table"> +<span id="rest-flat-table"></span><h3><a class="toc-backref" href="#id47" role="doc-backlink">flat-table</a><a class="headerlink" href="#flat-table" title="Link to this heading">¶</a></h3> +<p>The <code class="docutils literal notranslate"><span class="pre">flat-table</span></code> is a further developed variant of the <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/table-markup.html#list-table-directives" title="(in LinuxDoc v20240509)"><span class="xref std std-ref">list tables</span></a>. It is a double-stage list similar to the +<a class="extlink-dudir reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table">list-table</a> with some additional features:</p> +<dl class="simple"> +<dt>column-span: <code class="docutils literal notranslate"><span class="pre">cspan</span></code></dt><dd><p>with the role <code class="docutils literal notranslate"><span class="pre">cspan</span></code> a cell can be extended through additional columns</p> +</dd> +<dt>row-span: <code class="docutils literal notranslate"><span class="pre">rspan</span></code></dt><dd><p>with the role <code class="docutils literal notranslate"><span class="pre">rspan</span></code> a cell can be extended through additional rows</p> +</dd> +<dt>auto-span:</dt><dd><p>spans rightmost cell of a table row over the missing cells on the right side +of that table-row. With Option <code class="docutils literal notranslate"><span class="pre">:fill-cells:</span></code> this behavior can changed +from <em>auto span</em> to <em>auto fill</em>, which automatically inserts (empty) cells +instead of spanning the last cell.</p> +</dd> +<dt>options:</dt><dd><dl class="field-list simple"> +<dt class="field-odd">header-rows<span class="colon">:</span></dt> +<dd class="field-odd"><p>[int] count of header rows</p> +</dd> +<dt class="field-even">stub-columns<span class="colon">:</span></dt> +<dd class="field-even"><p>[int] count of stub columns</p> +</dd> +<dt class="field-odd">widths<span class="colon">:</span></dt> +<dd class="field-odd"><p>[[int] [int] … ] widths of columns</p> +</dd> +<dt class="field-even">fill-cells<span class="colon">:</span></dt> +<dd class="field-even"><p>instead of auto-span missing cells, insert missing cells</p> +</dd> +</dl> +</dd> +<dt>roles:</dt><dd><dl class="field-list simple"> +<dt class="field-odd">cspan<span class="colon">:</span></dt> +<dd class="field-odd"><p>[int] additional columns (<em>morecols</em>)</p> +</dd> +<dt class="field-even">rspan<span class="colon">:</span></dt> +<dd class="field-even"><p>[int] additional rows (<em>morerows</em>)</p> +</dd> +</dl> +</dd> +</dl> +<p>The example below shows how to use this markup. The first level of the staged +list is the <em>table-row</em>. In the <em>table-row</em> there is only one markup allowed, +the list of the cells in this <em>table-row</em>. Exception are <em>comments</em> ( <code class="docutils literal notranslate"><span class="pre">..</span></code> ) +and <em>targets</em> (e.g. a ref to <a class="reference internal" href="#row-body-2"><span class="std std-ref">row 2 of table’s body</span></a>).</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">flat-table</span><span class="p">::</span> <span class="s">``flat-table``</span> example + <span class="nc">:header-rows:</span> 2 + <span class="nc">:stub-columns:</span> 1 + <span class="nc">:widths:</span> 1 1 1 1 2 + + <span class="m">*</span> - <span class="na">:rspan:</span><span class="nv">`1`</span> head / stub + <span class="m">-</span> <span class="na">:cspan:</span><span class="nv">`3`</span> head 1.1-4 + + <span class="m">*</span> - head 2.1 + <span class="m">-</span> head 2.2 + <span class="m">-</span> head 2.3 + <span class="m">-</span> head 2.4 + + <span class="m">*</span> .. row body 1 / this is a comment + + <span class="m">-</span> row 1 + <span class="m">-</span> <span class="na">:rspan:</span><span class="nv">`2`</span> cell 1-3.1 + <span class="m">-</span> cell 1.2 + <span class="m">-</span> cell 1.3 + <span class="m">-</span> cell 1.4 + + <span class="m">*</span> .. Comments and targets are allowed on <span class="ge">*table-row*</span> stage. +<span class="p"> ..</span> <span class="nt">_`row body 2`:</span> + + <span class="m">-</span> row 2 + <span class="m">-</span> cell 2.2 + <span class="m">-</span> <span class="na">:rspan:</span><span class="nv">`1`</span> <span class="na">:cspan:</span><span class="nv">`1`</span> + cell 2.3 with a span over + + <span class="m">*</span> col 3-4 & + <span class="m">*</span> row 2-3 + + <span class="m">*</span> - row 3 + <span class="m">-</span> cell 3.2 + + <span class="m">*</span> - row 4 + <span class="m">-</span> cell 4.1 + <span class="m">-</span> cell 4.2 + <span class="m">-</span> cell 4.3 + <span class="m">-</span> cell 4.4 + + <span class="m">*</span> - row 5 + <span class="m">-</span> cell 5.1 with automatic span to right end + + <span class="m">*</span> - row 6 + <span class="m">-</span> cell 6.1 + <span class="m">-</span> .. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">List table</p> +<table class="docutils align-default" id="id13"> +<caption><span class="caption-number">Table 21 </span><span class="caption-text"><code class="docutils literal notranslate"><span class="pre">flat-table</span></code> example</span><a class="headerlink" href="#id13" title="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 16.7%" /> +<col style="width: 16.7%" /> +<col style="width: 16.7%" /> +<col style="width: 16.7%" /> +<col style="width: 33.3%" /> +</colgroup> +<thead> +<tr class="row-odd"><th class="head stub" rowspan="2"><p> head / stub</p></th> +<th class="head" colspan="4"><p> head 1.1-4</p></th> +</tr> +<tr class="row-even"><th class="head stub"><p>head 2.1</p></th> +<th class="head"><p>head 2.2</p></th> +<th class="head"><p>head 2.3</p></th> +<th class="head"><p>head 2.4</p></th> +</tr> +</thead> +<tbody> +<tr class="row-odd"><th class="stub"><p>row 1</p></th> +<td rowspan="3"><p> cell 1-3.1</p></td> +<td><p>cell 1.2</p></td> +<td><p>cell 1.3</p></td> +<td><p>cell 1.4</p></td> +</tr> +<tr class="row-even"><th class="stub"><p>row 2</p> +</th> +<td><p>cell 2.2</p> +</td> +<td colspan="2" rowspan="2"><p id="row-body-2"> +cell 2.3 with a span over</p> +<ul class="simple"> +<li><p>col 3-4 &</p></li> +<li><p>row 2-3</p></li> +</ul> +</td> +</tr> +<tr class="row-odd"><th class="stub"><p>row 3</p></th> +<td><p>cell 3.2</p></td> +</tr> +<tr class="row-even"><th class="stub"><p>row 4</p></th> +<td><p>cell 4.1</p></td> +<td><p>cell 4.2</p></td> +<td><p>cell 4.3</p></td> +<td><p>cell 4.4</p></td> +</tr> +<tr class="row-odd"><th class="stub"><p>row 5</p></th> +<td colspan="4"><p>cell 5.1 with automatic span to right end</p></td> +</tr> +<tr class="row-even"><th class="stub"><p>row 6</p></th> +<td><p>cell 6.1</p></td> +<td colspan="3"></td> +</tr> +</tbody> +</table> +</div> +</section> +<section id="csv-table"> +<h3><a class="toc-backref" href="#id48" role="doc-backlink">CSV table</a><a class="headerlink" href="#csv-table" title="Link to this heading">¶</a></h3> +<p>CSV table might be the choice if you want to include CSV-data from a outstanding +(build) process into your documentation.</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">csv-table</span><span class="p">::</span> CSV table example + <span class="nc">:header:</span> .. , Column 1, Column 2 + <span class="nc">:widths:</span> 2 5 5 + <span class="nc">:stub-columns:</span> 1 + <span class="nc">:file:</span> csv_table.txt +</pre></div> +</div> +<p>Content of file <code class="docutils literal notranslate"><span class="pre">csv_table.txt</span></code>:</p> +<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">stub</span> <span class="n">col</span> <span class="n">row</span> <span class="mi">1</span><span class="p">,</span> <span class="n">column</span><span class="p">,</span> <span class="s2">"loremLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy</span> +<span class="n">eirmod</span> <span class="n">tempor</span> <span class="n">invidunt</span> <span class="n">ut</span> <span class="n">labore</span> <span class="n">et</span> <span class="n">dolore</span> <span class="n">magna</span> <span class="n">aliquyam</span> <span class="n">erat</span><span class="p">,</span> <span class="n">sed</span> <span class="n">diam</span> +<span class="n">voluptua</span><span class="o">.</span><span class="s2">"</span> +<span class="n">stub</span> <span class="n">col</span> <span class="n">row</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">"At vero eos et accusam et justo duo dolores et ea rebum. Stet clita</span> +<span class="n">kasd</span> <span class="n">gubergren</span><span class="p">,</span> <span class="n">no</span> <span class="n">sea</span> <span class="n">takimata</span> <span class="n">sanctus</span> <span class="n">est</span> <span class="n">Lorem</span> <span class="n">ipsum</span> <span class="n">dolor</span> <span class="n">sit</span> <span class="n">amet</span><span class="o">.</span><span class="s2">", column</span> +<span class="n">stub</span> <span class="n">col</span> <span class="n">row</span> <span class="mi">1</span><span class="p">,</span> <span class="n">column</span><span class="p">,</span> <span class="n">column</span> +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">CSV table</p> +<table class="docutils align-default" id="id14"> +<caption><span class="caption-number">Table 22 </span><span class="caption-text">CSV table example</span><a class="headerlink" href="#id14" title="Link to this table">¶</a></caption> +<colgroup> +<col style="width: 23.1%" /> +<col style="width: 38.5%" /> +<col style="width: 38.5%" /> +</colgroup> +<thead> +<tr class="row-odd"><th class="head stub"></th> +<th class="head"><p>Column 1</p></th> +<th class="head"><p>Column 2</p></th> +</tr> +</thead> +<tbody> +<tr class="row-even"><th class="stub"><p>stub col row 1</p></th> +<td><p>column</p></td> +<td><p>loremLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam +voluptua.</p></td> +</tr> +<tr class="row-odd"><th class="stub"><p>stub col row 1</p></th> +<td><p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita +kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p></td> +<td><p>column</p></td> +</tr> +<tr class="row-even"><th class="stub"><p>stub col row 1</p></th> +<td><p>column</p></td> +<td><p>column</p></td> +</tr> +</tbody> +</table> +</div> +</section> +</section> +<section id="templating"> +<h2><a class="toc-backref" href="#id49" role="doc-backlink">Templating</a><a class="headerlink" href="#templating" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<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-install"><span class="std std-ref">Python environment (make install)</span></a>.</p> +</aside> +<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-install"><span class="std std-ref">Python environment (make install)</span></a> (with SearXNG modules installed). We use this e.g. to build chapter: +<a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a>. Below the jinja directive from the +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/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="gh">==================</span> +<span class="gh">Configured Engines</span> +<span class="gh">==================</span> + +<span class="p">..</span> <span class="ow">sidebar</span><span class="p">::</span> Further reading .. + + <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`settings categories_as_tabs`</span> + <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`engines-dev`</span> + <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`settings engine`</span> + <span class="m">-</span> <span class="na">:ref:</span><span class="nv">`general engine configuration`</span> + +<span class="p">..</span> <span class="ow">jinja</span><span class="p">::</span> searx + + SearXNG supports {{engines | length}} search engines of which + {{enabled_engine_count}} are enabled by default. + + Engines can be assigned to multiple <span class="na">:ref:</span><span class="nv">`categories <engine categories>`</span>. + The UI displays the tabs that are configured in :ref:`categories_as_tabs + <settings categories_as_tabs>`. In addition to these UI categories (also + called <span class="ge">*tabs*</span>), engines can be queried by their name or the categories they + belong to, by using a <span class="na">:ref:</span><span class="nv">`\!bing syntax <search-syntax>`</span>. + +<span class="p">..</span> <span class="ow">contents</span><span class="p">::</span> + <span class="nc">:depth:</span> 2 + <span class="nc">:local:</span> + <span class="nc">:backlinks:</span> entry + +<span class="p">..</span> <span class="ow">jinja</span><span class="p">::</span> searx + + {% for category, engines in categories_as_tabs.items() %} + + tab <span class="s">``!{{category.replace(' ', '_')}}``</span> + --------------------------------------- + + {% for group, group_bang, engines in engines | group_engines_in_tab %} + + {% if loop.length > 1 %} + {% if group_bang %}group <span class="s">``{{group_bang}}``{% else %}{{group}}{% endif %}</span> +<span class="s"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span> +<span class="s"> {% endif %}</span> + +<span class="s"> .. flat-table::</span> +<span class="s"> :header-rows: 2</span> +<span class="s"> :stub-columns: 1</span> +<span class="s"> :widths: 10 1 10 1 1 1 1 1 1 1</span> + +<span class="s"> * - :cspan:`5` Engines configured by default (in :ref:`settings.yml <engine settings>`)</span> +<span class="s"> - :cspan:`3` :ref:`Supported features <engine file>`</span> + +<span class="s"> * - Name</span> +<span class="s"> - !bang</span> +<span class="s"> - Module</span> +<span class="s"> - Disabled</span> +<span class="s"> - Timeout</span> +<span class="s"> - Weight</span> +<span class="s"> - Paging</span> +<span class="s"> - Locale</span> +<span class="s"> - Safe search</span> +<span class="s"> - Time range</span> + +<span class="s"> {% for mod in engines %}</span> + +<span class="s"> * - `{{mod.name}} <{{mod.about and mod.about.website}}>`_</span> +<span class="s"> {%- if mod.about and mod.about.language %}</span> +<span class="s"> ({{mod.about.language | upper}})</span> +<span class="s"> {%- endif %}</span> +<span class="s"> - ``</span>!{{mod.shortcut}}<span class="s">``</span> +<span class="s"> - {%- if 'searx.engines.' + mod.__name__ in documented_modules %}</span> +<span class="s"> :py:mod:`~searx.engines.{{mod.__name__}}`</span> +<span class="s"> {%- else %}</span> +<span class="s"> :origin:`{{mod.__name__}} <searx/engines/{{mod.__name__}}.py>`</span> +<span class="s"> {%- endif %}</span> +<span class="s"> - {{(mod.disabled and "y") or ""}}</span> +<span class="s"> - {{mod.timeout}}</span> +<span class="s"> - {{mod.weight or 1 }}</span> +<span class="s"> {% if mod.engine_type == 'online' %}</span> +<span class="s"> - {{(mod.paging and "y") or ""}}</span> +<span class="s"> - {{(mod.language_support and "y") or ""}}</span> +<span class="s"> - {{(mod.safesearch and "y") or ""}}</span> +<span class="s"> - {{(mod.time_range_support and "y") or ""}}</span> +<span class="s"> {% else %}</span> +<span class="s"> - :cspan:`3` not applicable ({{mod.engine_type}})</span> +<span class="s"> {% endif %}</span> + +<span class="s"> {% endfor %}</span> +<span class="s"> {% endfor %}</span> +<span class="s"> {% endfor %}</span> +</pre></div> +</div> +<p>The context for the template is selected in the line <code class="docutils literal notranslate"><span class="pre">..</span> <span class="pre">jinja::</span> <span class="pre">searx</span></code>. In +sphinx’s build configuration (<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/docs/conf.py">git://docs/conf.py</a>) the <code class="docutils literal notranslate"><span class="pre">searx</span></code> context +contains the <code class="docutils literal notranslate"><span class="pre">engines</span></code> and <code class="docutils literal notranslate"><span class="pre">plugins</span></code>.</p> +<div class="highlight-py notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">searx.search</span> +<span class="kn">import</span> <span class="nn">searx.engines</span> +<span class="kn">import</span> <span class="nn">searx.plugins</span> +<span class="n">searx</span><span class="o">.</span><span class="n">search</span><span class="o">.</span><span class="n">initialize</span><span class="p">()</span> +<span class="n">jinja_contexts</span> <span class="o">=</span> <span class="p">{</span> + <span class="s1">'searx'</span><span class="p">:</span> <span class="p">{</span> + <span class="s1">'engines'</span><span class="p">:</span> <span class="n">searx</span><span class="o">.</span><span class="n">engines</span><span class="o">.</span><span class="n">engines</span><span class="p">,</span> + <span class="s1">'plugins'</span><span class="p">:</span> <span class="n">searx</span><span class="o">.</span><span class="n">plugins</span><span class="o">.</span><span class="n">plugins</span> + <span class="p">},</span> +<span class="p">}</span> +</pre></div> +</div> +</section> +<section id="tabbed-views"> +<h2><a class="toc-backref" href="#id50" role="doc-backlink">Tabbed views</a><a class="headerlink" href="#tabbed-views" title="Link to this heading">¶</a></h2> +<p>With <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs">sphinx-tabs</a> extension we have <em>tabbed views</em>. To provide installation +instructions with one tab per distribution we use the <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs#group-tabs">group-tabs</a> directive, +others are <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs#basic-tabs">basic-tabs</a> and <a class="reference external" href="https://github.com/djungelorm/sphinx-tabs#code-tabs">code-tabs</a>. Below a <em>group-tab</em> example from +<a class="reference internal" href="../admin/buildhosts.html#docs-build"><span class="std std-ref">Build docs</span></a> is shown:</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">tabs</span><span class="p">::</span> + +<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Ubuntu / debian + +<span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span> + + $<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span>shellcheck + +<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Arch Linux + +<span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span> + + $<span class="w"> </span>sudo<span class="w"> </span>pacman<span class="w"> </span>-S<span class="w"> </span>shellcheck + +<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Fedora / RHEL + +<span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> sh + + $ sudo dnf install ShellCheck +</pre></div> +</div> +</section> +<section id="math-equations"> +<span id="math"></span><h2><a class="toc-backref" href="#id51" role="doc-backlink">Math equations</a><a class="headerlink" href="#math-equations" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">About LaTeX</p> +<ul class="simple"> +<li><p><a class="reference external" href="http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/macros/latex/required/amsmath/amsldoc.pdf">amsmath user guide</a></p></li> +<li><p><a class="reference external" href="https://en.wikibooks.org/wiki/LaTeX/Mathematics">Mathematics</a></p></li> +<li><p><a class="reference internal" href="../admin/buildhosts.html#docs-build"><span class="std std-ref">Build docs</span></a></p></li> +</ul> +</aside> +<p>The input language for mathematics is LaTeX markup using the <a class="extlink-ctan reference external" href="https://ctan.org/pkg/amsmath">CTAN: amsmath</a> +package.</p> +<p>To embed LaTeX markup in reST documents, use role <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-math" title="(in Sphinx v8.2.0)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">:math:</span></code></a> for +inline and directive <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-math" title="(in Sphinx v8.2.0)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">math::</span></code></a> for block markup.</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>In <span class="na">:math:numref:</span><span class="nv">`schroedinger general`</span> the time-dependent Schrödinger equation +is shown. + +<span class="p">..</span> <span class="ow">math</span><span class="p">::</span> + <span class="nc">:label:</span> schroedinger general + + \mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle = + \hat{H} |\,\psi (t) \rangle. +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">LaTeX math equation</p> +<p>In <a class="reference internal" href="#equation-schroedinger-general">(1)</a> the time-dependent Schrödinger equation +is shown.</p> +<div class="math" id="equation-schroedinger-general"> +<p><span class="eqno">(1)<a class="headerlink" href="#equation-schroedinger-general" title="Link to this equation">¶</a></span><img src="../_images/math/a6a994cb6e7278ec30eaebe7e636046d3deccb5b.svg" alt="\mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle = + \hat{H} |\,\psi (t) \rangle."/></p> +</div></div> +<p>The next example shows the difference of <code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> (<em>textstyle</em>) and <code class="docutils literal notranslate"><span class="pre">\dfrac</span></code> +(<em>displaystyle</em>) used in a inline markup or another fraction.</p> +<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="s">``\tfrac``</span> <span class="gs">**inline example**</span> <span class="na">:math:</span><span class="nv">`\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}`</span> +<span class="s">``\dfrac``</span> <span class="gs">**inline example**</span> <span class="na">:math:</span><span class="nv">`\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}`</span> +</pre></div> +</div> +<div class="rst-example admonition"> +<p class="admonition-title">Line spacing</p> +<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam +voluptua. … +<code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <img class="math" src="../_images/math/3b8127a8eed95247f9249ea6c85e8e86df1baa82.svg" alt="\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}"/> +At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p> +<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy +eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam +voluptua. … +<code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <img class="math" src="../_images/math/07c9ff4251510b06013159f4e45ec9ab97044096.svg" alt="\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}"/> +At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p> +</div> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">reST primer</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#soft-skills">Soft skills</a></li> +<li class="toctree-l3"><a class="reference internal" href="#basic-inline-markup">Basic inline markup</a></li> +<li class="toctree-l3"><a class="reference internal" href="#basic-article-structure">Basic article structure</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#rest-template">reST template</a></li> +<li class="toctree-l4"><a class="reference internal" href="#headings">Headings</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#anchors-links">Anchors & Links</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#anchors">Anchors</a></li> +<li class="toctree-l4"><a class="reference internal" href="#link-ordinary-url">Link ordinary URL</a></li> +<li class="toctree-l4"><a class="reference internal" href="#smart-refs">Smart refs</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#literal-blocks">Literal blocks</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#rest-literal"><code class="docutils literal notranslate"><span class="pre">::</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#code-block"><code class="docutils literal notranslate"><span class="pre">code-block</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#unicode-substitution">Unicode substitution</a></li> +<li class="toctree-l3"><a class="reference internal" href="#roles">Roles</a></li> +<li class="toctree-l3"><a class="reference internal" href="#figures-images">Figures & Images</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#dot-files-aka-graphviz">DOT files (aka Graphviz)</a></li> +<li class="toctree-l4"><a class="reference internal" href="#kernel-render-dot"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> DOT</a></li> +<li class="toctree-l4"><a class="reference internal" href="#kernel-render-svg"><code class="docutils literal notranslate"><span class="pre">kernel-render</span></code> SVG</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#list-markups">List markups</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#bullet-list">Bullet list</a></li> +<li class="toctree-l4"><a class="reference internal" href="#horizontal-list">Horizontal list</a></li> +<li class="toctree-l4"><a class="reference internal" href="#definition-list">Definition list</a></li> +<li class="toctree-l4"><a class="reference internal" href="#quoted-paragraphs">Quoted paragraphs</a></li> +<li class="toctree-l4"><a class="reference internal" href="#field-lists">Field Lists</a></li> +<li class="toctree-l4"><a class="reference internal" href="#further-list-blocks">Further list blocks</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#admonitions">Admonitions</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#sidebar">Sidebar</a></li> +<li class="toctree-l4"><a class="reference internal" href="#generic-admonition">Generic admonition</a></li> +<li class="toctree-l4"><a class="reference internal" href="#specific-admonitions">Specific admonitions</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#tables">Tables</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#simple-tables">Simple tables</a></li> +<li class="toctree-l4"><a class="reference internal" href="#grid-tables">Grid tables</a></li> +<li class="toctree-l4"><a class="reference internal" href="#flat-table">flat-table</a></li> +<li class="toctree-l4"><a class="reference internal" href="#csv-table">CSV table</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#templating">Templating</a></li> +<li class="toctree-l3"><a class="reference internal" href="#tabbed-views">Tabbed views</a></li> +<li class="toctree-l3"><a class="reference internal" href="#math-equations">Math equations</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="makefile.html" title="previous chapter">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a> + <li>Next: <a href="searxng_extra/index.html" title="next chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/reST.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/rtm_asdf.html b/dev/rtm_asdf.html new file mode 100644 index 000000000..d5a2113bd --- /dev/null +++ b/dev/rtm_asdf.html @@ -0,0 +1,231 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Runtime Management — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="How to contribute" href="contribution_guide.html" /> + <link rel="prev" title="Development Quickstart" href="quickstart.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="contribution_guide.html" title="How to contribute" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="quickstart.html" title="Development Quickstart" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Runtime Management</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="runtime-management"> +<h1>Runtime Management<a class="headerlink" href="#runtime-management" title="Link to this heading">¶</a></h1> +<p>The runtimes are managed with asdf and are activated in this project via the +<a class="reference external" href=".tool-versions">.tool-versions</a>. If you have not yet installed <a class="reference external" href="https://asdf-vm.com/">asdf</a>, then +chapter <a class="reference internal" href="#introduce-asdf"><span class="std std-ref">Introduce asdf</span></a> may be of help to you.</p> +<nav class="contents local" id="contents"> +<ul class="simple"> +<li><p><a class="reference internal" href="#get-started" id="id2">Get started</a></p></li> +<li><p><a class="reference internal" href="#manage-versions" id="id3">Manage Versions</a></p></li> +<li><p><a class="reference internal" href="#introduce-asdf" id="id4">Introduce asdf</a></p></li> +</ul> +</nav> +<section id="get-started"> +<h2><a class="toc-backref" href="#id2" role="doc-backlink">Get started</a><a class="headerlink" href="#get-started" title="Link to this heading">¶</a></h2> +<p>If you have asdf installed you can install the runtimes of this project by:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/path/to/searxng +$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span><span class="c1"># will install runtimes listed in .tool-versions</span> +... +</pre></div> +</div> +</section> +<section id="manage-versions"> +<h2><a class="toc-backref" href="#id3" role="doc-backlink">Manage Versions</a><a class="headerlink" href="#manage-versions" title="Link to this heading">¶</a></h2> +<p>If you want to perform a <code class="docutils literal notranslate"><span class="pre">test</span></code> with special runtime versions of nodejs, +python or shellcheck, you can patch the <code class="docutils literal notranslate"><span class="pre">.tool-versions</span></code>:</p> +<div class="highlight-diff notranslate"><div class="highlight"><pre><span></span><span class="gd">--- a/.tool-versions</span> +<span class="gi">+++ b/.tool-versions</span> +<span class="gu">@@ -1,2 +1,2 @@</span> +<span class="gd">-python 3.12.0</span> +<span class="gd">-shellcheck 0.9.0</span> +<span class="gi">+python 3.11.6</span> +<span class="gi">+shellcheck 0.8.0</span> +</pre></div> +</div> +<p>To install use <code class="docutils literal notranslate"><span class="pre">asdf</span> <span class="pre">install</span></code> again. If the runtime tools have changed, any +existing (nodejs and python) environments should be cleaned up with a <code class="docutils literal notranslate"><span class="pre">make</span> +<span class="pre">clean</span></code>.</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>asdf<span class="w"> </span>install +... +$<span class="w"> </span>make<span class="w"> </span>clean<span class="w"> </span><span class="nb">test</span> +</pre></div> +</div> +</section> +<section id="introduce-asdf"> +<span id="id1"></span><h2><a class="toc-backref" href="#id4" role="doc-backlink">Introduce asdf</a><a class="headerlink" href="#introduce-asdf" title="Link to this heading">¶</a></h2> +<p>To <a class="reference external" href="https://asdf-vm.com/guide/getting-started.html#_2-download-asdf">download asdf</a> and <a class="reference external" href="https://asdf-vm.com/guide/getting-started.html#_3-install-asdf">install asdf</a>:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/asdf-vm/asdf.git<span class="w"> </span>~/.asdf<span class="w"> </span>--branch<span class="w"> </span><version> +$<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s1">'. "$HOME/.asdf/asdf.sh"'</span><span class="w"> </span>>><span class="w"> </span>~/.bashrc +$<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s1">'. "$HOME/.asdf/completions/asdf.bash"'</span><span class="w"> </span>>><span class="w"> </span>~/.bashrc +</pre></div> +</div> +<p>Start a new shell and try to <a class="reference external" href="https://asdf-vm.com/guide/getting-started.html#install-the-plugin">install plugins</a>:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>asdf<span class="w"> </span>plugin-list-all<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>-E<span class="w"> </span><span class="s1">'(golang|python|nodejs|shellcheck).git'</span> +golang<span class="w"> </span>https://github.com/asdf-community/asdf-golang.git +nodejs<span class="w"> </span>https://github.com/asdf-vm/asdf-nodejs.git +python<span class="w"> </span>https://github.com/danhper/asdf-python.git +shellcheck<span class="w"> </span>https://github.com/luizm/asdf-shellcheck.git + +$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>golang<span class="w"> </span>https://github.com/asdf-community/asdf-golang.git +$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>nodejs<span class="w"> </span>https://github.com/asdf-vm/asdf-nodejs.git +$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>python<span class="w"> </span>https://github.com/danhper/asdf-python.git +$<span class="w"> </span>asdf<span class="w"> </span>plugin<span class="w"> </span>add<span class="w"> </span>shellcheck<span class="w"> </span>https://github.com/luizm/asdf-shellcheck.git +</pre></div> +</div> +<p>Each plugin has dependencies, to compile runtimes visit the URLs from above and +look out for the dependencies you need to install on your OS, on Debian for the +runtimes listed above you will need:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>update +$<span class="w"> </span>sudo<span class="w"> </span>apt<span class="w"> </span>install<span class="w"> </span><span class="se">\</span> +<span class="w"> </span>dirmngr<span class="w"> </span>gpg<span class="w"> </span>curl<span class="w"> </span>gawk<span class="w"> </span>coreutils<span class="w"> </span>build-essential<span class="w"> </span>libssl-dev<span class="w"> </span>zlib1g-dev<span class="w"> </span><span class="se">\</span> +<span class="w"> </span>libbz2-dev<span class="w"> </span>libreadline-dev<span class="w"> </span>libsqlite3-dev<span class="w"> </span><span class="se">\</span> +<span class="w"> </span>libncursesw5-dev<span class="w"> </span>xz-utils<span class="w"> </span>tk-dev<span class="w"> </span>libxml2-dev<span class="w"> </span>libxmlsec1-dev<span class="w"> </span>libffi-dev<span class="w"> </span>liblzma-dev +</pre></div> +</div> +<p>With dependencies installed you can install/compile runtimes:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>golang<span class="w"> </span>latest +$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>nodejs<span class="w"> </span>latest +$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>python<span class="w"> </span>latest +$<span class="w"> </span>asdf<span class="w"> </span>install<span class="w"> </span>shellcheck<span class="w"> </span>latest +</pre></div> +</div> +<p>Python will be compiled and will take a while.</p> +<p>In the repository the version is defined in <a class="reference external" href=".tool-versions">.tool-versions</a>. Outside the +repository, its recommended that the runtime should use the versions of the OS +(<a class="reference external" href="https://asdf-vm.com/manage/versions.html#fallback-to-system-version">Fallback to System Version</a>) / if not already done register the system +versions global:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>/ +$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>golang<span class="w"> </span>system +$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>nodejs<span class="w"> </span>system +$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>python<span class="w"> </span>system +$<span class="w"> </span>asdf<span class="w"> </span>global<span class="w"> </span>shellcheck<span class="w"> </span>system +</pre></div> +</div> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Runtime Management</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#get-started">Get started</a></li> +<li class="toctree-l3"><a class="reference internal" href="#manage-versions">Manage Versions</a></li> +<li class="toctree-l3"><a class="reference internal" href="#introduce-asdf">Introduce asdf</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="quickstart.html" title="previous chapter">Development Quickstart</a> + <li>Next: <a href="contribution_guide.html" title="next chapter">How to contribute</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/rtm_asdf.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/search_api.html b/dev/search_api.html new file mode 100644 index 000000000..41e934aaf --- /dev/null +++ b/dev/search_api.html @@ -0,0 +1,227 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Search API — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Plugins" href="plugins.html" /> + <link rel="prev" title="Tineye" href="engines/online_url_search/tineye.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="plugins.html" title="Plugins" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="engines/online_url_search/tineye.html" title="Tineye" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Search API</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="search-api"> +<span id="id1"></span><h1>Search API<a class="headerlink" href="#search-api" title="Link to this heading">¶</a></h1> +<p>The search supports both <code class="docutils literal notranslate"><span class="pre">GET</span></code> and <code class="docutils literal notranslate"><span class="pre">POST</span></code>.</p> +<p>Furthermore, two endpoints <code class="docutils literal notranslate"><span class="pre">/</span></code> and <code class="docutils literal notranslate"><span class="pre">/search</span></code> are available for querying.</p> +<p><code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/</span></code></p> +<p><code class="docutils literal notranslate"><span class="pre">GET</span> <span class="pre">/search</span></code></p> +<section id="parameters"> +<h2>Parameters<a class="headerlink" href="#parameters" title="Link to this heading">¶</a></h2> +<aside class="sidebar"> +<p class="sidebar-title">Further reading ..</p> +<ul class="simple"> +<li><p><a class="reference internal" href="engines/engine_overview.html#engines-dev"><span class="std std-ref">Engine Overview</span></a></p></li> +<li><p><a class="reference internal" href="../admin/settings/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a></p></li> +<li><p><a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a></p></li> +</ul> +</aside> +<dl> +<dt><code class="docutils literal notranslate"><span class="pre">q</span></code><span class="classifier">required</span></dt><dd><p>The search query. This string is passed to external search services. Thus, +SearXNG supports syntax of each search service. For example, <code class="docutils literal notranslate"><span class="pre">site:github.com</span> +<span class="pre">SearXNG</span></code> is a valid query for Google. However, if simply the query above is +passed to any search engine which does not filter its results based on this +syntax, you might not get the results you wanted.</p> +<p>See more at <a class="reference internal" href="../user/search-syntax.html#search-syntax"><span class="std std-ref">Search syntax</span></a></p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">categories</span></code><span class="classifier">optional</span></dt><dd><p>Comma separated list, specifies the active search categories (see +<a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a>)</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">engines</span></code><span class="classifier">optional</span></dt><dd><p>Comma separated list, specifies the active search engines (see +<a class="reference internal" href="../user/configured_engines.html#configured-engines"><span class="std std-ref">Configured Engines</span></a>).</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">language</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a></span></dt><dd><p>Code of the language.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">pageno</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">1</span></code></span></dt><dd><p>Search page number.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">time_range</span></code><span class="classifier">optional</span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">day</span></code>, <code class="docutils literal notranslate"><span class="pre">month</span></code>, <code class="docutils literal notranslate"><span class="pre">year</span></code> ]</p> +<p>Time range of search for engines which support it. See if an engine supports +time range search in the preferences page of an instance.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">format</span></code><span class="classifier">optional</span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">json</span></code>, <code class="docutils literal notranslate"><span class="pre">csv</span></code>, <code class="docutils literal notranslate"><span class="pre">rss</span></code> ]</p> +<p>Output format of results. Format needs to be activated in <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a>.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">results_on_new_tab</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">0</span></code></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code> ]</p> +<p>Open search results on new tab.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">image_proxy</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_server.html#settings-server"><span class="std std-ref">server:</span></a></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">True</span></code>, <code class="docutils literal notranslate"><span class="pre">False</span></code> ]</p> +<p>Proxy image results through SearXNG.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">autocomplete</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">google</span></code>, <code class="docutils literal notranslate"><span class="pre">dbpedia</span></code>, <code class="docutils literal notranslate"><span class="pre">duckduckgo</span></code>, <code class="docutils literal notranslate"><span class="pre">mwmbl</span></code>, <code class="docutils literal notranslate"><span class="pre">startpage</span></code>, +<code class="docutils literal notranslate"><span class="pre">wikipedia</span></code>, <code class="docutils literal notranslate"><span class="pre">stract</span></code>, <code class="docutils literal notranslate"><span class="pre">swisscows</span></code>, <code class="docutils literal notranslate"><span class="pre">qwant</span></code> ]</p> +<p>Service which completes words as you type.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">safesearch</span></code><span class="classifier">default from <a class="reference internal" href="../admin/settings/settings_search.html#settings-search"><span class="std std-ref">search:</span></a></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code>, <code class="docutils literal notranslate"><span class="pre">2</span></code> ]</p> +<p>Filter search results of engines which support safe search. See if an engine +supports safe search in the preferences page of an instance.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">theme</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">simple</span></code></span></dt><dd><p>[ <code class="docutils literal notranslate"><span class="pre">simple</span></code> ]</p> +<p>Theme of instance.</p> +<p>Please note, available themes depend on an instance. It is possible that an +instance administrator deleted, created or renamed themes on their instance. +See the available options in the preferences page of the instance.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">enabled_plugins</span></code><span class="classifier">optional</span></dt><dd><p>List of enabled plugins.</p> +<dl class="field-list"> +<dt class="field-odd">default<span class="colon">:</span></dt> +<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">Hash_plugin</span></code>, <code class="docutils literal notranslate"><span class="pre">Self_Information</span></code>, +<code class="docutils literal notranslate"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal notranslate"><span class="pre">Ahmia_blacklist</span></code></p> +</dd> +<dt class="field-even">values<span class="colon">:</span></dt> +<dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">Hash_plugin</span></code>, <code class="docutils literal notranslate"><span class="pre">Self_Information</span></code>, +<code class="docutils literal notranslate"><span class="pre">Tracker_URL_remover</span></code>, <code class="docutils literal notranslate"><span class="pre">Ahmia_blacklist</span></code>,</p> +<p><code class="docutils literal notranslate"><span class="pre">Hostnames_plugin</span></code>, <code class="docutils literal notranslate"><span class="pre">Open_Access_DOI_rewrite</span></code>, +<code class="docutils literal notranslate"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal notranslate"><span class="pre">Tor_check_plugin</span></code></p> +</dd> +</dl> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">disabled_plugins</span></code>: optional</dt><dd><p>List of disabled plugins.</p> +<dl class="field-list simple"> +<dt class="field-odd">default<span class="colon">:</span></dt> +<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">Hostnames_plugin</span></code>, <code class="docutils literal notranslate"><span class="pre">Open_Access_DOI_rewrite</span></code>, +<code class="docutils literal notranslate"><span class="pre">Vim-like_hotkeys</span></code>, <code class="docutils literal notranslate"><span class="pre">Tor_check_plugin</span></code></p> +</dd> +<dt class="field-even">values<span class="colon">:</span></dt> +<dd class="field-even"><p>see values from <code class="docutils literal notranslate"><span class="pre">enabled_plugins</span></code></p> +</dd> +</dl> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">enabled_engines</span></code><span class="classifier">optional</span><span class="classifier"><em>all</em> <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">engines</a></span></dt><dd><p>List of enabled engines.</p> +</dd> +<dt><code class="docutils literal notranslate"><span class="pre">disabled_engines</span></code><span class="classifier">optional</span><span class="classifier"><em>all</em> <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/engines">engines</a></span></dt><dd><p>List of disabled engines.</p> +</dd> +</dl> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Search API</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#parameters">Parameters</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="engines/online_url_search/tineye.html" title="previous chapter">Tineye</a> + <li>Next: <a href="plugins.html" title="next chapter">Plugins</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/search_api.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/searxng_extra/index.html b/dev/searxng_extra/index.html new file mode 100644 index 000000000..490e4f3f9 --- /dev/null +++ b/dev/searxng_extra/index.html @@ -0,0 +1,158 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>Tooling box searxng_extra — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="searxng_extra/update/" href="update.html" /> + <link rel="prev" title="reST primer" href="../reST.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="update.html" title="searxng_extra/update/" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="../reST.html" title="reST primer" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="tooling-box-searxng-extra"> +<span id="searxng-extra"></span><h1>Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code><a class="headerlink" href="#tooling-box-searxng-extra" title="Link to this heading">¶</a></h1> +<p>In the folder <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/">git://searxng_extra/</a> we maintain some tools useful for CI and +developers.</p> +<div class="toctree-wrapper compound"> +<ul> +<li class="toctree-l1"><a class="reference internal" href="update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a><ul> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-ahmia-blacklist-py"><code class="docutils literal notranslate"><span class="pre">update_ahmia_blacklist.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-currencies-py"><code class="docutils literal notranslate"><span class="pre">update_currencies.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-engine-descriptions-py"><code class="docutils literal notranslate"><span class="pre">update_engine_descriptions.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-external-bangs-py"><code class="docutils literal notranslate"><span class="pre">update_external_bangs.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-firefox-version-py"><code class="docutils literal notranslate"><span class="pre">update_firefox_version.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-engine-traits-py"><code class="docutils literal notranslate"><span class="pre">update_engine_traits.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-osm-keys-tags-py"><code class="docutils literal notranslate"><span class="pre">update_osm_keys_tags.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-pygments-py"><code class="docutils literal notranslate"><span class="pre">update_pygments.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-locales-py"><code class="docutils literal notranslate"><span class="pre">update_locales.py</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="update.html#update-wikidata-units-py"><code class="docutils literal notranslate"><span class="pre">update_wikidata_units.py</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li> +</ul> +</div> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="../engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul> +<li class="toctree-l3"><a class="reference internal" href="update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li> +<li class="toctree-l3"><a class="reference internal" href="standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="../reST.html" title="previous chapter">reST primer</a> + <li>Next: <a href="update.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/searxng_extra/index.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/searxng_extra/standalone_searx.py.html b/dev/searxng_extra/standalone_searx.py.html new file mode 100644 index 000000000..607d05b23 --- /dev/null +++ b/dev/searxng_extra/standalone_searx.py.html @@ -0,0 +1,142 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>searxng_extra/standalone_searx.py — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="DevOps tooling box" href="../../utils/index.html" /> + <link rel="prev" title="searxng_extra/update/" href="update.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="../../utils/index.html" title="DevOps tooling box" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="update.html" title="searxng_extra/update/" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a> »</li> + <li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="searxng-extra-standalone-searx-py"> +<span id="standalone-searx-py"></span><h1><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code><a class="headerlink" href="#searxng-extra-standalone-searx-py" title="Link to this heading">¶</a></h1> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="../engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="update.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a> + <ul> + <li>Previous: <a href="update.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a> + <li>Next: <a href="../../utils/index.html" title="next chapter">DevOps tooling box</a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/searxng_extra/standalone_searx.py.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/searxng_extra/update.html b/dev/searxng_extra/update.html new file mode 100644 index 000000000..8a6712cd4 --- /dev/null +++ b/dev/searxng_extra/update.html @@ -0,0 +1,196 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../../"> + <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>searxng_extra/update/ — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../../_static/searxng.css?v=52e4ff28" /> + <script src="../../_static/documentation_options.js?v=532e341d"></script> + <script src="../../_static/doctools.js?v=9a2dae69"></script> + <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="searxng_extra/standalone_searx.py" href="standalone_searx.py.html" /> + <link rel="prev" title="Tooling box searxng_extra" href="index.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="standalone_searx.py.html" title="searxng_extra/standalone_searx.py" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="index.html" title="Tooling box searxng_extra" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="../index.html" >Developer documentation</a> »</li> + <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a> »</li> + <li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="searxng-extra-update"> +<h1><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code><a class="headerlink" href="#searxng-extra-update" title="Link to this heading">¶</a></h1> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/__init__.py">[source]</a></p> +<p>Scripts to update static data in <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searx/data/">git://searx/data/</a></p> +<section id="update-ahmia-blacklist-py"> +<span id="id1"></span><h2><code class="docutils literal notranslate"><span class="pre">update_ahmia_blacklist.py</span></code><a class="headerlink" href="#update-ahmia-blacklist-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_ahmia_blacklist.py">[source]</a></p> +</section> +<section id="update-currencies-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_currencies.py</span></code><a class="headerlink" href="#update-currencies-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_currencies.py">[source]</a></p> +</section> +<section id="update-engine-descriptions-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_engine_descriptions.py</span></code><a class="headerlink" href="#update-engine-descriptions-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_engine_descriptions.py">[source]</a></p> +</section> +<section id="update-external-bangs-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_external_bangs.py</span></code><a class="headerlink" href="#update-external-bangs-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_external_bangs.py">[source]</a></p> +</section> +<section id="update-firefox-version-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_firefox_version.py</span></code><a class="headerlink" href="#update-firefox-version-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_firefox_version.py">[source]</a></p> +</section> +<section id="update-engine-traits-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_engine_traits.py</span></code><a class="headerlink" href="#update-engine-traits-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_engine_traits.py">[source]</a></p> +</section> +<section id="update-osm-keys-tags-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_osm_keys_tags.py</span></code><a class="headerlink" href="#update-osm-keys-tags-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_osm_keys_tags.py">[source]</a></p> +</section> +<section id="update-pygments-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_pygments.py</span></code><a class="headerlink" href="#update-pygments-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_pygments.py">[source]</a></p> +</section> +<section id="update-locales-py"> +<span id="id2"></span><h2><code class="docutils literal notranslate"><span class="pre">update_locales.py</span></code><a class="headerlink" href="#update-locales-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_locales.py">[source]</a></p> +</section> +<section id="update-wikidata-units-py"> +<h2><code class="docutils literal notranslate"><span class="pre">update_wikidata_units.py</span></code><a class="headerlink" href="#update-wikidata-units-py" title="Link to this heading">¶</a></h2> +<p><a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/searxng_extra/update/update_wikidata_units.py">[source]</a></p> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../../index.html"> + <img class="logo" src="../../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="../rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="../contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="../engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="../search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="../plugins.html">Plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="../translation.html">Translation</a></li> +<li class="toctree-l2"><a class="reference internal" href="../lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="../makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="../reST.html">reST primer</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a><ul class="current"> +<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">searxng_extra/update/</span></code></a><ul> +<li class="toctree-l4"><a class="reference internal" href="#update-ahmia-blacklist-py"><code class="docutils literal notranslate"><span class="pre">update_ahmia_blacklist.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-currencies-py"><code class="docutils literal notranslate"><span class="pre">update_currencies.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-engine-descriptions-py"><code class="docutils literal notranslate"><span class="pre">update_engine_descriptions.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-external-bangs-py"><code class="docutils literal notranslate"><span class="pre">update_external_bangs.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-firefox-version-py"><code class="docutils literal notranslate"><span class="pre">update_firefox_version.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-engine-traits-py"><code class="docutils literal notranslate"><span class="pre">update_engine_traits.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-osm-keys-tags-py"><code class="docutils literal notranslate"><span class="pre">update_osm_keys_tags.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-pygments-py"><code class="docutils literal notranslate"><span class="pre">update_pygments.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-locales-py"><code class="docutils literal notranslate"><span class="pre">update_locales.py</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#update-wikidata-units-py"><code class="docutils literal notranslate"><span class="pre">update_wikidata_units.py</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="standalone_searx.py.html"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../../index.html">Overview</a> + <ul> + <li><a href="../index.html">Developer documentation</a> + <ul> + <li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a> + <ul> + <li>Previous: <a href="index.html" title="previous chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a> + <li>Next: <a href="standalone_searx.py.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">searxng_extra/standalone_searx.py</span></code></a></ul> + </li></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../../_sources/dev/searxng_extra/update.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file diff --git a/dev/translation.html b/dev/translation.html new file mode 100644 index 000000000..91b8429ae --- /dev/null +++ b/dev/translation.html @@ -0,0 +1,195 @@ +<!DOCTYPE html> + +<html lang="en" data-content_root="../"> + <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>Translation — SearXNG Documentation (2025.1.10+94a0b415e)</title> + <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" /> + <link rel="stylesheet" type="text/css" href="../_static/searxng.css?v=52e4ff28" /> + <script src="../_static/documentation_options.js?v=532e341d"></script> + <script src="../_static/doctools.js?v=9a2dae69"></script> + <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> + <script data-project="searxng" data-version="2025.1.10+94a0b415e" src="../_static/describe_version.js?v=fa7f30d0"></script> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link rel="next" title="Developing in Linux Containers" href="lxcdev.html" /> + <link rel="prev" title="Plugins" href="plugins.html" /> + </head><body> + <div class="related" role="navigation" aria-label="Related"> + <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="right" > + <a href="lxcdev.html" title="Developing in Linux Containers" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="plugins.html" title="Plugins" + accesskey="P">previous</a> |</li> + <li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2025.1.10+94a0b415e)</a> »</li> + <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li> + <li class="nav-item nav-item-this"><a href="">Translation</a></li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + + <section id="translation"> +<span id="id1"></span><h1>Translation<a class="headerlink" href="#translation" title="Link to this heading">¶</a></h1> +<aside class="sidebar"> +<p class="sidebar-title"><a class="reference external" href="https://translate.codeberg.org/projects/searxng/"><img alt="translated" src="https://translate.codeberg.org/widgets/searxng/-/searxng/svg-badge.svg" /></a></p> +<ul class="simple"> +<li><p><a class="reference internal" href="../src/searx.babel_extract.html#searx-babel-extract"><span class="std std-ref">Custom message extractor (i18n)</span></a></p></li> +<li><p><a class="reference external" href="https://docs.weblate.org">Weblate</a></p></li> +<li><p>SearXNG <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a></p></li> +<li><p>SearXNG <a class="reference external" href="https://translate.codeberg.org/projects/searxng/searxng/#repository">Weblate repository</a></p></li> +<li><p>Weblate Client: <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html">wlc</a></p></li> +<li><p>Babel Command-Line: <a class="reference external" href="http://babel.pocoo.org/en/latest/cmdline.html">pybabel</a></p></li> +<li><p><a class="reference external" href="https://docs.weblate.org/en/latest/workflows.html">weblate workflow</a></p></li> +</ul> +</aside> +<p>Translation takes place on <a class="reference external" href="https://translate.codeberg.org/projects/searxng/">translate.codeberg.org</a>.</p> +<p>Translations which has been added by translators on the <a class="reference external" href="https://translate.codeberg.org/projects/searxng/">translate.codeberg.org</a> UI are +committed to Weblate’s counterpart of the SearXNG <em>origin</em> repository which is +located at <code class="docutils literal notranslate"><span class="pre">https://translate.codeberg.org/git/searxng/searxng</span></code>.</p> +<p>There is no need to clone this repository, <a class="reference internal" href="#searxng-weblate-workflow"><span class="std std-ref">SearXNG’s PR workflow to be in sync with Weblate</span></a> take +care of the synchronization with the <em>origin</em>. To avoid merging commits from +the counterpart directly on the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch of <em>SearXNG origin</em>, a <em>pull +request</em> (PR) is created by this workflow.</p> +<p>Weblate monitors the <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a>, not the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch. This +branch is an <a class="reference external" href="https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---orphanltnewbranchgt">orphan branch</a>, decoupled from the master branch (we already know +orphan branches from the <code class="docutils literal notranslate"><span class="pre">gh-pages</span></code>). The <a class="reference external" href="https://github.com/searxng/searxng/tree/translations">translations branch</a> contains +only the</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">translation/messages.pot</span></code> and the</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.po</span></code> files, nothing else.</p></li> +</ul> +<figure class="align-default" id="id3"> +<span id="searxng-weblate-workflow"></span><img alt="../_images/translation.svg" src="../_images/translation.svg" /> +<figcaption> +<p><span class="caption-number">Fig. 3 </span><span class="caption-text">SearXNG’s PR workflow to be in sync with Weblate</span><a class="headerlink" href="#id3" title="Link to this image">¶</a></p> +</figcaption> +</figure> +<dl class="simple"> +<dt>Sync from <em>origin</em> to <em>weblate</em>: using <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">weblate.push.translations</span></code></dt><dd><p>For each commit on the <code class="docutils literal notranslate"><span class="pre">master</span></code> branch of SearXNG <em>origin</em> the GitHub job +<a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/integration.yml">babel / Update translations branch</a> checks for updated translations.</p> +</dd> +<dt>Sync from <em>weblate</em> to <em>origin</em>: using <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">weblate.translations.commit</span></code></dt><dd><p>Every Friday, the GitHub workflow <a class="extlink-origin reference external" href="https://github.com/searxng/searxng/blob/master/.github/workflows/translations-update.yml">babel / create PR for additions from +weblate</a> creates a PR with the +updated translation files:</p> +<ul class="simple"> +<li><p><code class="docutils literal notranslate"><span class="pre">translation/messages.pot</span></code>,</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.po</span></code> and</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">translation/*/messages.mo</span></code></p></li> +</ul> +</dd> +</dl> +<section id="id2"> +<h2>wlc<a class="headerlink" href="#id2" title="Link to this heading">¶</a></h2> +<p>All weblate integration is done by GitHub workflows, but if you want to use <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html">wlc</a>, +copy this content into <a class="reference external" href="https://docs.weblate.org/en/latest/wlc.html#wlc-config">wlc configuration</a> in your HOME <code class="docutils literal notranslate"><span class="pre">~/.config/weblate</span></code></p> +<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[keys]</span> +<span class="na">https</span><span class="o">:</span><span class="s">//translate.codeberg.org/api/ = APIKEY</span> +</pre></div> +</div> +<p>Replace <code class="docutils literal notranslate"><span class="pre">APIKEY</span></code> by your <a class="reference external" href="https://translate.codeberg.org/accounts/profile/#api">API key</a>.</p> +</section> +</section> + + + <div class="clearer"></div> + </div> + </div> + </div> + <span id="sidebar-top"></span> + <div class="sphinxsidebar" role="navigation" aria-label="Main"> + <div class="sphinxsidebarwrapper"> + + + <p class="logo"><a href="../index.html"> + <img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo of SearXNG"/> + </a></p> + + +<h3><a href="../index.html">Table of Contents</a></h3> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li> +<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li> +<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li> +<li class="toctree-l2"><a class="reference internal" href="rtm_asdf.html">Runtime Management</a></li> +<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li> +<li class="toctree-l2"><a class="reference internal" href="engines/index.html">Engine Implementations</a></li> +<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li> +<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li> +<li class="toctree-l2 current"><a class="current reference internal" href="#">Translation</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#id2">wlc</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li> +<li class="toctree-l2"><a class="reference internal" href="makefile.html">Makefile & <code class="docutils literal notranslate"><span class="pre">./manage</span></code></a></li> +<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li> +<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li> +<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li> +</ul> + + <h3>Project Links</h3> + <ul> + <li><a href="https://github.com/searxng/searxng/tree/master">Source</a> + + <li><a href="https://github.com/searxng/searxng/wiki">Wiki</a> + + <li><a href="https://searx.space">Public instances</a> + + <li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a> + </ul><h3>Navigation</h3> +<ul> + <li><a href="../index.html">Overview</a> + <ul> + <li><a href="index.html">Developer documentation</a> + <ul> + <li>Previous: <a href="plugins.html" title="previous chapter">Plugins</a> + <li>Next: <a href="lxcdev.html" title="next chapter">Developing in Linux Containers</a></ul> + </li> + </ul> + </li> +</ul> +<search 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" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> + <input type="submit" value="Go" /> + </form> + </div> +</search> +<script>document.getElementById('searchbox').style.display = "block"</script> + <div role="note" aria-label="source link"> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/dev/translation.rst.txt" + rel="nofollow">Show Source</a></li> + </ul> + </div> + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer" role="contentinfo"> + © Copyright SearXNG team. + </div> + </body> +</html>
\ No newline at end of file |