mirror of https://github.com/searx/searx
add post about introducing offline engines
This commit is contained in:
parent
d51bc48967
commit
37dcd91ac7
|
@ -47,10 +47,8 @@
|
|||
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
|
||||
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
|
||||
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
|
||||
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
|
||||
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
|
||||
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
|
||||
|
@ -61,9 +59,7 @@
|
|||
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||
.highlight .fm { color: #06287e } /* Name.Function.Magic */
|
||||
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
|
||||
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Administration API — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -152,7 +155,7 @@ URL of the searx instance and values are customizable.</p>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>How to protect an instance — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -164,7 +167,7 @@
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>How to setup result proxy — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -78,7 +81,7 @@ but it is possible to proxify all the result URLs with an external service,
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Searx admin interface: manage your instance from your browser — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -91,7 +94,7 @@ which does not affect existing instances.</p>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Blog — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -42,6 +45,7 @@
|
|||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="python3.html">Introducing Python3 support</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="admin.html">Searx admin interface: manage your instance from your browser</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="intro-offline.html">Preparation for offline engines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -70,7 +74,7 @@
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,122 @@
|
|||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Preparation for offline engines — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.12.0',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: '.txt'
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="../_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="../_static/doctools.js"></script>
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
|
||||
|
||||
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="preparation-for-offline-engines">
|
||||
<h1>Preparation for offline engines<a class="headerlink" href="#preparation-for-offline-engines" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="offline-engines">
|
||||
<h2>Offline engines<a class="headerlink" href="#offline-engines" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To extend the functionality of searx, offline engines are going to be introduced. An offline engine is an engine which does not need Internet connection to perform a search and does not use HTTP to communicate.</p>
|
||||
<p>Offline engines can be configured as online engines, by adding those to the <cite>engines</cite> list of <cite>settings.yml</cite>. Thus, searx finds the engine file and imports it.</p>
|
||||
<p>Example skeleton for the new engines:</p>
|
||||
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">PIPE</span><span class="p">,</span> <span class="n">Popen</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">offline</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">init</span><span class="p">(</span><span class="n">settings</span><span class="p">):</span>
|
||||
<span class="k">pass</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">search</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="n">params</span><span class="p">):</span>
|
||||
<span class="n">process</span> <span class="o">=</span> <span class="n">Popen</span><span class="p">([</span><span class="s1">'ls'</span><span class="p">,</span> <span class="n">query</span><span class="p">],</span> <span class="n">stdout</span><span class="o">=</span><span class="n">PIPE</span><span class="p">)</span>
|
||||
<span class="n">return_code</span> <span class="o">=</span> <span class="n">process</span><span class="o">.</span><span class="n">wait</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">return_code</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s1">'non-zero return code'</span><span class="p">,</span> <span class="n">return_code</span><span class="p">)</span>
|
||||
|
||||
<span class="n">results</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="n">line</span> <span class="o">=</span> <span class="n">process</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>
|
||||
<span class="k">while</span> <span class="n">line</span><span class="p">:</span>
|
||||
<span class="n">result</span> <span class="o">=</span> <span class="n">parse_line</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
|
||||
<span class="n">results</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">results</span><span class="p">)</span>
|
||||
|
||||
<span class="n">line</span> <span class="o">=</span> <span class="n">process</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span>
|
||||
|
||||
<span class="k">return</span> <span class="n">results</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="development-progress">
|
||||
<h2>Development progress<a class="headerlink" href="#development-progress" title="Permalink to this headline">¶</a></h2>
|
||||
<p>First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: <a class="reference external" href="https://github.com/asciimoo/searx/wiki/Offline-engines">https://github.com/asciimoo/searx/wiki/Offline-engines</a></p>
|
||||
<p>In this development step, searx core was prepared to accept and perform offline searches. Offline search requests are scheduled together with regular offline requests.</p>
|
||||
<p>As offline searches can return arbitrary results depending on the engine, the current result templates were insufficient to present such results. Thus, a new template is introduced which is caplable of presenting arbitrary key value pairs as a table. You can check out the pull request for more details: <a class="reference external" href="https://github.com/asciimoo/searx/pull/1700">https://github.com/asciimoo/searx/pull/1700</a></p>
|
||||
</div>
|
||||
<div class="section" id="next-steps">
|
||||
<h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Today, it is possible to create/run an offline engine. However, it is going to be publicly available for everyone who knows the searx instance. So the next step is to introduce token based access for engines. This way administrators are able to limit the access to private engines.</p>
|
||||
</div>
|
||||
<div class="section" id="acknowledgement">
|
||||
<h2>Acknowledgement<a class="headerlink" href="#acknowledgement" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This development was 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>
|
||||
<div class="line-block">
|
||||
<div class="line">Happy hacking.</div>
|
||||
<div class="line">kvch // 2019.10.21 17:03</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||||
<div class="sphinxsidebarwrapper"><div class="sidebar_container body">
|
||||
<h1>Searx</h1>
|
||||
<ul>
|
||||
<li><a href="../index.html">Home</a></li>
|
||||
<li><a href="https://github.com/asciimoo/searx">Source</a></li>
|
||||
<li><a href="blog.html">Blog</a></li>
|
||||
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
|
||||
<li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
|
||||
</ul>
|
||||
<hr />
|
||||
<ul>
|
||||
<li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Introducing Python3 support — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -99,7 +102,7 @@ so we can investigate it properly.</p>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>How to contribute — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -144,7 +147,7 @@ files, you have to install it on your system. (It can be installed easily using
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Engine overview — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -114,6 +117,10 @@ settings. However, the standard way is the following:</p>
|
|||
<td>boolean</td>
|
||||
<td>support search time range</td>
|
||||
</tr>
|
||||
<tr class="row-even"><td>offline</td>
|
||||
<td>boolean</td>
|
||||
<td>engine runs offline</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -586,7 +593,7 @@ Currently the following media-types are supported:</p>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Installation — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../',
|
||||
|
@ -175,6 +178,10 @@ content:</p>
|
|||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Create a symlink to sites-enabled:</p>
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">sites</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">searx</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">nginx</span><span class="o">/</span><span class="n">sites</span><span class="o">-</span><span class="n">enabled</span><span class="o">/</span><span class="n">searx</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart service:</p>
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
|
||||
<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
|
||||
|
@ -338,7 +345,7 @@ docker run -d --name searx -p $PORT:8888 wonderfall/searx
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Plugins — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -103,7 +106,7 @@ searx.</p>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Development Quickstart — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -99,7 +102,7 @@ Node has to be installed.</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
<p>After installing grunt, the files can be built using the following command:</p>
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">build_grunt</span>
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">grunt_build</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -150,7 +153,7 @@ locally before creating a PR.</dd>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search API — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -65,7 +68,7 @@ results based on this syntax, you might not get the results you wanted.</p>
|
|||
</div>
|
||||
<p>Comma separated list, specifies the active search engines.</p>
|
||||
<p>Optional.</p>
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">language</span>
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">lang</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Code of the language.</p>
|
||||
|
@ -186,7 +189,7 @@ results based on this syntax, you might not get the results you wanted.</p>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Translation — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -110,7 +113,7 @@ those should not be compiled. Call the command below to compile the <code class=
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,3 +6,4 @@ Blog
|
|||
|
||||
python3
|
||||
admin
|
||||
intro-offline
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
Preparation for offline engines
|
||||
===============================
|
||||
|
||||
Offline engines
|
||||
---------------
|
||||
|
||||
To extend the functionality of searx, offline engines are going to be introduced. An offline engine is an engine which does not need Internet connection to perform a search and does not use HTTP to communicate.
|
||||
|
||||
Offline engines can be configured as online engines, by adding those to the `engines` list of `settings.yml`. Thus, searx finds the engine file and imports it.
|
||||
|
||||
Example skeleton for the new engines:
|
||||
|
||||
.. code:: python
|
||||
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
categories = ['general']
|
||||
offline = True
|
||||
|
||||
def init(settings):
|
||||
pass
|
||||
|
||||
def search(query, params):
|
||||
process = Popen(['ls', query], stdout=PIPE)
|
||||
return_code = process.wait()
|
||||
if return_code != 0:
|
||||
raise RuntimeError('non-zero return code', return_code)
|
||||
|
||||
results = []
|
||||
line = process.stdout.readline()
|
||||
while line:
|
||||
result = parse_line(line)
|
||||
results.append(results)
|
||||
|
||||
line = process.stdout.readline()
|
||||
|
||||
return results
|
||||
|
||||
|
||||
Development progress
|
||||
--------------------
|
||||
|
||||
First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: https://github.com/asciimoo/searx/wiki/Offline-engines
|
||||
|
||||
In this development step, searx core was prepared to accept and perform offline searches. Offline search requests are scheduled together with regular offline requests.
|
||||
|
||||
As offline searches can return arbitrary results depending on the engine, the current result templates were insufficient to present such results. Thus, a new template is introduced which is caplable of presenting arbitrary key value pairs as a table. You can check out the pull request for more details: https://github.com/asciimoo/searx/pull/1700
|
||||
|
||||
Next steps
|
||||
----------
|
||||
|
||||
Today, it is possible to create/run an offline engine. However, it is going to be publicly available for everyone who knows the searx instance. So the next step is to introduce token based access for engines. This way administrators are able to limit the access to private engines.
|
||||
|
||||
Acknowledgement
|
||||
---------------
|
||||
|
||||
This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
|
||||
|
||||
.. _Search and Discovery Fund: https://nlnet.nl/discovery
|
||||
.. _NLnet Foundation: https://nlnet.nl/
|
||||
|
||||
|
||||
| Happy hacking.
|
||||
| kvch // 2019.10.21 17:03
|
||||
|
|
@ -49,7 +49,7 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = u'searx'
|
||||
copyright = u'2015-2017, Adam Tauber'
|
||||
copyright = u'2015-2019, Adam Tauber, Noémi Ványi'
|
||||
author = u'Adam Tauber'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
|
|
|
@ -41,6 +41,8 @@ engine file
|
|||
+----------------------+-----------+-----------------------------------------+
|
||||
| time\_range\_support | boolean | support search time range |
|
||||
+----------------------+-----------+-----------------------------------------+
|
||||
| offline | boolean | engine runs offline |
|
||||
+----------------------+-----------+-----------------------------------------+
|
||||
|
||||
settings.yml
|
||||
~~~~~~~~~~~~
|
||||
|
|
|
@ -6,9 +6,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
|
@ -71,7 +74,7 @@
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Welcome to searx — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
|
@ -118,7 +121,7 @@
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -2,4 +2,6 @@
|
|||
# Project: searx
|
||||
# Version: 0.12.0
|
||||
# The remainder of this file is compressed using zlib.
|
||||
xÚuTÉnÛ0½ë+4W×(rË%HÑÍ¡€‹ÈÑ ©±D”"Y.²õ÷q´QR.²ôÞ̛ݼl¤>r+™åSi;|c|¿Ö¡Qì¥ÿ”>8¤ÑìåôZ<C3B4>ÅUªàÙ¸¹ÿ27³Î<10>qͤö<C2A4>kƒLc\è¶" Î$<„h™Uèõî)Œé+~µ-àËÃ^ eªc2\†žQŠüÜÝIÓà®\Àk¸æ°ÎD7UîÎ4]œ¹yp£lBôŠðßÈÐv¡6úqc;àdþª±³eRWì4:Dk±YE íQ4<>—Ø×y®¢,a©·o‘5y¢!é<>®¤†³iÁµnk±MJ?ÈF0é¤.)5þÒVb{6cÕ3’䬊Nô‘ìÿE)þ¢†k—™!¯Ð‚2¶ØŸ‰K"—AÔçÕµä̼6¢N{ÖÓ¸wÚï×¼ Èõ}zßUâӊ癩{þIòh©K¸ç#:¶_‹ÙlÈqañJ˜èñ,ŠÍ,³ì><3E>&æ™Í³1åNv¶;Œ…ÿ<E280A6>k¯`È“ž{–
à„WZD<Å£¹éÃt©‹ú6äPkÝõãø?#[`:ógÒ&î;ø}#˜±YFÿî×üj
|
||||
xÚuTM<EFBFBD>›0½ó+,u¯iTím/ÕVÔ=TJÕJ=FŽÀªñP$áß×xlˆ<6C>½òÞÌ›7¼î¥>òA2ëê—;|b<ƒ;×+ö:ý•Öî$jözz«(¢‘Ê™€lRAéßñƲÁ á×Ljë¸<16>dz4nÜŠD¸<44>°àüÀX¯Ü¤wI!ÛWüjÛÀ‡§½.
|
||||
Ûc|,½ Tùps'½`Û<>i¸€ÖsÍ[`#z3wÃ=Aƒ7†jL<6A>M‰éA¾„7
|
||||
úØ4JjØd,¥ž<µÔ a9t~,©£ëP?oôNJo“xí…Ô-;å?aU
×£À /~*un½¬ûÅèf¢9<ãÌUÂm-¶¢Ié[Y£N<{¥ò/ÅJl/&w½ QnP>Ô°k…§C§?1þŸ—âoÐ0n<30>²0”õ® pèA;ös梈
WLtçÕ–ÌrEoïD‡Û¬í~Ï¥þ^€)we|^œëa{Þ1ß‚–º†{)‘Ñ|ÄáµZ’LJˆ? ö@û–Ú̲p÷î4ƒÏbž=Ö;î†ñ<E280A0> *ÿ#\{É'x™AX1€SØýʇ?âMæýèoC¦^»q¢_/yåæ<>ÇgÒK·£vü¾,ØÂAÕ°˜
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
|
@ -91,7 +94,7 @@
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Why use a private instance? — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -98,7 +101,7 @@ This means that the user of the public instance does not know whether his/her re
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -5,9 +5,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search syntax — searx 0.12.0 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
|
@ -88,7 +91,7 @@ list of engines, categories and languages.</p>
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2015-2017, Adam Tauber.
|
||||
© Copyright 2015-2019, Adam Tauber, Noémi Ványi.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue