on master help sign in
Merge pull request #465 from kvch/gh-pages

[doc] grammar & format fixes in engine overview

commit75e8855676ae320f8403bf1402790004d1684627 authorAdam Tauber <asciimoo@gmail.com> dateTue 1 Dec 2015, 15:47 (11 years ago) parent4af0e52bcd6825
3 files changed+232−242
_sources/dev/engine_overview.txt+91−94 dev/engine_overview.html+50−54 docs/dev/engine_overview.rst+91−94
_sources/dev/engine_overview.txt+91−94
@@ -3,14 +3,13 @@ Engine overview
33
44
55searx is a `metasearch-engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__,
6−so it is using different search engines to provide better results.
6+so it uses different search engines to provide better results.
77
8−Because there is no general search-api which can be used for every
9−search-engine, there must be build an adapter between searx and the
10−external search-engine. This adapters are stored in the folder
11−`*searx/engines* <https://github.com/asciimoo/searx/tree/master/searx/engines>`__,
12−and this site is build to make an general documentation about this
13−engines
8+Because there is no general search API which could be used for every
9+search engine, an adapter has to be built between searx and the
10+external search engines. Adapters are stored under the folder
11+`searx/engines
12+<https://github.com/asciimoo/searx/tree/master/searx/engines>`__.
1413
1514
1615.. contents::
@@ -19,17 +18,16 @@ engines
1918general engine configuration
2019----------------------------
2120
22−It is required to tell searx what results can the engine provide. The
23−arguments can be inserted in the engine file, or in the settings file
21+It is required to tell searx the type of results the engine provides. The
22+arguments can be set in the engine file or in the settings file
2423(normally ``settings.yml``). The arguments in the settings file override
25−the one in the engine file.
24+the ones in the engine file.
2625
27−Really, it is for most options no difference if there are contained in
28−the engine-file or in the settings. But there is a standard where to
29−place specific arguments by default.
26+It does not matter if an options is stored in the engine file or in the
27+settings. However, the standard way is the following:
3028
3129
32−engine-file
30+engine file
3331~~~~~~~~~~~
3432
3533+---------------------+-----------+-----------------------------------------+
@@ -60,27 +58,27 @@ settings.yml
6058overrides
6159~~~~~~~~~
6260
63−There are some options, with have default values in the engine, but are
64−often overwritten by the settings. If the option is assigned in the
65−engine-file with ``None`` it has to be redefined in the settings,
66−otherwise searx is not starting with that engine.
67−
68−The naming of that overrides can be wathever you want. But we recommend
69−the using of already used overrides if possible:
70−
71−+-----------------------+----------+--------------------------------------------------------------+
72−| argument | type | information |
73−+=======================+==========+==============================================================+
74−| base\_url | string | base-url, can be overwrite to use same engine on other url |
75−+-----------------------+----------+--------------------------------------------------------------+
76−| number\_of\_results | int | maximum number of results per request |
77−+-----------------------+----------+--------------------------------------------------------------+
78−| language | string | ISO code of language and country like en\_US |
79−+-----------------------+----------+--------------------------------------------------------------+
80−| api\_key | string | api-key if required by engine |
81−+-----------------------+----------+--------------------------------------------------------------+
82−
83−example-code
61+A few of the options have default values in the engine, but are
62+often overwritten by the settings. If ``None`` is assigned to an option
63+in the engine file, it has to be redefined in the settings,
64+otherwise searx will not start with that engine.
65+
66+The naming of that overrides is arbitrary. But the recommended
67+overrides are the following:
68+
69++-----------------------+----------+----------------------------------------------------------------+
70+| argument | type | information |
71++=======================+==========+================================================================+
72+| base\_url | string | base-url, can be overwritten to use same engine on other URL |
73++-----------------------+----------+----------------------------------------------------------------+
74+| number\_of\_results | int | maximum number of results per request |
75++-----------------------+----------+----------------------------------------------------------------+
76+| language | string | ISO code of language and country like en\_US |
77++-----------------------+----------+----------------------------------------------------------------+
78+| api\_key | string | api-key if required by engine |
79++-----------------------+----------+----------------------------------------------------------------+
80+
81+example code
8482~~~~~~~~~~~~
8583
8684.. code:: python
@@ -90,21 +88,20 @@ example-code
9088 paging = True
9189 language_support = True
9290
93−doing request
94−-------------
91+making a request
92+----------------
9593
96−To perform a search you have to specific at least a url on which the
97−request is performing
94+To perform a search an URL have to be specified. In addition to
95+specifying an URL, arguments can be passed to the query.
9896
9997passed arguments
10098~~~~~~~~~~~~~~~~
10199
102−This arguments can be used to calculate the search-query. Furthermore,
103−some of that parameters are filled with default values which can be
104−changed for special purpose.
100+These arguments can be used to construct the search query. Furthermore,
101+parameters with default value can be redefined for special purposes.
105102
106103+----------------------+------------+------------------------------------------------------------------------+
107−| argument | type | default-value, informations |
104+| argument | type | default-value, information |
108105+======================+============+========================================================================+
109106| url | string | ``''`` |
110107+----------------------+------------+------------------------------------------------------------------------+
@@ -132,27 +129,27 @@ changed for special purpose.
132129parsed arguments
133130~~~~~~~~~~~~~~~~
134131
135−The function ``def request(query, params):`` is always returning the
136−``params`` variable back. Inside searx, the following paramters can be
137−used to specific a search-request:
138−
139−+------------+-----------+----------------------------------------------------------+
140−| argument | type | information |
141−+============+===========+==========================================================+
142−| url | string | requested url |
143−+------------+-----------+----------------------------------------------------------+
144−| method | string | HTTP request methode |
145−+------------+-----------+----------------------------------------------------------+
146−| headers | set | HTTP header informations |
147−+------------+-----------+----------------------------------------------------------+
148−| data | set | HTTP data informations (parsed if ``method != 'GET'``) |
149−+------------+-----------+----------------------------------------------------------+
150−| cookies | set | HTTP cookies |
151−+------------+-----------+----------------------------------------------------------+
152−| verify | boolean | Performing SSL-Validity check |
153−+------------+-----------+----------------------------------------------------------+
154−
155−example-code
132+The function ``def request(query, params):`` always returns the
133+``params`` variable. Inside searx, the following paramters can be
134+used to specify a search request:
135+
136++------------+-----------+---------------------------------------------------------+
137+| argument | type | information |
138++============+===========+=========================================================+
139+| url | string | requested url |
140++------------+-----------+---------------------------------------------------------+
141+| method | string | HTTP request method |
142++------------+-----------+---------------------------------------------------------+
143+| headers | set | HTTP header information |
144++------------+-----------+---------------------------------------------------------+
145+| data | set | HTTP data information (parsed if ``method != 'GET'``) |
146++------------+-----------+---------------------------------------------------------+
147+| cookies | set | HTTP cookies |
148++------------+-----------+---------------------------------------------------------+
149+| verify | boolean | Performing SSL-Validity check |
150++------------+-----------+---------------------------------------------------------+
151+
152+example code
156153~~~~~~~~~~~~
157154
158155.. code:: python
@@ -171,10 +168,10 @@ example-code
171168
172169 return params
173170
174−returning results
175−-----------------
171+returned results
172+----------------
176173
177−Searx has the possiblity to return results in different media-types.
174+Searx is able to return results of different media-types.
178175Currently the following media-types are supported:
179176
180177- default
@@ -183,8 +180,8 @@ Currently the following media-types are supported:
183180- torrent
184181- map
185182
186−to set another media-type as default, you must set the parameter
187−``template`` to the required type.
183+To set another media-type as default, the parameter
184+``template`` must be set to the desired type.
188185
189186default
190187~~~~~~~
@@ -246,31 +243,31 @@ videos
246243torrent
247244~~~~~~~
248245
249−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
250−| result-parameter | information |
251−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
252−| template | is set to ```torrent.html``` |
253−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
254−| url | string, which is representing the url of the result |
255−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
256−| title | string, which is representing the title of the result |
257−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
258−| content | string, which is giving a general result-text |
259−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
260−| publishedDate | [datetime.datetime](https://docs.python.org/2/library/datetime.html#datetime-objects), represent when the result is published _(not implemented yet)_ |
261−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
262−| seed | int, number of seeder |
263−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
264−| leech | int, number of leecher |
265−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
266−| filesize | int, size of file in bytes |
267−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
268−| files | int, number of files |
269−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
270−| magnetlink | string, which is the [magnetlink](https://en.wikipedia.org/wiki/Magnet_URI_scheme) of the result |
271−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
272−| torrentfile | string, which is the torrentfile of the result |
273−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
246++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
247+| result-parameter | information |
248++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
249+| template | is set to ```torrent.html``` |
250++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
251+| url | string, which is representing the url of the result |
252++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
253+| title | string, which is representing the title of the result |
254++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
255+| content | string, which is giving a general result-text |
256++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
257+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published *(not implemented yet)* |
258++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
259+| seed | int, number of seeder |
260++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
261+| leech | int, number of leecher |
262++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
263+| filesize | int, size of file in bytes |
264++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
265+| files | int, number of files |
266++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
267+| magnetlink | string, which is the `magnetlink <https://en.wikipedia.org/wiki/Magnet_URI_scheme>`__ of the result |
268++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
269+| torrentfile | string, which is the torrentfile of the result |
270++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
274271
275272
276273map
dev/engine_overview.html+50−54
@@ -42,31 +42,29 @@
4242 <div class="section" id="engine-overview">
4343<h1><a class="toc-backref" href="#id2">Engine overview</a><a class="headerlink" href="#engine-overview" title="Permalink to this headline">¶</a></h1>
4444<p>searx is a <a class="reference external" href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch-engine</a>,
45−so it is using different search engines to provide better results.</p>
46−<p>Because there is no general search-api which can be used for every
47−search-engine, there must be build an adapter between searx and the
48−external search-engine. This adapters are stored in the folder
49−<a class="reference external" href="https://github.com/asciimoo/searx/tree/master/searx/engines">*searx/engines*</a>,
50−and this site is build to make an general documentation about this
51−engines</p>
45+so it uses different search engines to provide better results.</p>
46+<p>Because there is no general search API which could be used for every
47+search engine, an adapter has to be built between searx and the
48+external search engines. Adapters are stored under the folder
49+<a class="reference external" href="https://github.com/asciimoo/searx/tree/master/searx/engines">searx/engines</a>.</p>
5250<div class="contents topic" id="contents">
5351<p class="topic-title first">Contents</p>
5452<ul class="simple">
5553<li><a class="reference internal" href="#engine-overview" id="id2">Engine overview</a><ul>
5654<li><a class="reference internal" href="#general-engine-configuration" id="id3">general engine configuration</a><ul>
57−<li><a class="reference internal" href="#engine-file" id="id4">engine-file</a></li>
55+<li><a class="reference internal" href="#engine-file" id="id4">engine file</a></li>
5856<li><a class="reference internal" href="#settings-yml" id="id5">settings.yml</a></li>
5957<li><a class="reference internal" href="#overrides" id="id6">overrides</a></li>
60−<li><a class="reference internal" href="#example-code" id="id7">example-code</a></li>
58+<li><a class="reference internal" href="#example-code" id="id7">example code</a></li>
6159</ul>
6260</li>
63−<li><a class="reference internal" href="#doing-request" id="id8">doing request</a><ul>
61+<li><a class="reference internal" href="#making-a-request" id="id8">making a request</a><ul>
6462<li><a class="reference internal" href="#passed-arguments" id="id9">passed arguments</a></li>
6563<li><a class="reference internal" href="#parsed-arguments" id="id10">parsed arguments</a></li>
66−<li><a class="reference internal" href="#id1" id="id11">example-code</a></li>
64+<li><a class="reference internal" href="#id1" id="id11">example code</a></li>
6765</ul>
6866</li>
69−<li><a class="reference internal" href="#returning-results" id="id12">returning results</a><ul>
67+<li><a class="reference internal" href="#returned-results" id="id12">returned results</a><ul>
7068<li><a class="reference internal" href="#default" id="id13">default</a></li>
7169<li><a class="reference internal" href="#images" id="id14">images</a></li>
7270<li><a class="reference internal" href="#videos" id="id15">videos</a></li>
@@ -80,15 +78,14 @@ engines</p>
8078</div>
8179<div class="section" id="general-engine-configuration">
8280<h2><a class="toc-backref" href="#id3">general engine configuration</a><a class="headerlink" href="#general-engine-configuration" title="Permalink to this headline">¶</a></h2>
83−<p>It is required to tell searx what results can the engine provide. The
84−arguments can be inserted in the engine file, or in the settings file
81+<p>It is required to tell searx the type of results the engine provides. The
82+arguments can be set in the engine file or in the settings file
8583(normally <code class="docutils literal"><span class="pre">settings.yml</span></code>). The arguments in the settings file override
86−the one in the engine file.</p>
87−<p>Really, it is for most options no difference if there are contained in
88−the engine-file or in the settings. But there is a standard where to
89−place specific arguments by default.</p>
84+the ones in the engine file.</p>
85+<p>It does not matter if an options is stored in the engine file or in the
86+settings. However, the standard way is the following:</p>
9087<div class="section" id="engine-file">
91−<h3><a class="toc-backref" href="#id4">engine-file</a><a class="headerlink" href="#engine-file" title="Permalink to this headline">¶</a></h3>
88+<h3><a class="toc-backref" href="#id4">engine file</a><a class="headerlink" href="#engine-file" title="Permalink to this headline">¶</a></h3>
9289<table border="1" class="docutils">
9390<colgroup>
9491<col width="29%" />
@@ -153,17 +150,17 @@ place specific arguments by default.</p>
153150</div>
154151<div class="section" id="overrides">
155152<h3><a class="toc-backref" href="#id6">overrides</a><a class="headerlink" href="#overrides" title="Permalink to this headline">¶</a></h3>
156−<p>There are some options, with have default values in the engine, but are
157−often overwritten by the settings. If the option is assigned in the
158−engine-file with <code class="docutils literal"><span class="pre">None</span></code> it has to be redefined in the settings,
159−otherwise searx is not starting with that engine.</p>
160−<p>The naming of that overrides can be wathever you want. But we recommend
161−the using of already used overrides if possible:</p>
153+<p>A few of the options have default values in the engine, but are
154+often overwritten by the settings. If <code class="docutils literal"><span class="pre">None</span></code> is assigned to an option
155+in the engine file, it has to be redefined in the settings,
156+otherwise searx will not start with that engine.</p>
157+<p>The naming of that overrides is arbitrary. But the recommended
158+overrides are the following:</p>
162159<table border="1" class="docutils">
163160<colgroup>
164161<col width="24%" />
165−<col width="11%" />
166−<col width="65%" />
162+<col width="10%" />
163+<col width="66%" />
167164</colgroup>
168165<thead valign="bottom">
169166<tr class="row-odd"><th class="head">argument</th>
@@ -174,7 +171,7 @@ the using of already used overrides if possible:</p>
174171<tbody valign="top">
175172<tr class="row-even"><td>base_url</td>
176173<td>string</td>
177−<td>base-url, can be overwrite to use same engine on other url</td>
174+<td>base-url, can be overwritten to use same engine on other URL</td>
178175</tr>
179176<tr class="row-odd"><td>number_of_results</td>
180177<td>int</td>
@@ -192,7 +189,7 @@ the using of already used overrides if possible:</p>
192189</table>
193190</div>
194191<div class="section" id="example-code">
195−<h3><a class="toc-backref" href="#id7">example-code</a><a class="headerlink" href="#example-code" title="Permalink to this headline">¶</a></h3>
192+<h3><a class="toc-backref" href="#id7">example code</a><a class="headerlink" href="#example-code" title="Permalink to this headline">¶</a></h3>
196193<div class="code python highlight-python"><div class="highlight"><pre><span class="c"># engine dependent config</span>
197194<span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;general&#39;</span><span class="p">]</span>
198195<span class="n">paging</span> <span class="o">=</span> <span class="bp">True</span>
@@ -201,15 +198,14 @@ the using of already used overrides if possible:</p>
201198</div>
202199</div>
203200</div>
204−<div class="section" id="doing-request">
205−<h2><a class="toc-backref" href="#id8">doing request</a><a class="headerlink" href="#doing-request" title="Permalink to this headline">¶</a></h2>
206−<p>To perform a search you have to specific at least a url on which the
207−request is performing</p>
201+<div class="section" id="making-a-request">
202+<h2><a class="toc-backref" href="#id8">making a request</a><a class="headerlink" href="#making-a-request" title="Permalink to this headline">¶</a></h2>
203+<p>To perform a search an URL have to be specified. In addition to
204+specifying an URL, arguments can be passed to the query.</p>
208205<div class="section" id="passed-arguments">
209206<h3><a class="toc-backref" href="#id9">passed arguments</a><a class="headerlink" href="#passed-arguments" title="Permalink to this headline">¶</a></h3>
210−<p>This arguments can be used to calculate the search-query. Furthermore,
211−some of that parameters are filled with default values which can be
212−changed for special purpose.</p>
207+<p>These arguments can be used to construct the search query. Furthermore,
208+parameters with default value can be redefined for special purposes.</p>
213209<table border="1" class="docutils">
214210<colgroup>
215211<col width="21%" />
@@ -219,7 +215,7 @@ changed for special purpose.</p>
219215<thead valign="bottom">
220216<tr class="row-odd"><th class="head">argument</th>
221217<th class="head">type</th>
222−<th class="head">default-value, informations</th>
218+<th class="head">default-value, information</th>
223219</tr>
224220</thead>
225221<tbody valign="top">
@@ -272,14 +268,14 @@ changed for special purpose.</p>
272268</div>
273269<div class="section" id="parsed-arguments">
274270<h3><a class="toc-backref" href="#id10">parsed arguments</a><a class="headerlink" href="#parsed-arguments" title="Permalink to this headline">¶</a></h3>
275−<p>The function <code class="docutils literal"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code> is always returning the
276−<code class="docutils literal"><span class="pre">params</span></code> variable back. Inside searx, the following paramters can be
277−used to specific a search-request:</p>
271+<p>The function <code class="docutils literal"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code> always returns the
272+<code class="docutils literal"><span class="pre">params</span></code> variable. Inside searx, the following paramters can be
273+used to specify a search request:</p>
278274<table border="1" class="docutils">
279275<colgroup>
280276<col width="15%" />
281277<col width="14%" />
282−<col width="72%" />
278+<col width="71%" />
283279</colgroup>
284280<thead valign="bottom">
285281<tr class="row-odd"><th class="head">argument</th>
@@ -294,15 +290,15 @@ used to specific a search-request:</p>
294290</tr>
295291<tr class="row-odd"><td>method</td>
296292<td>string</td>
297−<td>HTTP request methode</td>
293+<td>HTTP request method</td>
298294</tr>
299295<tr class="row-even"><td>headers</td>
300296<td>set</td>
301−<td>HTTP header informations</td>
297+<td>HTTP header information</td>
302298</tr>
303299<tr class="row-odd"><td>data</td>
304300<td>set</td>
305−<td>HTTP data informations (parsed if <code class="docutils literal"><span class="pre">method</span> <span class="pre">!=</span> <span class="pre">'GET'</span></code>)</td>
301+<td>HTTP data information (parsed if <code class="docutils literal"><span class="pre">method</span> <span class="pre">!=</span> <span class="pre">'GET'</span></code>)</td>
306302</tr>
307303<tr class="row-even"><td>cookies</td>
308304<td>set</td>
@@ -316,7 +312,7 @@ used to specific a search-request:</p>
316312</table>
317313</div>
318314<div class="section" id="id1">
319−<h3><a class="toc-backref" href="#id11">example-code</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
315+<h3><a class="toc-backref" href="#id11">example code</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
320316<div class="code python highlight-python"><div class="highlight"><pre><span class="c"># search-url</span>
321317<span class="n">base_url</span> <span class="o">=</span> <span class="s">&#39;https://example.com/&#39;</span>
322318<span class="n">search_string</span> <span class="o">=</span> <span class="s">&#39;search?{query}&amp;page={page}&#39;</span>
@@ -334,9 +330,9 @@ used to specific a search-request:</p>
334330</div>
335331</div>
336332</div>
337−<div class="section" id="returning-results">
338−<h2><a class="toc-backref" href="#id12">returning results</a><a class="headerlink" href="#returning-results" title="Permalink to this headline">¶</a></h2>
339−<p>Searx has the possiblity to return results in different media-types.
333+<div class="section" id="returned-results">
334+<h2><a class="toc-backref" href="#id12">returned results</a><a class="headerlink" href="#returned-results" title="Permalink to this headline">¶</a></h2>
335+<p>Searx is able to return results of different media-types.
340336Currently the following media-types are supported:</p>
341337<ul class="simple">
342338<li>default</li>
@@ -345,8 +341,8 @@ Currently the following media-types are supported:</p>
345341<li>torrent</li>
346342<li>map</li>
347343</ul>
348−<p>to set another media-type as default, you must set the parameter
349−<code class="docutils literal"><span class="pre">template</span></code> to the required type.</p>
344+<p>To set another media-type as default, the parameter
345+<code class="docutils literal"><span class="pre">template</span></code> must be set to the desired type.</p>
350346<div class="section" id="default">
351347<h3><a class="toc-backref" href="#id13">default</a><a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h3>
352348<table border="1" class="docutils">
@@ -451,8 +447,8 @@ Currently the following media-types are supported:</p>
451447<h3><a class="toc-backref" href="#id16">torrent</a><a class="headerlink" href="#torrent" title="Permalink to this headline">¶</a></h3>
452448<table border="1" class="docutils">
453449<colgroup>
454−<col width="11%" />
455−<col width="89%" />
450+<col width="10%" />
451+<col width="90%" />
456452</colgroup>
457453<tbody valign="top">
458454<tr class="row-odd"><td>result-parameter</td>
@@ -471,7 +467,7 @@ Currently the following media-types are supported:</p>
471467<td>string, which is giving a general result-text</td>
472468</tr>
473469<tr class="row-even"><td>publishedDate</td>
474−<td>[datetime.datetime](<a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">https://docs.python.org/2/library/datetime.html#datetime-objects</a>), represent when the result is published _(not implemented yet)_</td>
470+<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, represent when the result is published <em>(not implemented yet)</em></td>
475471</tr>
476472<tr class="row-odd"><td>seed</td>
477473<td>int, number of seeder</td>
@@ -486,7 +482,7 @@ Currently the following media-types are supported:</p>
486482<td>int, number of files</td>
487483</tr>
488484<tr class="row-odd"><td>magnetlink</td>
489−<td>string, which is the [magnetlink](<a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">https://en.wikipedia.org/wiki/Magnet_URI_scheme</a>) of the result</td>
485+<td>string, which is the <a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">magnetlink</a> of the result</td>
490486</tr>
491487<tr class="row-even"><td>torrentfile</td>
492488<td>string, which is the torrentfile of the result</td>
docs/dev/engine_overview.rst+91−94
@@ -3,14 +3,13 @@ Engine overview
33
44
55searx is a `metasearch-engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__,
6−so it is using different search engines to provide better results.
6+so it uses different search engines to provide better results.
77
8−Because there is no general search-api which can be used for every
9−search-engine, there must be build an adapter between searx and the
10−external search-engine. This adapters are stored in the folder
11−`*searx/engines* <https://github.com/asciimoo/searx/tree/master/searx/engines>`__,
12−and this site is build to make an general documentation about this
13−engines
8+Because there is no general search API which could be used for every
9+search engine, an adapter has to be built between searx and the
10+external search engines. Adapters are stored under the folder
11+`searx/engines
12+<https://github.com/asciimoo/searx/tree/master/searx/engines>`__.
1413
1514
1615.. contents::
@@ -19,17 +18,16 @@ engines
1918general engine configuration
2019----------------------------
2120
22−It is required to tell searx what results can the engine provide. The
23−arguments can be inserted in the engine file, or in the settings file
21+It is required to tell searx the type of results the engine provides. The
22+arguments can be set in the engine file or in the settings file
2423(normally ``settings.yml``). The arguments in the settings file override
25−the one in the engine file.
24+the ones in the engine file.
2625
27−Really, it is for most options no difference if there are contained in
28−the engine-file or in the settings. But there is a standard where to
29−place specific arguments by default.
26+It does not matter if an options is stored in the engine file or in the
27+settings. However, the standard way is the following:
3028
3129
32−engine-file
30+engine file
3331~~~~~~~~~~~
3432
3533+---------------------+-----------+-----------------------------------------+
@@ -60,27 +58,27 @@ settings.yml
6058overrides
6159~~~~~~~~~
6260
63−There are some options, with have default values in the engine, but are
64−often overwritten by the settings. If the option is assigned in the
65−engine-file with ``None`` it has to be redefined in the settings,
66−otherwise searx is not starting with that engine.
67−
68−The naming of that overrides can be wathever you want. But we recommend
69−the using of already used overrides if possible:
70−
71−+-----------------------+----------+--------------------------------------------------------------+
72−| argument | type | information |
73−+=======================+==========+==============================================================+
74−| base\_url | string | base-url, can be overwrite to use same engine on other url |
75−+-----------------------+----------+--------------------------------------------------------------+
76−| number\_of\_results | int | maximum number of results per request |
77−+-----------------------+----------+--------------------------------------------------------------+
78−| language | string | ISO code of language and country like en\_US |
79−+-----------------------+----------+--------------------------------------------------------------+
80−| api\_key | string | api-key if required by engine |
81−+-----------------------+----------+--------------------------------------------------------------+
82−
83−example-code
61+A few of the options have default values in the engine, but are
62+often overwritten by the settings. If ``None`` is assigned to an option
63+in the engine file, it has to be redefined in the settings,
64+otherwise searx will not start with that engine.
65+
66+The naming of that overrides is arbitrary. But the recommended
67+overrides are the following:
68+
69++-----------------------+----------+----------------------------------------------------------------+
70+| argument | type | information |
71++=======================+==========+================================================================+
72+| base\_url | string | base-url, can be overwritten to use same engine on other URL |
73++-----------------------+----------+----------------------------------------------------------------+
74+| number\_of\_results | int | maximum number of results per request |
75++-----------------------+----------+----------------------------------------------------------------+
76+| language | string | ISO code of language and country like en\_US |
77++-----------------------+----------+----------------------------------------------------------------+
78+| api\_key | string | api-key if required by engine |
79++-----------------------+----------+----------------------------------------------------------------+
80+
81+example code
8482~~~~~~~~~~~~
8583
8684.. code:: python
@@ -90,21 +88,20 @@ example-code
9088 paging = True
9189 language_support = True
9290
93−doing request
94−-------------
91+making a request
92+----------------
9593
96−To perform a search you have to specific at least a url on which the
97−request is performing
94+To perform a search an URL have to be specified. In addition to
95+specifying an URL, arguments can be passed to the query.
9896
9997passed arguments
10098~~~~~~~~~~~~~~~~
10199
102−This arguments can be used to calculate the search-query. Furthermore,
103−some of that parameters are filled with default values which can be
104−changed for special purpose.
100+These arguments can be used to construct the search query. Furthermore,
101+parameters with default value can be redefined for special purposes.
105102
106103+----------------------+------------+------------------------------------------------------------------------+
107−| argument | type | default-value, informations |
104+| argument | type | default-value, information |
108105+======================+============+========================================================================+
109106| url | string | ``''`` |
110107+----------------------+------------+------------------------------------------------------------------------+
@@ -132,27 +129,27 @@ changed for special purpose.
132129parsed arguments
133130~~~~~~~~~~~~~~~~
134131
135−The function ``def request(query, params):`` is always returning the
136−``params`` variable back. Inside searx, the following paramters can be
137−used to specific a search-request:
138−
139−+------------+-----------+----------------------------------------------------------+
140−| argument | type | information |
141−+============+===========+==========================================================+
142−| url | string | requested url |
143−+------------+-----------+----------------------------------------------------------+
144−| method | string | HTTP request methode |
145−+------------+-----------+----------------------------------------------------------+
146−| headers | set | HTTP header informations |
147−+------------+-----------+----------------------------------------------------------+
148−| data | set | HTTP data informations (parsed if ``method != 'GET'``) |
149−+------------+-----------+----------------------------------------------------------+
150−| cookies | set | HTTP cookies |
151−+------------+-----------+----------------------------------------------------------+
152−| verify | boolean | Performing SSL-Validity check |
153−+------------+-----------+----------------------------------------------------------+
154−
155−example-code
132+The function ``def request(query, params):`` always returns the
133+``params`` variable. Inside searx, the following paramters can be
134+used to specify a search request:
135+
136++------------+-----------+---------------------------------------------------------+
137+| argument | type | information |
138++============+===========+=========================================================+
139+| url | string | requested url |
140++------------+-----------+---------------------------------------------------------+
141+| method | string | HTTP request method |
142++------------+-----------+---------------------------------------------------------+
143+| headers | set | HTTP header information |
144++------------+-----------+---------------------------------------------------------+
145+| data | set | HTTP data information (parsed if ``method != 'GET'``) |
146++------------+-----------+---------------------------------------------------------+
147+| cookies | set | HTTP cookies |
148++------------+-----------+---------------------------------------------------------+
149+| verify | boolean | Performing SSL-Validity check |
150++------------+-----------+---------------------------------------------------------+
151+
152+example code
156153~~~~~~~~~~~~
157154
158155.. code:: python
@@ -171,10 +168,10 @@ example-code
171168
172169 return params
173170
174−returning results
175−-----------------
171+returned results
172+----------------
176173
177−Searx has the possiblity to return results in different media-types.
174+Searx is able to return results of different media-types.
178175Currently the following media-types are supported:
179176
180177- default
@@ -183,8 +180,8 @@ Currently the following media-types are supported:
183180- torrent
184181- map
185182
186−to set another media-type as default, you must set the parameter
187−``template`` to the required type.
183+To set another media-type as default, the parameter
184+``template`` must be set to the desired type.
188185
189186default
190187~~~~~~~
@@ -246,31 +243,31 @@ videos
246243torrent
247244~~~~~~~
248245
249−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
250−| result-parameter | information |
251−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
252−| template | is set to ```torrent.html``` |
253−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
254−| url | string, which is representing the url of the result |
255−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
256−| title | string, which is representing the title of the result |
257−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
258−| content | string, which is giving a general result-text |
259−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
260−| publishedDate | [datetime.datetime](https://docs.python.org/2/library/datetime.html#datetime-objects), represent when the result is published _(not implemented yet)_ |
261−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
262−| seed | int, number of seeder |
263−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
264−| leech | int, number of leecher |
265−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
266−| filesize | int, size of file in bytes |
267−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
268−| files | int, number of files |
269−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
270−| magnetlink | string, which is the [magnetlink](https://en.wikipedia.org/wiki/Magnet_URI_scheme) of the result |
271−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
272−| torrentfile | string, which is the torrentfile of the result |
273−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
246++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
247+| result-parameter | information |
248++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
249+| template | is set to ```torrent.html``` |
250++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
251+| url | string, which is representing the url of the result |
252++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
253+| title | string, which is representing the title of the result |
254++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
255+| content | string, which is giving a general result-text |
256++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
257+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published *(not implemented yet)* |
258++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
259+| seed | int, number of seeder |
260++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
261+| leech | int, number of leecher |
262++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
263+| filesize | int, size of file in bytes |
264++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
265+| files | int, number of files |
266++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
267+| magnetlink | string, which is the `magnetlink <https://en.wikipedia.org/wiki/Magnet_URI_scheme>`__ of the result |
268++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
269+| torrentfile | string, which is the torrentfile of the result |
270++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
274271
275272
276273map