on master help sign in
doc: move patches from /doc folder of branch gh-pages to master

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commit49e8dd1e0dbce9b06a3a4ad2de6fc0e1d95eb49b authorMarkus Heiser <markus.heiser@darmarit.de> dateThu 12 Dec 2019, 11:19 (7 years ago) parent3f93fe061e9b0b
25 files changed+2533
docs/_themes/searx_theme/layout.html+20 docs/_themes/searx_theme/relations.html+14 docs/_themes/searx_theme/static/style.css_t+443 docs/_themes/searx_theme/theme.conf+7 docs/admin/api.rst+94 docs/admin/filtron.rst+114 docs/admin/morty.rst+21 docs/blog/admin.rst+42 docs/blog/blog.rst+9 docs/blog/intro-offline.rst+65 docs/blog/python3.rst+54 docs/blog/searx-admin-engines.png docs/blog/searxpy3.png docs/conf.py+358 docs/dev/contribution_guide.rst+98 docs/dev/engine_overview.rst+315 docs/dev/install/installation.rst+329 docs/dev/plugins.rst+45 docs/dev/quickstart.rst+108 docs/dev/search_api.rst+204 docs/dev/translation.rst+61 docs/index.rst+56 docs/static/img/searx_logo_small.png docs/user/own-instance.rst+43 docs/user/search_syntax.rst+33
docs/_themes/searx_theme/layout.htmlnew file+20
@@ -0,0 +1,20 @@
1+{%- extends "basic/layout.html" %}
2+{%- block extrahead %}
3+ {{ super() }}
4+ {% if theme_touch_icon %}
5+ <link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
6+ {% endif %}
7+ <link media="only screen and (max-device-width: 480px)" href="{{
8+ pathto('_static/small_flask.css', 1) }}" type= "text/css" rel="stylesheet" />
9+ <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
10+{% endblock %}
11+{%- block relbar2 %}{% endblock %}
12+{%- block relbar1 %}{% endblock %}
13+{%- block sidebarsearch %}{% endblock %}
14+{%- block sidebarsourcelink %}{% endblock %}
15+{%- block sidebartoc %}{% endblock %}
16+{%- block footer %}
17+ <div class="footer">
18+ &copy; Copyright {{ copyright }}.
19+ </div>
20+{%- endblock %}
docs/_themes/searx_theme/relations.htmlnew file+14
@@ -0,0 +1,14 @@
1+<div class="sidebar_container body">
2+<h1>Searx</h1>
3+<ul>
4+ <li><a href="{{ pathto('index') }}">Home</a></li>
5+ <li><a href="https://github.com/asciimoo/searx">Source</a></li>
6+ <li><a href="{{ pathto('blog/blog') }}">Blog</a></li>
7+ <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
8+ <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
9+</ul>
10+<hr />
11+<ul>
12+ <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
13+</ul>
14+</div>
docs/_themes/searx_theme/static/style.css_tnew file+443
@@ -0,0 +1,443 @@
1+/*
2+ * flasky.css_t
3+ * ~~~~~~~~~~~~
4+ *
5+ * :copyright: Copyright 2010 by Armin Ronacher. Modifications by Kenneth Reitz.
6+ * :license: Flask Design License, see LICENSE for details.
7+ */
8+
9+{% set page_width = '940px' %}
10+{% set sidebar_width = '220px' %}
11+
12+@import url("basic.css");
13+
14+/* -- page layout ----------------------------------------------------------- */
15+
16+body {
17+ font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro';
18+ font-size: 17px;
19+ background-color: white;
20+ color: #000;
21+ margin: 0;
22+ padding: 0;
23+}
24+
25+div.document {
26+ width: {{ page_width }};
27+ margin: 30px auto 0 auto;
28+}
29+
30+div.documentwrapper {
31+ float: left;
32+ width: 100%;
33+}
34+
35+div.bodywrapper {
36+ margin: 0 0 0 {{ sidebar_width }};
37+}
38+
39+div.sphinxsidebar {
40+ width: {{ sidebar_width }};
41+ word-wrap: normal !important;
42+ overflow-wrap: normal !important;
43+}
44+
45+hr {
46+ border: 1px solid #B1B4B6;
47+}
48+
49+div.body {
50+ background-color: #ffffff;
51+ color: #3E4349;
52+ padding: 0 30px 0 30px;
53+}
54+
55+img.floatingflask {
56+ padding: 0 0 10px 10px;
57+ float: right;
58+}
59+
60+div.footer {
61+ width: {{ page_width }};
62+ margin: 20px auto 30px auto;
63+ font-size: 14px;
64+ color: #888;
65+ text-align: right;
66+}
67+
68+div.footer a {
69+ color: #888;
70+}
71+
72+div.sphinxsidebar a {
73+ color: #444;
74+ text-decoration: none;
75+ border-bottom: 1px dotted #999;
76+}
77+
78+div.sphinxsidebar a:hover {
79+ border-bottom: 1px solid #999;
80+}
81+
82+div.sphinxsidebarwrapper {
83+ padding: 0 10px;
84+}
85+
86+div.sphinxsidebarwrapper p.logo {
87+ padding: 0;
88+ margin: -10px 0 0 -20px;
89+ text-align: center;
90+}
91+
92+div.sphinxsidebar h3,
93+div.sphinxsidebar h4 {
94+ font-family: 'Garamond', 'Georgia', serif;
95+ color: #444;
96+ font-size: 24px;
97+ font-weight: normal;
98+ margin: 0 0 5px 0;
99+ padding: 0;
100+}
101+
102+div.sphinxsidebar h4 {
103+ font-size: 20px;
104+}
105+
106+div.sphinxsidebar h3 a {
107+ color: #444;
108+}
109+
110+div.sphinxsidebar p.logo a,
111+div.sphinxsidebar h3 a,
112+div.sphinxsidebar p.logo a:hover,
113+div.sphinxsidebar h3 a:hover {
114+ border: none;
115+}
116+
117+div.sphinxsidebar p {
118+ color: #555;
119+ margin: 10px 0;
120+}
121+
122+div.sphinxsidebar ul {
123+ margin: 10px 0;
124+ padding: 0;
125+ color: #000;
126+}
127+
128+div.sphinxsidebar input {
129+ border: 1px solid #ccc;
130+ font-family: 'Georgia', serif;
131+ font-size: 1em;
132+}
133+
134+/* -- body styles ----------------------------------------------------------- */
135+
136+a {
137+ color: #004B6B;
138+ text-decoration: underline;
139+}
140+
141+a:hover {
142+ color: #6D4100;
143+ text-decoration: underline;
144+}
145+
146+div.body h1,
147+div.body h2,
148+div.body h3,
149+div.body h4,
150+div.body h5,
151+div.body h6 {
152+ font-family: 'Garamond', 'Georgia', serif;
153+ font-weight: normal;
154+ margin: 30px 0px 10px 0px;
155+ padding: 0;
156+}
157+
158+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
159+div.body h2 { font-size: 180%; }
160+div.body h3 { font-size: 150%; }
161+div.body h4 { font-size: 130%; }
162+div.body h5 { font-size: 100%; }
163+div.body h6 { font-size: 100%; }
164+
165+a.headerlink {
166+ color: #ddd;
167+ padding: 0 4px;
168+ text-decoration: none;
169+}
170+
171+a.headerlink:hover {
172+ color: #444;
173+ background: #eaeaea;
174+}
175+
176+div.body p, div.body dd, div.body li {
177+ line-height: 1.4em;
178+}
179+
180+div.admonition {
181+ background: #fafafa;
182+ margin: 20px -30px;
183+ padding: 10px 30px;
184+ border-top: 1px solid #ccc;
185+ border-bottom: 1px solid #ccc;
186+}
187+
188+div.admonition tt.xref, div.admonition a tt {
189+ border-bottom: 1px solid #fafafa;
190+}
191+
192+dd div.admonition {
193+ margin-left: -60px;
194+ padding-left: 60px;
195+}
196+
197+div.admonition p.admonition-title {
198+ font-family: 'Garamond', 'Georgia', serif;
199+ font-weight: normal;
200+ font-size: 24px;
201+ margin: 0 0 10px 0;
202+ padding: 0;
203+ line-height: 1;
204+}
205+
206+div.admonition p.last {
207+ margin-bottom: 0;
208+}
209+
210+div.highlight {
211+ background-color: white;
212+}
213+
214+dt:target, .highlight {
215+ background: #FAF3E8;
216+}
217+
218+div.note {
219+ background-color: #eee;
220+ border: 1px solid #ccc;
221+}
222+
223+div.seealso {
224+ background-color: #ffc;
225+ border: 1px solid #ff6;
226+}
227+
228+div.topic {
229+ background-color: #eee;
230+}
231+
232+p.admonition-title {
233+ display: inline;
234+}
235+
236+p.admonition-title:after {
237+ content: ":";
238+}
239+
240+pre, tt {
241+ font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
242+ font-size: 0.9em;
243+}
244+
245+img.screenshot {
246+}
247+
248+tt.descname, tt.descclassname {
249+ font-size: 0.95em;
250+}
251+
252+tt.descname {
253+ padding-right: 0.08em;
254+}
255+
256+img.screenshot {
257+ -moz-box-shadow: 2px 2px 4px #eee;
258+ -webkit-box-shadow: 2px 2px 4px #eee;
259+ box-shadow: 2px 2px 4px #eee;
260+}
261+
262+table.docutils {
263+ border: 1px solid #888;
264+ -moz-box-shadow: 2px 2px 4px #eee;
265+ -webkit-box-shadow: 2px 2px 4px #eee;
266+ box-shadow: 2px 2px 4px #eee;
267+}
268+
269+table.docutils td, table.docutils th {
270+ border: 1px solid #888;
271+ padding: 0.25em 0.7em;
272+}
273+
274+table.field-list, table.footnote {
275+ border: none;
276+ -moz-box-shadow: none;
277+ -webkit-box-shadow: none;
278+ box-shadow: none;
279+}
280+
281+table.footnote {
282+ margin: 15px 0;
283+ width: 100%;
284+ border: 1px solid #eee;
285+ background: #fdfdfd;
286+ font-size: 0.9em;
287+}
288+
289+table.footnote + table.footnote {
290+ margin-top: -15px;
291+ border-top: none;
292+}
293+
294+table.field-list th {
295+ padding: 0 0.8em 0 0;
296+}
297+
298+table.field-list td {
299+ padding: 0;
300+}
301+
302+table.footnote td.label {
303+ width: 0px;
304+ padding: 0.3em 0 0.3em 0.5em;
305+}
306+
307+table.footnote td {
308+ padding: 0.3em 0.5em;
309+}
310+
311+dl {
312+ margin: 0;
313+ padding: 0;
314+}
315+
316+dl dd {
317+ margin-left: 30px;
318+}
319+
320+blockquote {
321+ margin: 0 0 0 30px;
322+ padding: 0;
323+}
324+
325+ul, ol {
326+ margin: 10px 0 10px 30px;
327+ padding: 0;
328+}
329+
330+pre {
331+ background: #eee;
332+ padding: 7px 30px;
333+ margin: 15px -30px;
334+ line-height: 1.3em;
335+}
336+
337+dl pre, blockquote pre, li pre {
338+ margin-left: -60px;
339+ padding-left: 60px;
340+}
341+
342+dl dl pre {
343+ margin-left: -90px;
344+ padding-left: 90px;
345+}
346+
347+tt {
348+ background-color: #ecf0f3;
349+ color: #222;
350+ /* padding: 1px 2px; */
351+}
352+
353+tt.xref, a tt {
354+ background-color: #FBFBFB;
355+ border-bottom: 1px solid white;
356+}
357+
358+a.reference {
359+ text-decoration: none;
360+ border-bottom: 1px dotted #004B6B;
361+}
362+
363+a.reference:hover {
364+ border-bottom: 1px solid #6D4100;
365+}
366+
367+a.footnote-reference {
368+ text-decoration: none;
369+ font-size: 0.7em;
370+ vertical-align: top;
371+ border-bottom: 1px dotted #004B6B;
372+}
373+
374+a.footnote-reference:hover {
375+ border-bottom: 1px solid #6D4100;
376+}
377+
378+a:hover tt {
379+ background: #EEE;
380+}
381+
382+
383+@media screen and (max-width: 600px) {
384+
385+ div.document {
386+ width: 100%;
387+
388+ }
389+
390+ div.documentwrapper {
391+ margin-left: 0;
392+ margin-top: 0;
393+ margin-right: 0;
394+ margin-bottom: 0;
395+ }
396+
397+ div.bodywrapper {
398+ margin-top: 0;
399+ margin-right: 0;
400+ margin-bottom: 0;
401+ margin-left: 0;
402+ }
403+
404+ ul {
405+ margin-left: 0;
406+ }
407+
408+ .document {
409+ width: auto;
410+ }
411+
412+ .footer {
413+ width: auto;
414+ }
415+
416+ .bodywrapper {
417+ margin: 0;
418+ }
419+
420+ .footer {
421+ width: auto;
422+ }
423+
424+ div.sphinxsidebar {
425+ display: none;
426+ }
427+
428+}
429+
430+div.sidebar_container, div.sidebar_container h1 {
431+}
432+
433+div.sidebar_container h1 {
434+ padding: 0;
435+ margin: 0;
436+ font-size: 350%;
437+ line-height: 100%;
438+}
439+
440+div.sidebar_container ul li {
441+ padding: 2px 8px;
442+ font-size: 0.9em;
443+}
docs/_themes/searx_theme/theme.confnew file+7
@@ -0,0 +1,7 @@
1+[theme]
2+inherit = basic
3+stylesheet = style.css
4+pygments_style = flask_theme_support.FlaskyStyle
5+
6+[options]
7+touch_icon =
docs/admin/api.rstnew file+94
@@ -0,0 +1,94 @@
1+.. _adminapi:
2+
3+Administration API
4+------------------
5+
6+Get configuration data
7+~~~~~~~~~~~~~~~~~~~~~~
8+
9+.. code:: sh
10+
11+ GET /config
12+
13+Sample response
14+```````````````
15+
16+.. code:: sh
17+
18+ {
19+ "autocomplete": "",
20+ "categories": [
21+ "map",
22+ "it",
23+ "images",
24+ ],
25+ "default_locale": "",
26+ "default_theme": "oscar",
27+ "engines": [
28+ {
29+ "categories": [
30+ "map"
31+ ],
32+ "enabled": true,
33+ "name": "openstreetmap",
34+ "shortcut": "osm"
35+ },
36+ {
37+ "categories": [
38+ "it"
39+ ],
40+ "enabled": true,
41+ "name": "arch linux wiki",
42+ "shortcut": "al"
43+ },
44+ {
45+ "categories": [
46+ "images"
47+ ],
48+ "enabled": true,
49+ "name": "google images",
50+ "shortcut": "goi"
51+ },
52+ {
53+ "categories": [
54+ "it"
55+ ],
56+ "enabled": false,
57+ "name": "bitbucket",
58+ "shortcut": "bb"
59+ },
60+ ],
61+ "instance_name": "searx",
62+ "locales": {
63+ "de": "Deutsch (German)",
64+ "en": "English",
65+ "eo": "Esperanto (Esperanto)",
66+ },
67+ "plugins": [
68+ {
69+ "enabled": true,
70+ "name": "HTTPS rewrite"
71+ },
72+ {
73+ "enabled": false,
74+ "name": "Vim-like hotkeys"
75+ }
76+ ],
77+ "safe_search": 0
78+ }
79+
80+Embed search bar
81+----------------
82+
83+The search bar can be embedded into websites. Just paste the example into the HTML of the site.
84+URL of the searx instance and values are customizable.
85+
86+.. code:: html
87+
88+ <form method="post" action="https://searx.me/">
89+ <!-- search query --> <input type="text" name="q" />
90+ <!-- categories --> <input type="hidden" name="categories" value="general,social media" />
91+ <!-- language --> <input type="hidden" name="lang" value="all" />
92+ <!-- locale --> <input type="hidden" name="locale" value="en" />
93+ <!-- date filter --> <input type="hidden" name="time_range" value="month" />
94+ </form>
docs/admin/filtron.rstnew file+114
@@ -0,0 +1,114 @@
1+How to protect an instance
2+==========================
3+
4+Searx depens on external search services. To avoid the abuse of these services it is advised to limit the number of requests processed by searx.
5+
6+An application firewall, ``filtron`` solves exactly this problem. Information on how to install it can be found at the `project page of filtron <https://github.com/asciimoo/filtron>`__.
7+
8+Sample configuration of filtron
9+-------------------------------
10+
11+An example configuration can be find below. This configuration limits the access of
12+
13+ * scripts or applications (roboagent limit)
14+
15+ * webcrawlers (botlimit)
16+
17+ * IPs which send too many requests (IP limit)
18+
19+ * too many json, csv, etc. requests (rss/json limit)
20+
21+ * the same UserAgent of if too many requests (useragent limit)
22+
23+
24+.. code:: json
25+
26+ [
27+ {
28+ "name": "search request",
29+ "filters": ["Param:q", "Path=^(/|/search)$"],
30+ "interval": <time-interval-in-sec>,
31+ "limit": <max-request-number-in-interval>,
32+ "subrules": [
33+ {
34+ "name": "roboagent limit",
35+ "interval": <time-interval-in-sec>,
36+ "limit": <max-request-number-in-interval>,
37+ "filters": ["Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"],
38+ "actions": [
39+ {"name": "block",
40+ "params": {"message": "Rate limit exceeded"}}
41+ ]
42+ },
43+ {
44+ "name": "botlimit",
45+ "limit": 0,
46+ "stop": true,
47+ "filters": ["Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"],
48+ "actions": [
49+ {"name": "block",
50+ "params": {"message": "Rate limit exceeded"}}
51+ ]
52+ },
53+ {
54+ "name": "IP limit",
55+ "interval": <time-interval-in-sec>,
56+ "limit": <max-request-number-in-interval>,
57+ "stop": true,
58+ "aggregations": ["Header:X-Forwarded-For"],
59+ "actions": [
60+ {"name": "block",
61+ "params": {"message": "Rate limit exceeded"}}
62+ ]
63+ },
64+ {
65+ "name": "rss/json limit",
66+ "interval": <time-interval-in-sec>,
67+ "limit": <max-request-number-in-interval>,
68+ "stop": true,
69+ "filters": ["Param:format=(csv|json|rss)"],
70+ "actions": [
71+ {"name": "block",
72+ "params": {"message": "Rate limit exceeded"}}
73+ ]
74+ },
75+ {
76+ "name": "useragent limit",
77+ "interval": <time-interval-in-sec>,
78+ "limit": <max-request-number-in-interval>,
79+ "aggregations": ["Header:User-Agent"],
80+ "actions": [
81+ {"name": "block",
82+ "params": {"message": "Rate limit exceeded"}}
83+ ]
84+ }
85+ ]
86+ }
87+ ]
88+
89+
90+
91+Route request through filtron
92+-----------------------------
93+
94+Filtron can be started using the following command:
95+
96+.. code:: bash
97+
98+ $ filtron -rules rules.json
99+
100+It listens on 127.0.0.1:4004 and forwards filtered requests to 127.0.0.1:8888 by default.
101+
102+Use it along with ``nginx`` with the following example configuration.
103+
104+.. code:: bash
105+
106+ location / {
107+ proxy_set_header Host $http_host;
108+ proxy_set_header X-Real-IP $remote_addr;
109+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
110+ proxy_set_header X-Scheme $scheme;
111+ proxy_pass http://127.0.0.1:4004/;
112+ }
113+
114+Requests are coming from port 4004 going through filtron and then forwarded to port 8888 where a searx is being run.
docs/admin/morty.rstnew file+21
@@ -0,0 +1,21 @@
1+How to setup result proxy
2+=========================
3+
4+By default searx can only act as an image proxy for result images,
5+but it is possible to proxify all the result URLs with an external service,
6+`morty <https://github.com/asciimoo/morty>`__.
7+
8+To use this feature, morty has to be installed and activated in searx's ``settings.yml``.
9+
10+Add the following snippet to your ``settings.yml`` and restart searx:
11+
12+
13+.. code:: yaml
14+
15+ result_proxy:
16+ url : http://127.0.0.1:3000/
17+ key : your_morty_proxy_key
18+
19+``url`` is the address of the running morty service
20+
21+``key`` is an optional argument, see `morty's README <https://github.com/asciimoo/morty>`__ for more information.
docs/blog/admin.rstnew file+42
@@ -0,0 +1,42 @@
1+Searx admin interface: manage your instance from your browser
2+=============================================================
3+
4+One of the biggest advantages of searx is being extremely customizable. But at first it can be daunting to newcomers.
5+A barrier of taking advantage of this feature is our ugly settings file which is sometimes hard to understand and edit.
6+
7+To make self-hosting searx more accessible a new tool is introduced, called ``searx-admin``.
8+It is a web application which is capable of managing your instance and manipulating its settings via a web UI.
9+It aims to replace editing of ``settings.yml`` for less experienced administrators or people
10+who prefer graphical admin interfaces.
11+
12+.. figure:: searx-admin-engines.png
13+ :scale: 50 %
14+ :alt: Screenshot of engine list
15+ :align: center
16+ :figclass: align-center
17+
18+ Configuration page of engines
19+
20+
21+Since ``searx-admin`` acts as a supervisor for searx, we have decided to implement it
22+as a standalone tool instead of part of searx. Another reason for making it a standalone
23+tool is that the codebase and dependencies of searx should not grow because of a fully optional feature,
24+which does not affect existing instances.
25+
26+
27+Installation
28+------------
29+
30+Installation guide can be found in the repository of searx-admin:
31+https://github.com/kvch/searx-admin#installation--usage
32+
33+Acknowledgements
34+----------------
35+
36+This development was sponsored by `NLnet Foundation`_.
37+
38+.. _NLnet Foundation: https://nlnet.nl/
39+
40+
41+| Happy hacking.
42+| kvch // 2017.08.22 21:25
docs/blog/blog.rstnew file+9
@@ -0,0 +1,9 @@
1+Blog
2+====
3+
4+.. toctree::
5+ :maxdepth: 1
6+
7+ python3
8+ admin
9+ intro-offline
docs/blog/intro-offline.rstnew file+65
@@ -0,0 +1,65 @@
1+Preparation for offline engines
2+===============================
3+
4+Offline engines
5+---------------
6+
7+To extend the functionality of searx, offline engines are going to be introduced. An offline engine is an engine which does not need Internet connection to perform a search and does not use HTTP to communicate.
8+
9+Offline engines can be configured as online engines, by adding those to the `engines` list of `settings.yml`. Thus, searx finds the engine file and imports it.
10+
11+Example skeleton for the new engines:
12+
13+.. code:: python
14+
15+ from subprocess import PIPE, Popen
16+
17+ categories = ['general']
18+ offline = True
19+
20+ def init(settings):
21+ pass
22+
23+ def search(query, params):
24+ process = Popen(['ls', query], stdout=PIPE)
25+ return_code = process.wait()
26+ if return_code != 0:
27+ raise RuntimeError('non-zero return code', return_code)
28+
29+ results = []
30+ line = process.stdout.readline()
31+ while line:
32+ result = parse_line(line)
33+ results.append(results)
34+
35+ line = process.stdout.readline()
36+
37+ return results
38+
39+
40+Development progress
41+--------------------
42+
43+First, a proposal has been created as a Github issue. Then it was moved to the wiki as a design document. You can read it here: https://github.com/asciimoo/searx/wiki/Offline-engines
44+
45+In this development step, searx core was prepared to accept and perform offline searches. Offline search requests are scheduled together with regular offline requests.
46+
47+As offline searches can return arbitrary results depending on the engine, the current result templates were insufficient to present such results. Thus, a new template is introduced which is caplable of presenting arbitrary key value pairs as a table. You can check out the pull request for more details: https://github.com/asciimoo/searx/pull/1700
48+
49+Next steps
50+----------
51+
52+Today, it is possible to create/run an offline engine. However, it is going to be publicly available for everyone who knows the searx instance. So the next step is to introduce token based access for engines. This way administrators are able to limit the access to private engines.
53+
54+Acknowledgement
55+---------------
56+
57+This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
58+
59+.. _Search and Discovery Fund: https://nlnet.nl/discovery
60+.. _NLnet Foundation: https://nlnet.nl/
61+
62+
63+| Happy hacking.
64+| kvch // 2019.10.21 17:03
65+
docs/blog/python3.rstnew file+54
@@ -0,0 +1,54 @@
1+Introducing Python3 support
2+===========================
3+
4+As most operation systems are coming with Python3 installed by default. So it is time for searx to support Python3. But don't worry support of Python2.7 won't be dropped.
5+
6+.. image:: searxpy3.png
7+ :scale: 50 %
8+ :alt: hurray
9+ :align: center
10+
11+
12+How to run searx using Python3
13+------------------------------
14+
15+Please make sure that you run at least Python3.5.
16+
17+To run searx, first a Python3 virtualenv should be created. After entering the virtualenv,
18+dependencies must be installed. Then run searx with python3 instead of the usual python command.
19+
20+.. code:: sh
21+
22+ virtualenv -p python3 venv3
23+ source venv3/bin/activate
24+ pip3 install -r requirements.txt
25+ python3 searx/webapp.py
26+
27+
28+If you want to run searx using Python2.7, you don't have to do anything differently as before.
29+
30+Fun facts
31+---------
32+
33+- 115 files were changed when implementing the support for both Python versions.
34+
35+- All of the dependencies was compatible except for the robotframework used for browser tests. Thus, these tests were migrated to splinter. So from now on both versions are being tested on Travis and can be tested locally.
36+
37+If you found bugs...
38+--------------------
39+
40+...please open an issue on `GitHub`_. Make sure that you mention your Python version in your issue,
41+so we can investigate it properly.
42+
43+.. _GitHub: https://github.com/asciimoo/searx/issues
44+
45+Acknowledgement
46+---------------
47+
48+This development was sponsored by `NLnet Foundation`_.
49+
50+.. _NLnet Foundation: https://nlnet.nl/
51+
52+
53+| Happy hacking.
54+| kvch // 2017.05.13 22:57
docs/blog/searx-admin-engines.pngnew file

Binary file not shown.

docs/blog/searxpy3.pngnew file

Binary file not shown.

docs/conf.pynew file+358
@@ -0,0 +1,358 @@
1+# -*- coding: utf-8 -*-
2+#
3+# searx documentation build configuration file, created by
4+# sphinx-quickstart on Tue Nov 17 17:12:13 2015.
5+#
6+# This file is execfile()d with the current directory set to its
7+# containing dir.
8+#
9+# Note that not all possible configuration values are present in this
10+# autogenerated file.
11+#
12+# All configuration values have a default; values that are commented out
13+# serve to show the default.
14+
15+import sys
16+import os
17+import shlex
18+
19+# If extensions (or modules to document with autodoc) are in another directory,
20+# add these directories to sys.path here. If the directory is relative to the
21+# documentation root, use os.path.abspath to make it absolute, like shown here.
22+#sys.path.insert(0, os.path.abspath('.'))
23+
24+# -- General configuration ------------------------------------------------
25+
26+# If your documentation needs a minimal Sphinx version, state it here.
27+#needs_sphinx = '1.0'
28+
29+# Add any Sphinx extension module names here, as strings. They can be
30+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31+# ones.
32+extensions = [
33+ 'sphinx.ext.viewcode',
34+]
35+
36+# Add any paths that contain templates here, relative to this directory.
37+templates_path = ['_templates']
38+
39+# The suffix(es) of source filenames.
40+# You can specify multiple suffix as a list of string:
41+# source_suffix = ['.rst', '.md']
42+source_suffix = '.rst'
43+
44+# The encoding of source files.
45+#source_encoding = 'utf-8-sig'
46+
47+# The master toctree document.
48+master_doc = 'index'
49+
50+# General information about the project.
51+project = u'searx'
52+copyright = u'2015-2019, Adam Tauber, Noémi Ványi'
53+author = u'Adam Tauber'
54+
55+# The version info for the project you're documenting, acts as replacement for
56+# |version| and |release|, also used in various other places throughout the
57+# built documents.
58+#
59+# The short X.Y version.
60+version = '0.12.0'
61+# The full version, including alpha/beta/rc tags.
62+release = '0.12.0'
63+
64+# The language for content autogenerated by Sphinx. Refer to documentation
65+# for a list of supported languages.
66+#
67+# This is also used if you do content translation via gettext catalogs.
68+# Usually you set "language" from the command line for these cases.
69+language = None
70+
71+# There are two options for replacing |today|: either, you set today to some
72+# non-false value, then it is used:
73+#today = ''
74+# Else, today_fmt is used as the format for a strftime call.
75+#today_fmt = '%B %d, %Y'
76+
77+# List of patterns, relative to source directory, that match files and
78+# directories to ignore when looking for source files.
79+exclude_patterns = []
80+
81+# The reST default role (used for this markup: `text`) to use for all
82+# documents.
83+#default_role = None
84+
85+# If true, '()' will be appended to :func: etc. cross-reference text.
86+#add_function_parentheses = True
87+
88+# If true, the current module name will be prepended to all description
89+# unit titles (such as .. function::).
90+#add_module_names = True
91+
92+# If true, sectionauthor and moduleauthor directives will be shown in the
93+# output. They are ignored by default.
94+#show_authors = False
95+
96+# The name of the Pygments (syntax highlighting) style to use.
97+pygments_style = 'sphinx'
98+
99+# A list of ignored prefixes for module index sorting.
100+#modindex_common_prefix = []
101+
102+# If true, keep warnings as "system message" paragraphs in the built documents.
103+#keep_warnings = False
104+
105+# If true, `todo` and `todoList` produce output, else they produce nothing.
106+todo_include_todos = False
107+
108+
109+# -- Options for HTML output ----------------------------------------------
110+
111+# The theme to use for HTML and HTML Help pages. See the documentation for
112+# a list of builtin themes.
113+sys.path.append(os.path.abspath('_themes'))
114+html_theme_path = ['_themes']
115+html_theme = 'searx_theme'
116+
117+# Theme options are theme-specific and customize the look and feel of a theme
118+# further. For a list of options available for each theme, see the
119+# documentation.
120+#html_theme_options = {}
121+
122+# Add any paths that contain custom themes here, relative to this directory.
123+#html_theme_path = []
124+
125+# The name for this set of Sphinx documents. If None, it defaults to
126+# "<project> v<release> documentation".
127+#html_title = None
128+
129+# A shorter title for the navigation bar. Default is the same as html_title.
130+#html_short_title = None
131+
132+# The name of an image file (relative to this directory) to place at the top
133+# of the sidebar.
134+#html_logo = None
135+
136+# The name of an image file (within the static path) to use as favicon of the
137+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
138+# pixels large.
139+#html_favicon = None
140+
141+# Add any paths that contain custom static files (such as style sheets) here,
142+# relative to this directory. They are copied after the builtin static files,
143+# so a file named "default.css" will overwrite the builtin "default.css".
144+html_static_path = ['static']
145+
146+# Add any extra paths that contain custom files (such as robots.txt or
147+# .htaccess) here, relative to this directory. These files are copied
148+# directly to the root of the documentation.
149+#html_extra_path = []
150+
151+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
152+# using the given strftime format.
153+#html_last_updated_fmt = '%b %d, %Y'
154+
155+# If true, SmartyPants will be used to convert quotes and dashes to
156+# typographically correct entities.
157+#html_use_smartypants = True
158+
159+# Custom sidebar templates, maps document names to template names.
160+#html_sidebars = {}
161+
162+# Additional templates that should be rendered to pages, maps page names to
163+# template names.
164+#html_additional_pages = {}
165+
166+# If false, no module index is generated.
167+#html_domain_indices = True
168+
169+# If false, no index is generated.
170+#html_use_index = True
171+
172+# If true, the index is split into individual pages for each letter.
173+#html_split_index = False
174+
175+# If true, links to the reST sources are added to the pages.
176+#html_show_sourcelink = True
177+
178+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
179+#html_show_sphinx = True
180+
181+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
182+#html_show_copyright = True
183+
184+# If true, an OpenSearch description file will be output, and all pages will
185+# contain a <link> tag referring to it. The value of this option must be the
186+# base URL from which the finished HTML is served.
187+#html_use_opensearch = ''
188+
189+# This is the file name suffix for HTML files (e.g. ".xhtml").
190+#html_file_suffix = None
191+
192+# Language to be used for generating the HTML full-text search index.
193+# Sphinx supports the following languages:
194+# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
195+# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
196+#html_search_language = 'en'
197+
198+# A dictionary with options for the search language support, empty by default.
199+# Now only 'ja' uses this config value
200+#html_search_options = {'type': 'default'}
201+
202+# The name of a javascript file (relative to the configuration directory) that
203+# implements a search results scorer. If empty, the default will be used.
204+#html_search_scorer = 'scorer.js'
205+
206+# Output file base name for HTML help builder.
207+htmlhelp_basename = 'searxdoc'
208+
209+# -- Options for LaTeX output ---------------------------------------------
210+
211+latex_elements = {
212+# The paper size ('letterpaper' or 'a4paper').
213+#'papersize': 'letterpaper',
214+
215+# The font size ('10pt', '11pt' or '12pt').
216+#'pointsize': '10pt',
217+
218+# Additional stuff for the LaTeX preamble.
219+#'preamble': '',
220+
221+# Latex figure (float) alignment
222+#'figure_align': 'htbp',
223+}
224+
225+# Grouping the document tree into LaTeX files. List of tuples
226+# (source start file, target name, title,
227+# author, documentclass [howto, manual, or own class]).
228+latex_documents = [
229+ (master_doc, 'searx.tex', u'searx Documentation',
230+ u'Adam Tauber', 'manual'),
231+]
232+
233+# The name of an image file (relative to this directory) to place at the top of
234+# the title page.
235+#latex_logo = None
236+
237+# For "manual" documents, if this is true, then toplevel headings are parts,
238+# not chapters.
239+#latex_use_parts = False
240+
241+# If true, show page references after internal links.
242+#latex_show_pagerefs = False
243+
244+# If true, show URL addresses after external links.
245+#latex_show_urls = False
246+
247+# Documents to append as an appendix to all manuals.
248+#latex_appendices = []
249+
250+# If false, no module index is generated.
251+#latex_domain_indices = True
252+
253+
254+# -- Options for manual page output ---------------------------------------
255+
256+# One entry per manual page. List of tuples
257+# (source start file, name, description, authors, manual section).
258+man_pages = [
259+ (master_doc, 'searx', u'searx Documentation',
260+ [author], 1)
261+]
262+
263+# If true, show URL addresses after external links.
264+#man_show_urls = False
265+
266+
267+# -- Options for Texinfo output -------------------------------------------
268+
269+# Grouping the document tree into Texinfo files. List of tuples
270+# (source start file, target name, title, author,
271+# dir menu entry, description, category)
272+texinfo_documents = [
273+ (master_doc, 'searx', u'searx Documentation',
274+ author, 'searx', 'One line description of project.',
275+ 'Miscellaneous'),
276+]
277+
278+# Documents to append as an appendix to all manuals.
279+#texinfo_appendices = []
280+
281+# If false, no module index is generated.
282+#texinfo_domain_indices = True
283+
284+# How to display URL addresses: 'footnote', 'no', or 'inline'.
285+#texinfo_show_urls = 'footnote'
286+
287+# If true, do not generate a @detailmenu in the "Top" node's menu.
288+#texinfo_no_detailmenu = False
289+
290+
291+# -- Options for Epub output ----------------------------------------------
292+
293+# Bibliographic Dublin Core info.
294+epub_title = project
295+epub_author = author
296+epub_publisher = author
297+epub_copyright = copyright
298+
299+# The basename for the epub file. It defaults to the project name.
300+#epub_basename = project
301+
302+# The HTML theme for the epub output. Since the default themes are not optimized
303+# for small screen space, using the same theme for HTML and epub output is
304+# usually not wise. This defaults to 'epub', a theme designed to save visual
305+# space.
306+#epub_theme = 'epub'
307+
308+# The language of the text. It defaults to the language option
309+# or 'en' if the language is not set.
310+#epub_language = ''
311+
312+# The scheme of the identifier. Typical schemes are ISBN or URL.
313+#epub_scheme = ''
314+
315+# The unique identifier of the text. This can be a ISBN number
316+# or the project homepage.
317+#epub_identifier = ''
318+
319+# A unique identification for the text.
320+#epub_uid = ''
321+
322+# A tuple containing the cover image and cover page html template filenames.
323+#epub_cover = ()
324+
325+# A sequence of (type, uri, title) tuples for the guide element of content.opf.
326+#epub_guide = ()
327+
328+# HTML files that should be inserted before the pages created by sphinx.
329+# The format is a list of tuples containing the path and title.
330+#epub_pre_files = []
331+
332+# HTML files shat should be inserted after the pages created by sphinx.
333+# The format is a list of tuples containing the path and title.
334+#epub_post_files = []
335+
336+# A list of files that should not be packed into the epub file.
337+epub_exclude_files = ['search.html']
338+
339+# The depth of the table of contents in toc.ncx.
340+#epub_tocdepth = 3
341+
342+# Allow duplicate toc entries.
343+#epub_tocdup = True
344+
345+# Choose between 'default' and 'includehidden'.
346+#epub_tocscope = 'default'
347+
348+# Fix unsupported image types using the Pillow.
349+#epub_fix_images = False
350+
351+# Scale large images.
352+#epub_max_image_width = 0
353+
354+# How to display URL addresses: 'footnote', 'no', or 'inline'.
355+#epub_show_urls = 'inline'
356+
357+# If false, no index is generated.
358+#epub_use_index = True
docs/dev/contribution_guide.rstnew file+98
@@ -0,0 +1,98 @@
1+How to contribute
2+-----------------
3+
4+Prime directives: Privacy, Hackability
5+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6+
7+Searx has two prime directives, privacy-by-design and hackability. The
8+hackability comes in three levels:
9+
10+- support of search engines
11+- plugins to alter search behaviour
12+- hacking searx itself
13+
14+Note the lack of "world domination" among the directives.
15+Searx has no intention of wide mass-adoption, rounded
16+corners, etc. The prime directive "privacy" deserves a separate
17+chapter, as it's quite uncommon unfortunately.
18+
19+Privacy-by-design
20+^^^^^^^^^^^^^^^^^
21+
22+Searx was born out of the need for a privacy-respecting search tool
23+which can be extended easily to maximize both its search and its
24+privacy protecting capabilities.
25+
26+A few widely used features work differently or turned off by default or not implemented
27+at all as a consequence of privacy-by-design.
28+
29+If a feature reduces the privacy preserving aspects of searx, it
30+should be switched off by default or should not implemented at all.
31+There are plenty of search engines already providing such features.
32+If a feature reduces the protection of searx, users must be
33+informed about the effect of choosing to enable it. Features
34+that protect privacy but differ from the expectations of the
35+user should also be explained.
36+
37+Also, if you think that something works weird with searx,
38+it's might be because of the tool you use is designed in a way to interfere with
39+the privacy respect. Submitting a bugreport to the vendor of the tool that
40+misbehaves might be a good feedback to reconsider the disrespect to
41+its customers (e.g. GET vs POST requests in various browsers).
42+
43+Remember the other prime directive of searx is to be hackable, so if the
44+above privacy concerns do not fancy you, simply fork it.
45+
46+Happy hacking.
47+
48+Code
49+~~~~
50+
51+In order to submit a patch, please follow the steps below:
52+
53+- Follow coding conventions.
54+
55+ - PEP8 standards apply, except the convention of line length
56+
57+ - Maximum line length is 120 characters
58+
59+- Check if your code breaks existing tests. If so, update the tests or fix your code.
60+
61+- If your code can be unit-tested, add unit tests.
62+
63+- Add yourself to the AUTHORS file.
64+
65+- Create a pull request.
66+
67+For more help on getting started with searx development, see :ref:`devquickstart`.
68+
69+
70+Translation
71+~~~~~~~~~~~
72+
73+Translation currently takes place on
74+`transifex <https://transifex.com/projects/p/searx>`__.
75+
76+**Please, do not update translation files in the repo.**
77+
78+Documentation
79+~~~~~~~~~~~~~
80+
81+The documentation is built using Sphinx. So in order to be able to generate the required
82+files, you have to install it on your system. (It can be installed easily using pip.)
83+
84+1. Checkout the gh-pages branch.
85+
86+2. Edit the rst file you wish to update. Or create a new rst file and place it under the appropriate folder.
87+
88+3. Build the documentation using Sphinx.
89+
90+4. Add the updated and created files of these extension:
91+
92+ - .rst
93+
94+ - .html
95+
96+ - .txt
97+
98+6. Create a pull request.
docs/dev/engine_overview.rstnew file+315
@@ -0,0 +1,315 @@
1+Engine overview
2+===============
3+
4+
5+searx is a `metasearch-engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__,
6+so it uses different search engines to provide better results.
7+
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>`__.
13+
14+
15+.. contents::
16+ :depth: 3
17+
18+general engine configuration
19+----------------------------
20+
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
23+(normally ``settings.yml``). The arguments in the settings file override
24+the ones in the engine file.
25+
26+It does not matter if an option is stored in the engine file or in the
27+settings. However, the standard way is the following:
28+
29+
30+engine file
31+~~~~~~~~~~~
32+
33++----------------------+-----------+-----------------------------------------+
34+| argument | type | information |
35++======================+===========+=========================================+
36+| categories | list | pages, in which the engine is working |
37++----------------------+-----------+-----------------------------------------+
38+| paging | boolean | support multible pages |
39++----------------------+-----------+-----------------------------------------+
40+| language\_support | boolean | support language choosing |
41++----------------------+-----------+-----------------------------------------+
42+| time\_range\_support | boolean | support search time range |
43++----------------------+-----------+-----------------------------------------+
44+| offline | boolean | engine runs offline |
45++----------------------+-----------+-----------------------------------------+
46+
47+settings.yml
48+~~~~~~~~~~~~
49+
50++------------+----------+-----------------------------------------------+
51+| argument | type | information |
52++============+==========+===============================================+
53+| name | string | name of search-engine |
54++------------+----------+-----------------------------------------------+
55+| engine | string | name of searx-engine (filename without .py) |
56++------------+----------+-----------------------------------------------+
57+| shortcut | string | shortcut of search-engine |
58++------------+----------+-----------------------------------------------+
59+| timeout | string | specific timeout for search-engine |
60++------------+----------+-----------------------------------------------+
61+
62+overrides
63+~~~~~~~~~
64+
65+A few of the options have default values in the engine, but are
66+often overwritten by the settings. If ``None`` is assigned to an option
67+in the engine file, it has to be redefined in the settings,
68+otherwise searx will not start with that engine.
69+
70+The naming of overrides is arbitrary. But the recommended
71+overrides are the following:
72+
73++-----------------------+----------+----------------------------------------------------------------+
74+| argument | type | information |
75++=======================+==========+================================================================+
76+| base\_url | string | base-url, can be overwritten to use same engine on other URL |
77++-----------------------+----------+----------------------------------------------------------------+
78+| number\_of\_results | int | maximum number of results per request |
79++-----------------------+----------+----------------------------------------------------------------+
80+| language | string | ISO code of language and country like en\_US |
81++-----------------------+----------+----------------------------------------------------------------+
82+| api\_key | string | api-key if required by engine |
83++-----------------------+----------+----------------------------------------------------------------+
84+
85+example code
86+~~~~~~~~~~~~
87+
88+.. code:: python
89+
90+ # engine dependent config
91+ categories = ['general']
92+ paging = True
93+ language_support = True
94+
95+making a request
96+----------------
97+
98+To perform a search an URL have to be specified. In addition to
99+specifying an URL, arguments can be passed to the query.
100+
101+passed arguments
102+~~~~~~~~~~~~~~~~
103+
104+These arguments can be used to construct the search query. Furthermore,
105+parameters with default value can be redefined for special purposes.
106+
107++----------------------+------------+------------------------------------------------------------------------+
108+| argument | type | default-value, information |
109++======================+============+========================================================================+
110+| url | string | ``''`` |
111++----------------------+------------+------------------------------------------------------------------------+
112+| method | string | ``'GET'`` |
113++----------------------+------------+------------------------------------------------------------------------+
114+| headers | set | ``{}`` |
115++----------------------+------------+------------------------------------------------------------------------+
116+| data | set | ``{}`` |
117++----------------------+------------+------------------------------------------------------------------------+
118+| cookies | set | ``{}`` |
119++----------------------+------------+------------------------------------------------------------------------+
120+| verify | boolean | ``True`` |
121++----------------------+------------+------------------------------------------------------------------------+
122+| headers.User-Agent | string | a random User-Agent |
123++----------------------+------------+------------------------------------------------------------------------+
124+| category | string | current category, like ``'general'`` |
125++----------------------+------------+------------------------------------------------------------------------+
126+| started | datetime | current date-time |
127++----------------------+------------+------------------------------------------------------------------------+
128+| pageno | int | current pagenumber |
129++----------------------+------------+------------------------------------------------------------------------+
130+| language | string | specific language code like ``'en_US'``, or ``'all'`` if unspecified |
131++----------------------+------------+------------------------------------------------------------------------+
132+
133+parsed arguments
134+~~~~~~~~~~~~~~~~
135+
136+The function ``def request(query, params):`` always returns the
137+``params`` variable. Inside searx, the following paramters can be
138+used to specify a search request:
139+
140++------------+-----------+---------------------------------------------------------+
141+| argument | type | information |
142++============+===========+=========================================================+
143+| url | string | requested url |
144++------------+-----------+---------------------------------------------------------+
145+| method | string | HTTP request method |
146++------------+-----------+---------------------------------------------------------+
147+| headers | set | HTTP header information |
148++------------+-----------+---------------------------------------------------------+
149+| data | set | HTTP data information (parsed if ``method != 'GET'``) |
150++------------+-----------+---------------------------------------------------------+
151+| cookies | set | HTTP cookies |
152++------------+-----------+---------------------------------------------------------+
153+| verify | boolean | Performing SSL-Validity check |
154++------------+-----------+---------------------------------------------------------+
155+
156+example code
157+~~~~~~~~~~~~
158+
159+.. code:: python
160+
161+ # search-url
162+ base_url = 'https://example.com/'
163+ search_string = 'search?{query}&page={page}'
164+
165+ # do search-request
166+ def request(query, params):
167+ search_path = search_string.format(
168+ query=urlencode({'q': query}),
169+ page=params['pageno'])
170+
171+ params['url'] = base_url + search_path
172+
173+ return params
174+
175+returned results
176+----------------
177+
178+Searx is able to return results of different media-types.
179+Currently the following media-types are supported:
180+
181+- default
182+- images
183+- videos
184+- torrent
185+- map
186+
187+To set another media-type as default, the parameter
188+``template`` must be set to the desired type.
189+
190+default
191+~~~~~~~
192+
193++--------------------+---------------------------------------------------------------------------------------------------------------+
194+| result-parameter | information |
195++====================+===============================================================================================================+
196+| url | string, url of the result |
197++--------------------+---------------------------------------------------------------------------------------------------------------+
198+| title | string, title of the result |
199++--------------------+---------------------------------------------------------------------------------------------------------------+
200+| content | string, general result-text |
201++--------------------+---------------------------------------------------------------------------------------------------------------+
202+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish |
203++--------------------+---------------------------------------------------------------------------------------------------------------+
204+
205+images
206+~~~~~~
207+
208+to use this template, the parameter
209+
210++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
211+| result-parameter | information |
212++====================+=======================================================================================================================================+
213+| template | is set to ``images.html`` |
214++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
215+| url | string, url to the result site |
216++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
217+| title | string, title of the result *(partly implemented)* |
218++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
219+| content | *(partly implemented)* |
220++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
221+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish *(partly implemented)* |
222++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
223+| img\_src | string, url to the result image |
224++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
225+| thumbnail\_src | string, url to a small-preview image |
226++--------------------+---------------------------------------------------------------------------------------------------------------------------------------+
227+
228+videos
229+~~~~~~
230+
231++--------------------+--------------------------------------------------------------------------------------------------------------+
232+| result-parameter | information |
233++====================+==============================================================================================================+
234+| template | is set to ``videos.html`` |
235++--------------------+--------------------------------------------------------------------------------------------------------------+
236+| url | string, url of the result |
237++--------------------+--------------------------------------------------------------------------------------------------------------+
238+| title | string, title of the result |
239++--------------------+--------------------------------------------------------------------------------------------------------------+
240+| content | *(not implemented yet)* |
241++--------------------+--------------------------------------------------------------------------------------------------------------+
242+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish |
243++--------------------+--------------------------------------------------------------------------------------------------------------+
244+| thumbnail | string, url to a small-preview image |
245++--------------------+--------------------------------------------------------------------------------------------------------------+
246+
247+torrent
248+~~~~~~~
249+
250++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
251+| result-parameter | information |
252++==================+=======================================================================================================================================+
253+| template | is set to ``torrent.html`` |
254++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
255+| url | string, url of the result |
256++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
257+| title | string, title of the result |
258++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
259+| content | string, general result-text |
260++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
261+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish *(not implemented yet)* |
262++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
263+| seed | int, number of seeder |
264++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
265+| leech | int, number of leecher |
266++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
267+| filesize | int, size of file in bytes |
268++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
269+| files | int, number of files |
270++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
271+| magnetlink | string, `magnetlink <https://en.wikipedia.org/wiki/Magnet_URI_scheme>`__ of the result |
272++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
273+| torrentfile | string, torrentfile of the result |
274++------------------+---------------------------------------------------------------------------------------------------------------------------------------+
275+
276+
277+map
278+~~~
279+
280++-------------------------+--------------------------------------------------------------------------------------------------------------+
281+| result-parameter | information |
282++=========================+==============================================================================================================+
283+| url | string, url of the result |
284++-------------------------+--------------------------------------------------------------------------------------------------------------+
285+| title | string, title of the result |
286++-------------------------+--------------------------------------------------------------------------------------------------------------+
287+| content | string, general result-text |
288++-------------------------+--------------------------------------------------------------------------------------------------------------+
289+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, time of publish |
290++-------------------------+--------------------------------------------------------------------------------------------------------------+
291+| latitude | latitude of result (in decimal format) |
292++-------------------------+--------------------------------------------------------------------------------------------------------------+
293+| longitude | longitude of result (in decimal format) |
294++-------------------------+--------------------------------------------------------------------------------------------------------------+
295+| boundingbox | boundingbox of result (array of 4. values ``[lat-min, lat-max, lon-min, lon-max]``) |
296++-------------------------+--------------------------------------------------------------------------------------------------------------+
297+| geojson | geojson of result (http://geojson.org) |
298++-------------------------+--------------------------------------------------------------------------------------------------------------+
299+| osm.type | type of osm-object (if OSM-Result) |
300++-------------------------+--------------------------------------------------------------------------------------------------------------+
301+| osm.id | id of osm-object (if OSM-Result) |
302++-------------------------+--------------------------------------------------------------------------------------------------------------+
303+| address.name | name of object |
304++-------------------------+--------------------------------------------------------------------------------------------------------------+
305+| address.road | street name of object |
306++-------------------------+--------------------------------------------------------------------------------------------------------------+
307+| address.house\_number | house number of object |
308++-------------------------+--------------------------------------------------------------------------------------------------------------+
309+| address.locality | city, place of object |
310++-------------------------+--------------------------------------------------------------------------------------------------------------+
311+| address.postcode | postcode of object |
312++-------------------------+--------------------------------------------------------------------------------------------------------------+
313+| address.country | country of object |
314++-------------------------+--------------------------------------------------------------------------------------------------------------+
315+
docs/dev/install/installation.rstnew file+329
@@ -0,0 +1,329 @@
1+.. _installation:
2+
3+Installation
4+============
5+
6+.. contents::
7+ :depth: 3
8+
9+Basic installation
10+------------------
11+
12+Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure to have enable universe repository.
13+
14+Install packages:
15+
16+.. code:: sh
17+
18+ sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-babel zlib1g-dev libffi-dev libssl-dev
19+
20+Install searx:
21+
22+.. code:: sh
23+
24+ cd /usr/local
25+ sudo git clone https://github.com/asciimoo/searx.git
26+ sudo useradd searx -d /usr/local/searx
27+ sudo chown searx:searx -R /usr/local/searx
28+
29+Install dependencies in a virtualenv:
30+
31+.. code:: sh
32+
33+ sudo -u searx -i
34+ cd /usr/local/searx
35+ virtualenv searx-ve
36+ . ./searx-ve/bin/activate
37+ ./manage.sh update_packages
38+
39+Configuration
40+-------------
41+
42+.. code:: sh
43+
44+ sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
45+
46+Edit searx/settings.yml if necessary.
47+
48+Check
49+-----
50+
51+Start searx:
52+
53+.. code:: sh
54+
55+ python searx/webapp.py
56+
57+Go to http://localhost:8888
58+
59+If everything works fine, disable the debug option in settings.yml:
60+
61+.. code:: sh
62+
63+ sed -i -e "s/debug : True/debug : False/g" searx/settings.yml
64+
65+At this point searx is not demonized ; uwsgi allows this.
66+
67+You can exit the virtualenv and the searx user bash (enter exit command
68+twice).
69+
70+uwsgi
71+-----
72+
73+Install packages:
74+
75+.. code:: sh
76+
77+ sudo apt-get install uwsgi uwsgi-plugin-python
78+
79+Create the configuration file /etc/uwsgi/apps-available/searx.ini with
80+this content:
81+
82+::
83+
84+ [uwsgi]
85+ # Who will run the code
86+ uid = searx
87+ gid = searx
88+
89+ # disable logging for privacy
90+ disable-logging = true
91+
92+ # Number of workers (usually CPU count)
93+ workers = 4
94+
95+ # The right granted on the created socket
96+ chmod-socket = 666
97+
98+ # Plugin to use and interpretor config
99+ single-interpreter = true
100+ master = true
101+ plugin = python
102+ lazy-apps = true
103+ enable-threads = true
104+
105+ # Module to import
106+ module = searx.webapp
107+
108+ # Virtualenv and python path
109+ virtualenv = /usr/local/searx/searx-ve/
110+ pythonpath = /usr/local/searx/
111+ chdir = /usr/local/searx/searx/
112+
113+Activate the uwsgi application and restart:
114+
115+.. code:: sh
116+
117+ cd /etc/uwsgi/apps-enabled
118+ ln -s ../apps-available/searx.ini
119+ /etc/init.d/uwsgi restart
120+
121+Web server
122+----------
123+
124+with nginx
125+^^^^^^^^^^
126+
127+If nginx is not installed (uwsgi will not work with the package
128+nginx-light):
129+
130+.. code:: sh
131+
132+ sudo apt-get install nginx
133+
134+Hosted at /
135+"""""""""""
136+
137+Create the configuration file /etc/nginx/sites-available/searx with this
138+content:
139+
140+.. code:: nginx
141+
142+ server {
143+ listen 80;
144+ server_name searx.example.com;
145+ root /usr/local/searx;
146+
147+ location / {
148+ include uwsgi_params;
149+ uwsgi_pass unix:/run/uwsgi/app/searx/socket;
150+ }
151+ }
152+
153+Create a symlink to sites-enabled:
154+
155+.. code:: sh
156+
157+ sudo ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
158+
159+Restart service:
160+
161+.. code:: sh
162+
163+ sudo service nginx restart
164+ sudo service uwsgi restart
165+
166+from subdirectory URL (/searx)
167+""""""""""""""""""""""""""""""
168+
169+Add this configuration in the server config file
170+/etc/nginx/sites-enabled/default:
171+
172+.. code:: nginx
173+
174+ location = /searx { rewrite ^ /searx/; }
175+ location /searx {
176+ try_files $uri @searx;
177+ }
178+ location @searx {
179+ uwsgi_param SCRIPT_NAME /searx;
180+ include uwsgi_params;
181+ uwsgi_modifier1 30;
182+ uwsgi_pass unix:/run/uwsgi/app/searx/socket;
183+ }
184+
185+
186+OR
187+
188+using reverse proxy
189+(Please, note that reverse proxy advised to be used in case of single-user or low-traffic instances.)
190+
191+.. code:: nginx
192+
193+ location /searx {
194+ proxy_pass http://127.0.0.1:8888;
195+ proxy_set_header Host $host;
196+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
197+ proxy_set_header X-Scheme $scheme;
198+ proxy_set_header X-Script-Name /searx;
199+ proxy_buffering off;
200+ }
201+
202+
203+Enable base\_url in searx/settings.yml
204+
205+::
206+
207+ base_url : http://your.domain.tld/searx/
208+
209+Restart service:
210+
211+.. code:: sh
212+
213+ sudo service nginx restart
214+ sudo service uwsgi restart
215+
216+disable logs
217+~~~~~~~~~~~~
218+
219+for better privacy you can disable nginx logs about searx.
220+
221+how to proceed: below ``uwsgi_pass`` in
222+/etc/nginx/sites-available/default add
223+
224+::
225+
226+ access_log /dev/null;
227+ error_log /dev/null;
228+
229+Restart service:
230+
231+.. code:: sh
232+
233+ sudo service nginx restart
234+
235+with apache
236+^^^^^^^^^^^
237+
238+Add wsgi mod:
239+
240+.. code:: sh
241+
242+ sudo apt-get install libapache2-mod-uwsgi
243+ sudo a2enmod uwsgi
244+
245+Add this configuration in the file /etc/apache2/apache2.conf:
246+
247+.. code:: apache
248+
249+ <Location />
250+ Options FollowSymLinks Indexes
251+ SetHandler uwsgi-handler
252+ uWSGISocket /run/uwsgi/app/searx/socket
253+ </Location>
254+
255+Note that if your instance of searx is not at the root, you should
256+change ``<Location />`` by the location of your instance, like
257+``<Location /searx>``.
258+
259+Restart Apache:
260+
261+.. code:: sh
262+
263+ sudo /etc/init.d/apache2 restart
264+
265+disable logs
266+""""""""""""
267+
268+For better privacy you can disable Apache logs.
269+
270+WARNING: not tested
271+
272+WARNING: you can only disable logs for the whole (virtual) server not
273+for a specific path.
274+
275+Go back to /etc/apache2/apache2.conf and above ``<Location />`` add:
276+
277+.. code:: apache
278+
279+ CustomLog /dev/null combined
280+
281+Restart Apache:
282+
283+.. code:: sh
284+
285+ sudo /etc/init.d/apache2 restart
286+
287+How to update
288+-------------
289+
290+.. code:: sh
291+
292+ cd /usr/local/searx
293+ sudo -u searx -i
294+ . ./searx-ve/bin/activate
295+ git stash
296+ git pull origin master
297+ git stash apply
298+ ./manage.sh update_packages
299+ sudo service uwsgi restart
300+
301+Docker
302+------
303+
304+Make sure you have installed Docker. For instance, you can deploy searx like this:
305+
306+.. code:: sh
307+
308+ docker pull wonderfall/searx
309+ docker run -d --name searx -p $PORT:8888 wonderfall/searx
310+
311+Go to http://localhost:$PORT.
312+
313+See https://hub.docker.com/r/wonderfall/searx/ for more informations.
314+
315+It's also possible to build searx from the embedded Dockerfile.
316+
317+.. code:: sh
318+
319+ git clone https://github.com/asciimoo/searx.git
320+ cd searx
321+ docker build -t whatever/searx .
322+
323+References
324+==========
325+
326+ * https://about.okhin.fr/posts/Searx/ with some additions
327+
328+ * How to: `Setup searx in a couple of hours with a free SSL certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
329+
docs/dev/plugins.rstnew file+45
@@ -0,0 +1,45 @@
1+Plugins
2+-------
3+
4+Plugins can extend or replace functionality of various components of
5+searx.
6+
7+Example plugin
8+~~~~~~~~~~~~~~
9+
10+.. code:: python
11+
12+ name = 'Example plugin'
13+ description = 'This plugin extends the suggestions with the word "example"'
14+ default_on = False # disabled by default
15+
16+ js_dependencies = tuple() # optional, list of static js files
17+ css_dependencies = tuple() # optional, list of static css files
18+
19+
20+ # attach callback to the post search hook
21+ # request: flask request object
22+ # ctx: the whole local context of the post search hook
23+ def post_search(request, ctx):
24+ ctx['search'].suggestions.add('example')
25+ return True
26+
27+Plugin entry points
28+~~~~~~~~~~~~~~~~~~~
29+
30+Entry points (hooks) define when a plugin runs. Right now only three hooks are implemented. So feel free to implement a hook if it fits the behaviour of your plugin.
31+
32+Pre search hook
33+```````````````
34+
35+Runs BEFORE the search request. Function to implement: ``pre_search``
36+
37+Post search hook
38+````````````````
39+
40+Runs AFTER the search request. Function to implement: ``post_search``
41+
42+Result hook
43+```````````
44+
45+Runs when a new result is added to the result list. Function to implement: ``on_result``
docs/dev/quickstart.rstnew file+108
@@ -0,0 +1,108 @@
1+.. _devquickstart:
2+
3+Development Quickstart
4+----------------------
5+
6+This quickstart guide gets your environment set up with searx. Furthermore, it gives a
7+short introduction to the new manage.sh script.
8+
9+How to setup your development environment
10+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11+
12+First, clone the source code of searx to the desired folder. In this case the source
13+is cloned to ~/myprojects/searx. Then create and activate the searx-ve
14+virtualenv and install the required packages using manage.sh.
15+
16+.. code:: sh
17+
18+ cd ~/myprojects
19+ git clone https://github.com/asciimoo/searx.git
20+ cd searx
21+ virtualenv searx-ve
22+ . ./searx-ve/bin/activate
23+ ./manage.sh update_dev_packages
24+
25+
26+How to run tests
27+~~~~~~~~~~~~~~~~
28+
29+Tests can be run using the manage.sh script.
30+
31+Following tests and checks are available:
32+
33+- Unit tests
34+
35+- Selenium tests
36+
37+- PEP8 validation
38+
39+- Unit test coverage check
40+
41+For example unit tests are run with the command below:
42+
43+.. code:: sh
44+
45+ ./manage.sh unit_tests
46+
47+For further test options, please consult the help of the manage.sh script.
48+
49+
50+How to compile styles and javascript
51+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52+
53+How to build styles
54+^^^^^^^^^^^^^^^^^^^
55+
56+Less is required to build the styles of searx. Less can be installed using either NodeJS or Apt.
57+
58+.. code:: sh
59+
60+ sudo apt-get install nodejs
61+ sudo npm install -g less
62+
63+
64+OR
65+
66+.. code:: sh
67+
68+ sudo apt-get install node-less
69+
70+After satisfying the requirements styles can be build using manage.sh
71+
72+.. code:: sh
73+
74+ ./manage.sh styles
75+
76+
77+How to build the source of the oscar theme
78+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79+
80+Grunt must be installed in order to build the javascript sources. It depends on NodeJS, so first
81+Node has to be installed.
82+
83+.. code:: sh
84+
85+ sudo apt-get install nodejs
86+ sudo npm install -g grunt-cli
87+
88+After installing grunt, the files can be built using the following command:
89+
90+.. code:: sh
91+
92+ ./manage.sh grunt_build
93+
94+
95+
96+Tips for debugging/development
97+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98+
99+1. Turn on debug logging
100+ Whether you are working on a new engine or trying to eliminate a bug, it is always a good idea
101+ to turn on debug logging. When debug logging is enabled a stack trace appears,
102+ instead of the cryptic ``Internal Server Error`` message. It can be turned on by setting
103+ ``debug: False`` to ``debug: True`` in settings.yml.
104+
105+2. Run ``./manage.sh tests`` before creating a PR.
106+ Failing build on Travis is common because of PEP8 checks. So a new commit must be created
107+ containing these format fixes. This phase can be skipped if ``./manage.sh tests`` is run
108+ locally before creating a PR.
docs/dev/search_api.rstnew file+204
@@ -0,0 +1,204 @@
1+Search API
2+==========
3+
4+The search supports both ``GET`` and ``POST``.
5+
6+Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
7+
8+
9+``GET /``
10+
11+``GET /search``
12+
13+Parameters
14+~~~~~~~~~~
15+
16+.. code:: sh
17+
18+ q
19+
20+The search query. This string is passed to external search services.
21+Thus, searx supports syntax of each search service. For example, ``site:github.com searx`` is a valid
22+query for Google. However, if simply the query above is passed to any search engine which does not filter its
23+results based on this syntax, you might not get the results you wanted.
24+
25+
26+See more at :doc:`/user/search_syntax`
27+
28+Required.
29+
30+.. code:: sh
31+
32+ categories
33+
34+Comma separated list, specifies the active search categories
35+
36+Optional.
37+
38+.. code:: sh
39+
40+ engines
41+
42+Comma separated list, specifies the active search engines.
43+
44+Optional.
45+
46+.. code:: sh
47+
48+ lang
49+
50+Code of the language.
51+
52+Optional.
53+
54+Default: ``all``
55+
56+.. code:: sh
57+
58+ pageno
59+
60+Search page number.
61+
62+Optional.
63+
64+Default: ``1``
65+
66+.. code:: sh
67+
68+ time_range
69+
70+Time range of search for engines which support it. See if an engine supports time range search in the preferences page of an instance.
71+
72+Optional.
73+
74+Possible: ``day``, ``month``, ``year``
75+
76+.. code:: sh
77+
78+ format
79+
80+Output format of results.
81+
82+Optional.
83+
84+Possible: ``json``, ``csv``, ``rss``
85+
86+.. code:: sh
87+
88+ results_on_new_tab
89+
90+Open search results on new tab.
91+
92+Optional.
93+
94+Default: ``0``
95+
96+Possible: ``0``, ``1``
97+
98+.. code:: sh
99+
100+ image_proxy
101+
102+Proxy image results through searx.
103+
104+Optional.
105+
106+Default: ``False``
107+
108+Possible: ``True``, ``False``
109+
110+.. code:: sh
111+
112+ autocomplete
113+
114+Service which completes words as you type.
115+
116+Optional.
117+
118+Default: empty
119+
120+Possible: ``google``, ``dbpedia``, ``duckduckgo``, ``startpage``, ``wikipedia``
121+
122+.. code:: sh
123+
124+ safesearch
125+
126+Filter search results of engines which support safe search. See if an engine supports safe search in the preferences page of an instance.
127+
128+Optional.
129+
130+Default: ``None``
131+
132+Possible: ``0``, ``1``, ``None``
133+
134+.. code:: sh
135+
136+ theme
137+
138+Theme of instance.
139+
140+Optional.
141+
142+Default: ``oscar``
143+
144+Possible: ``oscar``, ``simple``, ``legacy``, ``pix-art``, ``courgette``
145+
146+Please note, available themes depend on an instance. It is possible that an instance administrator deleted, created or renamed themes on his/her instance. See the available options in the preferences page of the instance.
147+
148+.. code:: sh
149+
150+ oscar-style
151+
152+Style of Oscar theme. It is only parsed if the theme of an instance is ``oscar``.
153+
154+Optional.
155+
156+Default: ``logicodev``
157+
158+Possible: ``pointhi``, ``logicodev``
159+
160+Please note, available styles depend on an instance. It is possible that an instance administrator deleted, created or renamed styles on his/her instance. See the available options in the preferences page of the instance.
161+
162+.. code:: sh
163+
164+ enabled_plugins
165+
166+List of enabled plugins.
167+
168+Optional.
169+
170+Default: ``HTTPS_rewrite``, ``Self_Informations``, ``Search_on_category_select``, ``Tracker_URL_remover``
171+
172+Possible: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, ``Search_on_category_select``
173+
174+.. code:: sh
175+
176+ disabled_plugins
177+
178+List of disabled plugins.
179+
180+Optional.
181+
182+Default: ``DOAI_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``
183+
184+Possible: ``DOAI_rewrite``, ``HTTPS_rewrite``, ``Infinite_scroll``, ``Vim-like_hotkeys``, ``Self_Informations``, ``Tracker_URL_remover``, ``Search_on_category_select``
185+
186+.. code:: sh
187+
188+ enabled_engines
189+
190+List of enabled engines.
191+
192+Optional.
193+
194+Possible: all engines
195+
196+.. code:: sh
197+
198+ disabled_engines
199+
200+List of disabled engines.
201+
202+Optional.
203+
204+Possible: all engines
docs/dev/translation.rstnew file+61
@@ -0,0 +1,61 @@
1+Translation
2+===========
3+
4+Requirements
5+------------
6+
7+ * Transifex account
8+
9+ * Installed CLI tool of Transifex
10+
11+Init Transifex project
12+----------------------
13+
14+After installing ``transifex`` using pip, run the following command to initialize the project.
15+
16+.. code:: shell
17+
18+ tx init # Transifex instance: https://www.transifex.com/asciimoo/searx/
19+
20+
21+After ``$HOME/.transifexrc`` is created, get a Transifex API key and insert it into the configuration file.
22+
23+Create a configuration file for ``tx`` named ``$HOME/.tx/config``.
24+
25+.. code:: shell
26+
27+ [main]
28+ host = https://www.transifex.com
29+ [searx.messagespo]
30+ file_filter = searx/translations/<lang>/LC_MESSAGES/messages.po
31+ source_file = messages.pot
32+ source_lang = en
33+ type = PO
34+
35+
36+Then run ``tx set``:
37+
38+.. code:: shell
39+
40+ tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
41+ --source-lang en --type PO --source-file messages.pot --execute
42+
43+
44+Update translations
45+-------------------
46+
47+To retrieve the latest translations, pull it from Transifex.
48+
49+.. code:: shell
50+
51+ tx pull -a
52+
53+Then check the new languages. If strings translated are not enough, delete those folders, because
54+those should not be compiled. Call the command below to compile the ``.po`` files.
55+
56+.. code:: shell
57+
58+ pybabel compile -d searx/translations
59+
60+
61+After the compilation is finished commit the ``.po`` and ``.mo`` files and create a PR.
docs/index.rstnew file+56
@@ -0,0 +1,56 @@
1+Welcome to searx
2+================
3+
4+Search without being tracked.
5+
6+Searx is a free internet metasearch engine which aggregates results from more than 70 search services. Users are neither tracked nor profiled. Additionally, searx can be used over Tor for online anonymity.
7+
8+Get started with searx by using one of the `public instances`_. If you don't trust anyone, you can set up your own, see :ref:`installation`.
9+
10+.. _public instances: https://github.com/asciimoo/searx/wiki/Searx-instances
11+
12+Features
13+--------
14+
15+ - Self hosted
16+ - No user tracking
17+ - No user profiling
18+ - About 70 supported search engines
19+ - Easy integration with any search engine
20+ - Cookies are not used by default
21+ - Secure, encrypted connections (HTTPS/SSL)
22+ - Hosted by organisations, such as La Quadrature du Net, which promote digital rights
23+
24+
25+User documentation
26+------------------
27+
28+.. toctree::
29+ :maxdepth: 1
30+
31+ user/search_syntax
32+ user/own-instance
33+
34+Administrator documentation
35+---------------------------
36+
37+.. toctree::
38+ :maxdepth: 1
39+
40+ dev/install/installation
41+ admin/api
42+ admin/filtron
43+ admin/morty
44+
45+Developer documentation
46+-----------------------
47+
48+.. toctree::
49+ :maxdepth: 1
50+
51+ dev/quickstart
52+ dev/contribution_guide
53+ dev/engine_overview
54+ dev/search_api
55+ dev/plugins
56+ dev/translation
docs/static/img/searx_logo_small.pngnew file

Binary file not shown.

docs/user/own-instance.rstnew file+43
@@ -0,0 +1,43 @@
1+Why use a private instance?
2+===========================
3+
4+"Is it worth to run my own instance?" is a common question among searx users. Before answering this question, see what options a searx user has.
5+
6+Public instances are open to everyone who has access to its URL. Usually, these are operated by unknown parties (from the users' point of view). Private instances can be used by a select group of people. It is for example a searx of group of friends or a company which can be accessed through VPN. Also it can be single user one which runs on the user's laptop.
7+
8+To gain more insight on how these instances work let's dive into how searx protects its users.
9+
10+How does searx protect privacy?
11+-------------------------------
12+
13+Searx protects the privacy of its users in multiple ways regardless of the type of the instance (private, public). Removal of private data from search requests comes in three forms:
14+
15+ 1. removal of private data from requests going to search services
16+ 2. not forwarding anything from a third party services through search services (e.g. advertisement)
17+ 3. removal of private data from requests going to the result pages
18+
19+Removing private data means not sending cookies to external search engines and generating a random browser profile for every request. Thus, it does not matter if a public or private instance handles the request, because it is anonymized in both cases. IP addresses will be the IP of the instance. But searx can be configured to use proxy or Tor. `Result proxy <https://github.com/asciimoo/morty>`__ is supported, too.
20+
21+Searx does not serve ads or tracking content unlike most search services. So private data is not forwarded to third parties who might monetize it. Besides protecting users from search services, both referring page and search query are hidden from visited result pages.
22+
23+What are the consequences of using public instances?
24+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25+
26+If someone uses a public instance, he/she has to trust the administrator of that instance.
27+This means that the user of the public instance does not know whether his/her requests are logged, aggregated and sent or sold to a third party.
28+
29+Also, public instances without proper protection are more vulnerable to abusing the search service, In this case the external service in exchange returns CAPTCHAs or bans the IP of the instance. Thus, search requests return less results.
30+
31+I see. What about private instances?
32+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33+
34+If users run their own instances, everything is in their control: the source code, logging settings and private data. Unknown instance administrators do not have to be trusted.
35+
36+Furthermore, as the default settings of their instance is editable, there is no need to use cookies to tailor searx to their needs. So preferences will not be reset to defaults when clearing browser cookies. As settings are stored on their computer, it will not be accessible to others as long as their computer is not compromised.
37+
38+Conclusion
39+----------
40+
41+Always use an instance which is operated by people you trust. The privacy features of searx are available to users no matter what kind of instance they use.
42+
43+If someone is on the go or just wants to try searx for the first time public instances are the best choices. Additionally, public instance are making a world a better place, because those who cannot or do not want to run an instance, have access to a privacy respecting search service.
docs/user/search_syntax.rstnew file+33
@@ -0,0 +1,33 @@
1+Search syntax
2+=============
3+
4+Searx allows you to modify the default categories, engines and search
5+language via the search query.
6+
7+Category/engine prefix: ``!``
8+
9+Language prefix: ``:``
10+
11+Prefix to add engines and categories to the currently selected
12+categories: ``?``
13+
14+Abbrevations of the engines and languages are also accepted.
15+Engine/category modifiers are chainable and inclusive (e.g. with
16+`!it !ddg !wp qwer <https://searx.me/?q=%21it%20%21ddg%20%21wp%20qwer>`_
17+search in IT category **and** duckduckgo **and** wikipedia for ``qwer``).
18+
19+See the `/preferences page <https://searx.me/preferences>`_ for the
20+list of engines, categories and languages.
21+
22+Examples
23+~~~~~~~~
24+
25+Search in wikipedia for ``qwer``:
26+`!wp qwer <https://searx.me/?q=%21wp%20qwer>`__ or
27+`!wikipedia qwer <https://searx.me/?q=%21wikipedia%20qwer>`_
28+
29+Image search:
30+`!images Cthulhu <https://searx.me/?q=%21images%20Cthulhu>`_
31+
32+Custom language in wikipedia:
33+`:hu !wp hackerspace <https://searx.me/?q=%3Ahu%20%21wp%20hackerspace>`_