1
0
mirror of https://github.com/searx/searx synced 2024-11-30 06:00:17 +01:00

generated files of parent

This commit is contained in:
Noémi Ványi 2016-11-04 21:56:14 +01:00
parent 553a9beaa3
commit 1db5af1e95
18 changed files with 188 additions and 154 deletions

View File

@ -494,6 +494,13 @@ pre {
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}
td.linenos pre {
padding: 5px 0px;
border: 0;

View File

@ -4,8 +4,10 @@
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */

View File

@ -324,7 +324,7 @@ var Search = {
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = query.split(/\s+/);
var tmp = query.split(/\W+/);
var objectterms = [];
for (i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") {

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administration API &mdash; searx 0.9.0 documentation</title>
<title>Administration API &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,8 +23,10 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="next" title="Development Quickstart" href="../dev/quickstart.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="How to protect an instance" href="filtron.html" />
<link rel="prev" title="Installation" href="../dev/install/installation.html" />
@ -43,71 +45,71 @@
<span id="adminapi"></span><h1>Administration API<a class="headerlink" href="#administration-api" title="Permalink to this headline"></a></h1>
<div class="section" id="get-configuration-data">
<h2>Get configuration data<a class="headerlink" href="#get-configuration-data" title="Permalink to this headline"></a></h2>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">GET</span> <span class="o">/</span><span class="n">config</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">GET</span> <span class="o">/</span><span class="n">config</span>
</pre></div>
</div>
<div class="section" id="sample-response">
<h3>Sample response<a class="headerlink" href="#sample-response" title="Permalink to this headline"></a></h3>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="p">{</span>
<span class="s">&quot;autocomplete&quot;</span><span class="p">:</span> <span class="s">&quot;&quot;</span><span class="p">,</span>
<span class="s">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s">&quot;map&quot;</span><span class="p">,</span>
<span class="s">&quot;it&quot;</span><span class="p">,</span>
<span class="s">&quot;images&quot;</span><span class="p">,</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s2">&quot;autocomplete&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;map&quot;</span><span class="p">,</span>
<span class="s2">&quot;it&quot;</span><span class="p">,</span>
<span class="s2">&quot;images&quot;</span><span class="p">,</span>
<span class="p">],</span>
<span class="s">&quot;default_locale&quot;</span><span class="p">:</span> <span class="s">&quot;&quot;</span><span class="p">,</span>
<span class="s">&quot;default_theme&quot;</span><span class="p">:</span> <span class="s">&quot;oscar&quot;</span><span class="p">,</span>
<span class="s">&quot;engines&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;default_locale&quot;</span><span class="p">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
<span class="s2">&quot;default_theme&quot;</span><span class="p">:</span> <span class="s2">&quot;oscar&quot;</span><span class="p">,</span>
<span class="s2">&quot;engines&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="s">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s">&quot;map&quot;</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;map&quot;</span>
<span class="p">],</span>
<span class="s">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s">&quot;name&quot;</span><span class="p">:</span> <span class="s">&quot;openstreetmap&quot;</span><span class="p">,</span>
<span class="s">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s">&quot;osm&quot;</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;openstreetmap&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;osm&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s">&quot;it&quot;</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;it&quot;</span>
<span class="p">],</span>
<span class="s">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s">&quot;name&quot;</span><span class="p">:</span> <span class="s">&quot;arch linux wiki&quot;</span><span class="p">,</span>
<span class="s">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s">&quot;al&quot;</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;arch linux wiki&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;al&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s">&quot;images&quot;</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;images&quot;</span>
<span class="p">],</span>
<span class="s">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s">&quot;name&quot;</span><span class="p">:</span> <span class="s">&quot;google images&quot;</span><span class="p">,</span>
<span class="s">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s">&quot;goi&quot;</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;google images&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;goi&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s">&quot;it&quot;</span>
<span class="s2">&quot;categories&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;it&quot;</span>
<span class="p">],</span>
<span class="s">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
<span class="s">&quot;name&quot;</span><span class="p">:</span> <span class="s">&quot;bitbucket&quot;</span><span class="p">,</span>
<span class="s">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s">&quot;bb&quot;</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;bitbucket&quot;</span><span class="p">,</span>
<span class="s2">&quot;shortcut&quot;</span><span class="p">:</span> <span class="s2">&quot;bb&quot;</span>
<span class="p">},</span>
<span class="p">],</span>
<span class="s">&quot;instance_name&quot;</span><span class="p">:</span> <span class="s">&quot;searx&quot;</span><span class="p">,</span>
<span class="s">&quot;locales&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s">&quot;de&quot;</span><span class="p">:</span> <span class="s">&quot;Deutsch (German)&quot;</span><span class="p">,</span>
<span class="s">&quot;en&quot;</span><span class="p">:</span> <span class="s">&quot;English&quot;</span><span class="p">,</span>
<span class="s">&quot;eo&quot;</span><span class="p">:</span> <span class="s">&quot;Esperanto (Esperanto)&quot;</span><span class="p">,</span>
<span class="s2">&quot;instance_name&quot;</span><span class="p">:</span> <span class="s2">&quot;searx&quot;</span><span class="p">,</span>
<span class="s2">&quot;locales&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;de&quot;</span><span class="p">:</span> <span class="s2">&quot;Deutsch (German)&quot;</span><span class="p">,</span>
<span class="s2">&quot;en&quot;</span><span class="p">:</span> <span class="s2">&quot;English&quot;</span><span class="p">,</span>
<span class="s2">&quot;eo&quot;</span><span class="p">:</span> <span class="s2">&quot;Esperanto (Esperanto)&quot;</span><span class="p">,</span>
<span class="p">},</span>
<span class="s">&quot;plugins&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;plugins&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="s">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s">&quot;name&quot;</span><span class="p">:</span> <span class="s">&quot;HTTPS rewrite&quot;</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">true</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;HTTPS rewrite&quot;</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="s">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
<span class="s">&quot;name&quot;</span><span class="p">:</span> <span class="s">&quot;Vim-like hotkeys&quot;</span>
<span class="s2">&quot;enabled&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
<span class="s2">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;Vim-like hotkeys&quot;</span>
<span class="p">}</span>
<span class="p">],</span>
<span class="s">&quot;safe_search&quot;</span><span class="p">:</span> <span class="mi">0</span>
<span class="s2">&quot;safe_search&quot;</span><span class="p">:</span> <span class="mi">0</span>
<span class="p">}</span>
</pre></div>
</div>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to protect an instance &#8212; searx 0.9.0 documentation</title>
<title>How to protect an instance &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -25,7 +25,7 @@
<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 rel="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="Development Quickstart" href="../dev/quickstart.html" />
<link rel="prev" title="Administration API" href="api.html" />

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to contribute &mdash; searx 0.9.0 documentation</title>
<title>How to contribute &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="Engine overview" href="engine_overview.html" />
<link rel="prev" title="Development Quickstart" href="quickstart.html" />

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Engine overview &mdash; searx 0.9.0 documentation</title>
<title>Engine overview &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="Search API" href="search_api.html" />
<link rel="prev" title="How to contribute" href="contribution_guide.html" />
@ -194,10 +196,10 @@ overrides are the following:</p>
</div>
<div class="section" id="example-code">
<h3><a class="toc-backref" href="#id7">example code</a><a class="headerlink" href="#example-code" title="Permalink to this headline"></a></h3>
<div class="code python highlight-default"><div class="highlight"><pre><span class="c"># engine dependent config</span>
<span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;general&#39;</span><span class="p">]</span>
<span class="n">paging</span> <span class="o">=</span> <span class="k">True</span>
<span class="n">language_support</span> <span class="o">=</span> <span class="k">True</span>
<div class="code python highlight-default"><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">&#39;general&#39;</span><span class="p">]</span>
<span class="n">paging</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">language_support</span> <span class="o">=</span> <span class="kc">True</span>
</pre></div>
</div>
</div>
@ -317,17 +319,17 @@ used to specify a search request:</p>
</div>
<div class="section" id="id1">
<h3><a class="toc-backref" href="#id11">example code</a><a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
<div class="code python highlight-default"><div class="highlight"><pre><span class="c"># search-url</span>
<span class="n">base_url</span> <span class="o">=</span> <span class="s">&#39;https://example.com/&#39;</span>
<span class="n">search_string</span> <span class="o">=</span> <span class="s">&#39;search?{query}&amp;page={page}&#39;</span>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="c1"># search-url</span>
<span class="n">base_url</span> <span class="o">=</span> <span class="s1">&#39;https://example.com/&#39;</span>
<span class="n">search_string</span> <span class="o">=</span> <span class="s1">&#39;search?</span><span class="si">{query}</span><span class="s1">&amp;page=</span><span class="si">{page}</span><span class="s1">&#39;</span>
<span class="c"># do search-request</span>
<span class="c1"># do search-request</span>
<span class="k">def</span> <span class="nf">request</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">search_path</span> <span class="o">=</span> <span class="n">search_string</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
<span class="n">query</span><span class="o">=</span><span class="n">urlencode</span><span class="p">({</span><span class="s">&#39;q&#39;</span><span class="p">:</span> <span class="n">query</span><span class="p">}),</span>
<span class="n">page</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s">&#39;pageno&#39;</span><span class="p">])</span>
<span class="n">query</span><span class="o">=</span><span class="n">urlencode</span><span class="p">({</span><span class="s1">&#39;q&#39;</span><span class="p">:</span> <span class="n">query</span><span class="p">}),</span>
<span class="n">page</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;pageno&#39;</span><span class="p">])</span>
<span class="n">params</span><span class="p">[</span><span class="s">&#39;url&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">base_url</span> <span class="o">+</span> <span class="n">search_path</span>
<span class="n">params</span><span class="p">[</span><span class="s1">&#39;url&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">base_url</span> <span class="o">+</span> <span class="n">search_path</span>
<span class="k">return</span> <span class="n">params</span>
</pre></div>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installation &mdash; searx 0.9.0 documentation</title>
<title>Installation &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="../../index.html" />
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../../index.html" />
<link rel="next" title="Administration API" href="../../admin/api.html" />
<link rel="prev" title="Search syntax" href="../../user/search_syntax.html" />
@ -68,18 +70,18 @@ certificate</a></p>
<h2><a class="toc-backref" href="#id4">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline"></a></h2>
<p>For Ubuntu, be sure to have enable universe repository.</p>
<p>Install packages:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">git</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">libxslt</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">virtualenv</span> <span class="n">python</span><span class="o">-</span><span class="n">pybabel</span> <span class="n">zlib1g</span><span class="o">-</span><span class="n">dev</span> <span class="n">libffi</span><span class="o">-</span><span class="n">dev</span> <span class="n">libssl</span><span class="o">-</span><span class="n">dev</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">git</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">libxslt</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">virtualenv</span> <span class="n">python</span><span class="o">-</span><span class="n">pybabel</span> <span class="n">zlib1g</span><span class="o">-</span><span class="n">dev</span> <span class="n">libffi</span><span class="o">-</span><span class="n">dev</span> <span class="n">libssl</span><span class="o">-</span><span class="n">dev</span>
</pre></div>
</div>
<p>Install searx:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span>
<span class="n">sudo</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
<span class="n">sudo</span> <span class="n">useradd</span> <span class="n">searx</span> <span class="o">-</span><span class="n">d</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">searx</span>
<span class="n">sudo</span> <span class="n">chown</span> <span class="n">searx</span><span class="p">:</span><span class="n">searx</span> <span class="o">-</span><span class="n">R</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">searx</span>
</pre></div>
</div>
<p>Install dependencies in a virtualenv:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
<span class="n">cd</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">searx</span>
<span class="n">virtualenv</span> <span class="n">searx</span><span class="o">-</span><span class="n">ve</span>
<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
@ -89,7 +91,7 @@ certificate</a></p>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#id5">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s">&quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s2">&quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
</pre></div>
</div>
<p>Edit searx/settings.yml if necessary.</p>
@ -97,12 +99,12 @@ certificate</a></p>
<div class="section" id="check">
<h2><a class="toc-backref" href="#id6">Check</a><a class="headerlink" href="#check" title="Permalink to this headline"></a></h2>
<p>Start searx:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">python</span> <span class="n">searx</span><span class="o">/</span><span class="n">webapp</span><span class="o">.</span><span class="n">py</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">searx</span><span class="o">/</span><span class="n">webapp</span><span class="o">.</span><span class="n">py</span>
</pre></div>
</div>
<p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
<p>If everything works fine, disable the debug option in settings.yml:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s">&quot;s/debug : True/debug : False/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s2">&quot;s/debug : True/debug : False/g&quot;</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
</pre></div>
</div>
<p>At this point searx is not demonized ; uwsgi allows this.</p>
@ -112,41 +114,41 @@ twice).</p>
<div class="section" id="uwsgi">
<h2><a class="toc-backref" href="#id7">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline"></a></h2>
<p>Install packages:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">uwsgi</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">python</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">uwsgi</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">python</span>
</pre></div>
</div>
<p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
this content:</p>
<div class="highlight-default"><div class="highlight"><pre><span class="p">[</span><span class="n">uwsgi</span><span class="p">]</span>
<span class="c"># Who will run the code</span>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">uwsgi</span><span class="p">]</span>
<span class="c1"># Who will run the code</span>
<span class="n">uid</span> <span class="o">=</span> <span class="n">searx</span>
<span class="n">gid</span> <span class="o">=</span> <span class="n">searx</span>
<span class="c"># disable logging for privacy</span>
<span class="c1"># disable logging for privacy</span>
<span class="n">disable</span><span class="o">-</span><span class="n">logging</span> <span class="o">=</span> <span class="n">true</span>
<span class="c"># Number of workers (usually CPU count)</span>
<span class="c1"># Number of workers (usually CPU count)</span>
<span class="n">workers</span> <span class="o">=</span> <span class="mi">4</span>
<span class="c"># The right granted on the created socket</span>
<span class="c1"># The right granted on the created socket</span>
<span class="n">chmod</span><span class="o">-</span><span class="n">socket</span> <span class="o">=</span> <span class="mi">666</span>
<span class="c"># Plugin to use and interpretor config</span>
<span class="c1"># Plugin to use and interpretor config</span>
<span class="n">single</span><span class="o">-</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">master</span> <span class="o">=</span> <span class="n">true</span>
<span class="n">plugin</span> <span class="o">=</span> <span class="n">python</span>
<span class="c"># Module to import</span>
<span class="c1"># Module to import</span>
<span class="n">module</span> <span class="o">=</span> <span class="n">searx</span><span class="o">.</span><span class="n">webapp</span>
<span class="c"># Virtualenv and python path</span>
<span class="c1"># Virtualenv and python path</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">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</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">searx</span><span class="o">/</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">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
</pre></div>
</div>
<p>Activate the uwsgi application and restart:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">enabled</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">enabled</span>
<span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">../</span><span class="n">apps</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">ini</span>
<span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">uwsgi</span> <span class="n">restart</span>
</pre></div>
@ -158,14 +160,14 @@ this content:</p>
<h3><a class="toc-backref" href="#id9">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline"></a></h3>
<p>If nginx is not installed (uwsgi will not work with the package
nginx-light):</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nginx</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nginx</span>
</pre></div>
</div>
<div class="section" id="hosted-at">
<h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline"></a></h4>
<p>Create the configuration file /etc/nginx/sites-available/searx with this
content:</p>
<div class="code nginx highlight-default"><div class="highlight"><pre><span class="n">server</span> <span class="p">{</span>
<div class="code nginx highlight-default"><div class="highlight"><pre><span></span><span class="n">server</span> <span class="p">{</span>
<span class="n">listen</span> <span class="mi">80</span><span class="p">;</span>
<span class="n">server_name</span> <span class="n">searx</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span><span class="p">;</span>
<span class="n">root</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">searx</span><span class="p">;</span>
@ -178,7 +180,7 @@ content:</p>
</pre></div>
</div>
<p>Restart service:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
<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>
</pre></div>
</div>
@ -187,7 +189,7 @@ content:</p>
<h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline"></a></h4>
<p>Add this configuration in the server config file
/etc/nginx/sites-available/default:</p>
<div class="code nginx highlight-default"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
<div class="code nginx highlight-default"><div class="highlight"><pre><span></span>location = /searx { rewrite ^ /searx/; }
location /searx {
try_files $uri @searx;
}
@ -202,7 +204,7 @@ location @searx {
<p>OR</p>
<p>using reverse proxy
(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)</p>
<div class="code nginx highlight-default"><div class="highlight"><pre>location /searx {
<div class="code nginx highlight-default"><div class="highlight"><pre><span></span>location /searx {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ -213,11 +215,11 @@ location @searx {
</pre></div>
</div>
<p>Enable base_url in searx/settings.yml</p>
<div class="highlight-default"><div class="highlight"><pre><span class="n">base_url</span> <span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">.</span><span class="n">domain</span><span class="o">.</span><span class="n">tld</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">base_url</span> <span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">.</span><span class="n">domain</span><span class="o">.</span><span class="n">tld</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
<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>
</pre></div>
</div>
@ -226,12 +228,12 @@ location @searx {
<p>for better privacy you can disable nginx logs about searx.</p>
<p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
/etc/nginx/sites-available/default add</p>
<div class="highlight-default"><div class="highlight"><pre><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
<span class="n">error_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
<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>
</pre></div>
</div>
</div>
@ -240,12 +242,12 @@ location @searx {
<div class="section" id="with-apache">
<h3><a class="toc-backref" href="#id10">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline"></a></h3>
<p>Add wsgi mod:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libapache2</span><span class="o">-</span><span class="n">mod</span><span class="o">-</span><span class="n">uwsgi</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libapache2</span><span class="o">-</span><span class="n">mod</span><span class="o">-</span><span class="n">uwsgi</span>
<span class="n">sudo</span> <span class="n">a2enmod</span> <span class="n">uwsgi</span>
</pre></div>
</div>
<p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
<div class="code apache highlight-default"><div class="highlight"><pre><span class="o">&lt;</span><span class="n">Location</span> <span class="o">/&gt;</span>
<div class="code apache highlight-default"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">Location</span> <span class="o">/&gt;</span>
<span class="n">Options</span> <span class="n">FollowSymLinks</span> <span class="n">Indexes</span>
<span class="n">SetHandler</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">handler</span>
<span class="n">uWSGISocket</span> <span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">socket</span>
@ -256,7 +258,7 @@ location @searx {
change <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like
<code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
<p>Restart Apache:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
</pre></div>
</div>
<div class="section" id="id2">
@ -266,11 +268,11 @@ change <code class="docutils literal"><span class="pre">&lt;Location</span> <spa
<p>WARNING: you can only disable logs for the whole (virtual) server not
for a specific path.</p>
<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add:</p>
<div class="code apache highlight-default"><div class="highlight"><pre><span class="n">CustomLog</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span> <span class="n">combined</span>
<div class="code apache highlight-default"><div class="highlight"><pre><span></span><span class="n">CustomLog</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span> <span class="n">combined</span>
</pre></div>
</div>
<p>Restart Apache:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
</pre></div>
</div>
</div>
@ -278,7 +280,7 @@ for a specific path.</p>
</div>
<div class="section" id="how-to-update">
<h2><a class="toc-backref" href="#id11">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this headline"></a></h2>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</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">searx</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</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">searx</span>
<span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
<span class="n">git</span> <span class="n">stash</span>
@ -292,14 +294,14 @@ for a specific path.</p>
<div class="section" id="docker">
<h2><a class="toc-backref" href="#id12">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline"></a></h2>
<p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
<div class="code sh highlight-default"><div class="highlight"><pre>docker pull wonderfall/searx
<div class="code sh highlight-default"><div class="highlight"><pre><span></span>docker pull wonderfall/searx
docker run -d --name searx -p $PORT:8888 wonderfall/searx
</pre></div>
</div>
<p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</p>
<p>See <a class="reference external" href="https://hub.docker.com/r/wonderfall/searx/">https://hub.docker.com/r/wonderfall/searx/</a> for more informations.</p>
<p>It&#8217;s also possible to build searx from the embedded Dockerfile.</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
<span class="n">cd</span> <span class="n">searx</span>
<span class="n">docker</span> <span class="n">build</span> <span class="o">-</span><span class="n">t</span> <span class="n">whatever</span><span class="o">/</span><span class="n">searx</span> <span class="o">.</span>
</pre></div>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Plugins &mdash; searx 0.9.0 documentation</title>
<title>Plugins &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="Translation" href="translation.html" />
<link rel="prev" title="Search API" href="search_api.html" />
@ -45,20 +47,20 @@
searx.</p>
<div class="section" id="example-plugin">
<h2>Example plugin<a class="headerlink" href="#example-plugin" title="Permalink to this headline"></a></h2>
<div class="code python highlight-default"><div class="highlight"><pre><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;Example plugin&#39;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s">&#39;This plugin extends the suggestions with the word &quot;example&quot;&#39;</span>
<span class="n">default_on</span> <span class="o">=</span> <span class="k">False</span> <span class="c"># disable by default</span>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;Example plugin&#39;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s1">&#39;This plugin extends the suggestions with the word &quot;example&quot;&#39;</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="n">js_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span> <span class="c"># optional, list of static js files</span>
<span class="n">css_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span> <span class="c"># optional, list of static css files</span>
<span class="n">js_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span> <span class="c1"># optional, list of static js files</span>
<span class="n">css_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span> <span class="c1"># optional, list of static css files</span>
<span class="c"># attach callback to the post search hook</span>
<span class="c"># request: flask request object</span>
<span class="c"># ctx: the whole local context of the post search hook</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">ctx</span><span class="p">):</span>
<span class="n">ctx</span><span class="p">[</span><span class="s">&#39;search&#39;</span><span class="p">]</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="s">&#39;example&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="k">True</span>
<span class="n">ctx</span><span class="p">[</span><span class="s1">&#39;search&#39;</span><span class="p">]</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">&#39;example&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
</pre></div>
</div>
</div>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Development Quickstart &mdash; searx 0.9.0 documentation</title>
<title>Development Quickstart &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,9 +23,11 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="How to contribute" href="contribution_guide.html" />
<link rel="prev" title="Administration API" href="../admin/api.html" />
<link rel="prev" title="How to protect an instance" href="../admin/filtron.html" />
<link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
@ -48,7 +50,7 @@ short introduction to the new manage.sh script.</p>
<p>First, clone the source code of searx to the desired folder. In this case the source
is cloned to ~/myprojects/searx. Then create and activate the searx-ve
virtualenv and install the required packages using manage.sh.</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">~/</span><span class="n">myprojects</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">~/</span><span class="n">myprojects</span>
<span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
<span class="n">cd</span> <span class="n">searx</span>
<span class="n">virtualenv</span> <span class="n">searx</span><span class="o">-</span><span class="n">ve</span>
@ -68,7 +70,7 @@ virtualenv and install the required packages using manage.sh.</p>
<li>Unit test coverage check</li>
</ul>
<p>For example unit tests are run with the command below:</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">unit_tests</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">unit_tests</span>
</pre></div>
</div>
<p>For further test options, please consult the help of the manage.sh script.</p>
@ -78,16 +80,16 @@ virtualenv and install the required packages using manage.sh.</p>
<div class="section" id="how-to-build-styles">
<h3>How to build styles<a class="headerlink" href="#how-to-build-styles" title="Permalink to this headline"></a></h3>
<p>Less is required to build the styles of searx. Less can be installed using either NodeJS or Apt.</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nodejs</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nodejs</span>
<span class="n">sudo</span> <span class="n">npm</span> <span class="n">install</span> <span class="o">-</span><span class="n">g</span> <span class="n">less</span>
</pre></div>
</div>
<p>OR</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">node</span><span class="o">-</span><span class="n">less</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">node</span><span class="o">-</span><span class="n">less</span>
</pre></div>
</div>
<p>After satisfying the requirements styles can be build using manage.sh</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">styles</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">styles</span>
</pre></div>
</div>
</div>
@ -95,12 +97,12 @@ virtualenv and install the required packages using manage.sh.</p>
<h3>How to build the source of the oscar theme<a class="headerlink" href="#how-to-build-the-source-of-the-oscar-theme" title="Permalink to this headline"></a></h3>
<p>Grunt must be installed in order to build the javascript sources. It depends on NodeJS, so first
Node has to be installed.</p>
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nodejs</span>
<div class="code sh highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nodejs</span>
<span class="n">sudo</span> <span class="n">npm</span> <span class="n">install</span> <span class="o">-</span><span class="n">g</span> <span class="n">grunt</span><span class="o">-</span><span class="n">cli</span>
</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 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">build_grunt</span>
</pre></div>
</div>
</div>

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search API &mdash; searx 0.9.0 documentation</title>
<title>Search API &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="Plugins" href="plugins.html" />
<link rel="prev" title="Engine overview" href="engine_overview.html" />

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Translation &mdash; searx 0.9.0 documentation</title>
<title>Translation &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="prev" title="Plugins" href="plugins.html" />
@ -43,13 +45,13 @@
<p>run these commands in the root directory of searx</p>
<div class="section" id="add-new-language">
<h2>Add new language<a class="headerlink" href="#add-new-language" title="Permalink to this headline"></a></h2>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="n">pybabel</span> <span class="n">init</span> <span class="o">-</span><span class="n">i</span> <span class="n">messages</span><span class="o">.</span><span class="n">pot</span> <span class="o">-</span><span class="n">d</span> <span class="n">searx</span><span class="o">/</span><span class="n">translations</span> <span class="o">-</span><span class="n">l</span> <span class="n">it</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">pybabel</span> <span class="n">init</span> <span class="o">-</span><span class="n">i</span> <span class="n">messages</span><span class="o">.</span><span class="n">pot</span> <span class="o">-</span><span class="n">d</span> <span class="n">searx</span><span class="o">/</span><span class="n">translations</span> <span class="o">-</span><span class="n">l</span> <span class="n">it</span>
</pre></div>
</div>
</div>
<div class="section" id="update-po-files">
<h2>Update .po files<a class="headerlink" href="#update-po-files" title="Permalink to this headline"></a></h2>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="o">./</span><span class="n">utils</span><span class="o">/</span><span class="n">update</span><span class="o">-</span><span class="n">translations</span><span class="o">.</span><span class="n">sh</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">utils</span><span class="o">/</span><span class="n">update</span><span class="o">-</span><span class="n">translations</span><span class="o">.</span><span class="n">sh</span>
</pre></div>
</div>
<p>You may have errors here. In that case, edit the
@ -59,7 +61,7 @@
</div>
<div class="section" id="compile-translations">
<h2>Compile translations<a class="headerlink" href="#compile-translations" title="Permalink to this headline"></a></h2>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="n">pybabel</span> <span class="nb">compile</span> <span class="o">-</span><span class="n">d</span> <span class="n">searx</span><span class="o">/</span><span class="n">translations</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">pybabel</span> <span class="nb">compile</span> <span class="o">-</span><span class="n">d</span> <span class="n">searx</span><span class="o">/</span><span class="n">translations</span>
</pre></div>
</div>
</div>
@ -67,9 +69,9 @@
<h2>Transifex stuff<a class="headerlink" href="#transifex-stuff" title="Permalink to this headline"></a></h2>
<div class="section" id="init-project">
<h3>Init Project<a class="headerlink" href="#init-project" title="Permalink to this headline"></a></h3>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="n">tx</span> <span class="n">init</span> <span class="c"># Transifex instance: https://www.transifex.com/asciimoo/searx/</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">init</span> <span class="c1"># Transifex instance: https://www.transifex.com/asciimoo/searx/</span>
<span class="n">tx</span> <span class="nb">set</span> <span class="o">--</span><span class="n">auto</span><span class="o">-</span><span class="n">local</span> <span class="o">-</span><span class="n">r</span> <span class="n">searx</span><span class="o">.</span><span class="n">messagespo</span> <span class="s">&#39;searx/translations/&lt;lang&gt;/LC_MESSAGES/messages.po&#39;</span> \
<span class="n">tx</span> <span class="nb">set</span> <span class="o">--</span><span class="n">auto</span><span class="o">-</span><span class="n">local</span> <span class="o">-</span><span class="n">r</span> <span class="n">searx</span><span class="o">.</span><span class="n">messagespo</span> <span class="s1">&#39;searx/translations/&lt;lang&gt;/LC_MESSAGES/messages.po&#39;</span> \
<span class="o">--</span><span class="n">source</span><span class="o">-</span><span class="n">lang</span> <span class="n">en</span> <span class="o">--</span><span class="nb">type</span> <span class="n">PO</span> <span class="o">--</span><span class="n">source</span><span class="o">-</span><span class="n">file</span> <span class="n">messages</span><span class="o">.</span><span class="n">pot</span> <span class="o">--</span><span class="n">execute</span>
</pre></div>
</div>
@ -78,27 +80,27 @@
</div>
<div class="section" id="get-translations">
<h3>Get translations<a class="headerlink" href="#get-translations" title="Permalink to this headline"></a></h3>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="n">tx</span> <span class="n">pull</span> <span class="o">-</span><span class="n">a</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">pull</span> <span class="o">-</span><span class="n">a</span>
</pre></div>
</div>
<p><a class="reference external" href="http://docs.transifex.com/client/pull">http://docs.transifex.com/client/pull</a></p>
</div>
<div class="section" id="upload-source-file">
<h3>Upload source File<a class="headerlink" href="#upload-source-file" title="Permalink to this headline"></a></h3>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">s</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">s</span>
</pre></div>
</div>
</div>
<div class="section" id="upload-all-translation">
<h3>Upload all Translation<a class="headerlink" href="#upload-all-translation" title="Permalink to this headline"></a></h3>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">s</span> <span class="o">-</span><span class="n">t</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">s</span> <span class="o">-</span><span class="n">t</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="upload-specifc-translation">
<h2>upload specifc Translation<a class="headerlink" href="#upload-specifc-translation" title="Permalink to this headline"></a></h2>
<div class="code shell highlight-default"><div class="highlight"><pre><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">t</span> <span class="o">-</span><span class="n">l</span> <span class="n">tr</span>
<div class="code shell highlight-default"><div class="highlight"><pre><span></span><span class="n">tx</span> <span class="n">push</span> <span class="o">-</span><span class="n">t</span> <span class="o">-</span><span class="n">l</span> <span class="n">tr</span>
</pre></div>
</div>
<p><a class="reference external" href="http://docs.transifex.com/client/push">http://docs.transifex.com/client/push</a></p>

View File

@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &mdash; searx 0.9.0 documentation</title>
<title>Index &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -15,7 +15,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,9 @@
<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="top" title="searx 0.9.0 documentation" href="index.html" />
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="index.html" />
<link media="only screen and (max-device-width: 480px)" href="_static/small_flask.css" type= "text/css" rel="stylesheet" />

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to searx &mdash; searx 0.9.0 documentation</title>
<title>Welcome to searx &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="#" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="#" />
<link rel="next" title="Search syntax" href="user/search_syntax.html" />
@ -72,6 +74,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="dev/install/installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="admin/api.html">Administration API</a></li>
<li class="toctree-l1"><a class="reference internal" href="admin/api.html#embed-search-bar">Embed search bar</a></li>
<li class="toctree-l1"><a class="reference internal" href="admin/filtron.html">How to protect an instance</a></li>
</ul>
</div>

Binary file not shown.

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; searx 0.9.0 documentation</title>
<title>Search &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -24,7 +24,9 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
<link rel="top" title="searx 0.9.0 documentation" href="index.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<link rel="top" title="searx 0.10.0 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search syntax &mdash; searx 0.9.0 documentation</title>
<title>Search syntax &#8212; searx 0.10.0 documentation</title>
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9.0',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@ -23,7 +23,9 @@
<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="top" title="searx 0.9.0 documentation" href="../index.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="searx 0.10.0 documentation" href="../index.html" />
<link rel="next" title="Installation" href="../dev/install/installation.html" />
<link rel="prev" title="Welcome to searx" href="../index.html" />