Browse Source

[enh] initial structure

Adam Tauber 9 years ago
commit
4179490db8

+ 0
- 0
.nojekyll View File


+ 20
- 0
docs/_themes/searx_theme/layout.html View File

@@ -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 %}

+ 15
- 0
docs/_themes/searx_theme/relations.html View File

@@ -0,0 +1,15 @@
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="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
7
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
8
+</ul>
9
+<hr />
10
+<ul>
11
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
12
+    <li><a href="https://flattr.com/submit/auto?user_id=asciimoo&url=https://github.com/asciimoo/searx&title=searx&language=&tags=github&category=software">Flattr</a></li>
13
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
14
+</ul>
15
+</div>

+ 441
- 0
docs/_themes/searx_theme/static/style.css_t View File

@@ -0,0 +1,441 @@
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
+}
42
+
43
+hr {
44
+    border: 1px solid #B1B4B6;
45
+}
46
+
47
+div.body {
48
+    background-color: #ffffff;
49
+    color: #3E4349;
50
+    padding: 0 30px 0 30px;
51
+}
52
+
53
+img.floatingflask {
54
+    padding: 0 0 10px 10px;
55
+    float: right;
56
+}
57
+
58
+div.footer {
59
+    width: {{ page_width }};
60
+    margin: 20px auto 30px auto;
61
+    font-size: 14px;
62
+    color: #888;
63
+    text-align: right;
64
+}
65
+
66
+div.footer a {
67
+    color: #888;
68
+}
69
+
70
+div.sphinxsidebar a {
71
+    color: #444;
72
+    text-decoration: none;
73
+    border-bottom: 1px dotted #999;
74
+}
75
+
76
+div.sphinxsidebar a:hover {
77
+    border-bottom: 1px solid #999;
78
+}
79
+
80
+div.sphinxsidebarwrapper {
81
+    padding: 0 10px;
82
+}
83
+
84
+div.sphinxsidebarwrapper p.logo {
85
+    padding: 0;
86
+    margin: -10px 0 0 -20px;
87
+    text-align: center;
88
+}
89
+
90
+div.sphinxsidebar h3,
91
+div.sphinxsidebar h4 {
92
+    font-family: 'Garamond', 'Georgia', serif;
93
+    color: #444;
94
+    font-size: 24px;
95
+    font-weight: normal;
96
+    margin: 0 0 5px 0;
97
+    padding: 0;
98
+}
99
+
100
+div.sphinxsidebar h4 {
101
+    font-size: 20px;
102
+}
103
+
104
+div.sphinxsidebar h3 a {
105
+    color: #444;
106
+}
107
+
108
+div.sphinxsidebar p.logo a,
109
+div.sphinxsidebar h3 a,
110
+div.sphinxsidebar p.logo a:hover,
111
+div.sphinxsidebar h3 a:hover {
112
+    border: none;
113
+}
114
+
115
+div.sphinxsidebar p {
116
+    color: #555;
117
+    margin: 10px 0;
118
+}
119
+
120
+div.sphinxsidebar ul {
121
+    margin: 10px 0;
122
+    padding: 0;
123
+    color: #000;
124
+}
125
+
126
+div.sphinxsidebar input {
127
+    border: 1px solid #ccc;
128
+    font-family: 'Georgia', serif;
129
+    font-size: 1em;
130
+}
131
+
132
+/* -- body styles ----------------------------------------------------------- */
133
+
134
+a {
135
+    color: #004B6B;
136
+    text-decoration: underline;
137
+}
138
+
139
+a:hover {
140
+    color: #6D4100;
141
+    text-decoration: underline;
142
+}
143
+
144
+div.body h1,
145
+div.body h2,
146
+div.body h3,
147
+div.body h4,
148
+div.body h5,
149
+div.body h6 {
150
+    font-family: 'Garamond', 'Georgia', serif;
151
+    font-weight: normal;
152
+    margin: 30px 0px 10px 0px;
153
+    padding: 0;
154
+}
155
+
156
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
157
+div.body h2 { font-size: 180%; }
158
+div.body h3 { font-size: 150%; }
159
+div.body h4 { font-size: 130%; }
160
+div.body h5 { font-size: 100%; }
161
+div.body h6 { font-size: 100%; }
162
+
163
+a.headerlink {
164
+    color: #ddd;
165
+    padding: 0 4px;
166
+    text-decoration: none;
167
+}
168
+
169
+a.headerlink:hover {
170
+    color: #444;
171
+    background: #eaeaea;
172
+}
173
+
174
+div.body p, div.body dd, div.body li {
175
+    line-height: 1.4em;
176
+}
177
+
178
+div.admonition {
179
+    background: #fafafa;
180
+    margin: 20px -30px;
181
+    padding: 10px 30px;
182
+    border-top: 1px solid #ccc;
183
+    border-bottom: 1px solid #ccc;
184
+}
185
+
186
+div.admonition tt.xref, div.admonition a tt {
187
+    border-bottom: 1px solid #fafafa;
188
+}
189
+
190
+dd div.admonition {
191
+    margin-left: -60px;
192
+    padding-left: 60px;
193
+}
194
+
195
+div.admonition p.admonition-title {
196
+    font-family: 'Garamond', 'Georgia', serif;
197
+    font-weight: normal;
198
+    font-size: 24px;
199
+    margin: 0 0 10px 0;
200
+    padding: 0;
201
+    line-height: 1;
202
+}
203
+
204
+div.admonition p.last {
205
+    margin-bottom: 0;
206
+}
207
+
208
+div.highlight {
209
+    background-color: white;
210
+}
211
+
212
+dt:target, .highlight {
213
+    background: #FAF3E8;
214
+}
215
+
216
+div.note {
217
+    background-color: #eee;
218
+    border: 1px solid #ccc;
219
+}
220
+
221
+div.seealso {
222
+    background-color: #ffc;
223
+    border: 1px solid #ff6;
224
+}
225
+
226
+div.topic {
227
+    background-color: #eee;
228
+}
229
+
230
+p.admonition-title {
231
+    display: inline;
232
+}
233
+
234
+p.admonition-title:after {
235
+    content: ":";
236
+}
237
+
238
+pre, tt {
239
+    font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
240
+    font-size: 0.9em;
241
+}
242
+
243
+img.screenshot {
244
+}
245
+
246
+tt.descname, tt.descclassname {
247
+    font-size: 0.95em;
248
+}
249
+
250
+tt.descname {
251
+    padding-right: 0.08em;
252
+}
253
+
254
+img.screenshot {
255
+    -moz-box-shadow: 2px 2px 4px #eee;
256
+    -webkit-box-shadow: 2px 2px 4px #eee;
257
+    box-shadow: 2px 2px 4px #eee;
258
+}
259
+
260
+table.docutils {
261
+    border: 1px solid #888;
262
+    -moz-box-shadow: 2px 2px 4px #eee;
263
+    -webkit-box-shadow: 2px 2px 4px #eee;
264
+    box-shadow: 2px 2px 4px #eee;
265
+}
266
+
267
+table.docutils td, table.docutils th {
268
+    border: 1px solid #888;
269
+    padding: 0.25em 0.7em;
270
+}
271
+
272
+table.field-list, table.footnote {
273
+    border: none;
274
+    -moz-box-shadow: none;
275
+    -webkit-box-shadow: none;
276
+    box-shadow: none;
277
+}
278
+
279
+table.footnote {
280
+    margin: 15px 0;
281
+    width: 100%;
282
+    border: 1px solid #eee;
283
+    background: #fdfdfd;
284
+    font-size: 0.9em;
285
+}
286
+
287
+table.footnote + table.footnote {
288
+    margin-top: -15px;
289
+    border-top: none;
290
+}
291
+
292
+table.field-list th {
293
+    padding: 0 0.8em 0 0;
294
+}
295
+
296
+table.field-list td {
297
+    padding: 0;
298
+}
299
+
300
+table.footnote td.label {
301
+    width: 0px;
302
+    padding: 0.3em 0 0.3em 0.5em;
303
+}
304
+
305
+table.footnote td {
306
+    padding: 0.3em 0.5em;
307
+}
308
+
309
+dl {
310
+    margin: 0;
311
+    padding: 0;
312
+}
313
+
314
+dl dd {
315
+    margin-left: 30px;
316
+}
317
+
318
+blockquote {
319
+    margin: 0 0 0 30px;
320
+    padding: 0;
321
+}
322
+
323
+ul, ol {
324
+    margin: 10px 0 10px 30px;
325
+    padding: 0;
326
+}
327
+
328
+pre {
329
+    background: #eee;
330
+    padding: 7px 30px;
331
+    margin: 15px -30px;
332
+    line-height: 1.3em;
333
+}
334
+
335
+dl pre, blockquote pre, li pre {
336
+    margin-left: -60px;
337
+    padding-left: 60px;
338
+}
339
+
340
+dl dl pre {
341
+    margin-left: -90px;
342
+    padding-left: 90px;
343
+}
344
+
345
+tt {
346
+    background-color: #ecf0f3;
347
+    color: #222;
348
+    /* padding: 1px 2px; */
349
+}
350
+
351
+tt.xref, a tt {
352
+    background-color: #FBFBFB;
353
+    border-bottom: 1px solid white;
354
+}
355
+
356
+a.reference {
357
+    text-decoration: none;
358
+    border-bottom: 1px dotted #004B6B;
359
+}
360
+
361
+a.reference:hover {
362
+    border-bottom: 1px solid #6D4100;
363
+}
364
+
365
+a.footnote-reference {
366
+    text-decoration: none;
367
+    font-size: 0.7em;
368
+    vertical-align: top;
369
+    border-bottom: 1px dotted #004B6B;
370
+}
371
+
372
+a.footnote-reference:hover {
373
+    border-bottom: 1px solid #6D4100;
374
+}
375
+
376
+a:hover tt {
377
+    background: #EEE;
378
+}
379
+
380
+
381
+@media screen and (max-width: 600px) {
382
+
383
+    div.document {
384
+       width: 100%;
385
+
386
+    }
387
+
388
+    div.documentwrapper {
389
+    	margin-left: 0;
390
+    	margin-top: 0;
391
+    	margin-right: 0;
392
+    	margin-bottom: 0;
393
+    }
394
+
395
+    div.bodywrapper {
396
+    	margin-top: 0;
397
+    	margin-right: 0;
398
+    	margin-bottom: 0;
399
+    	margin-left: 0;
400
+    }
401
+
402
+    ul {
403
+    	margin-left: 0;
404
+    }
405
+
406
+    .document {
407
+    	width: auto;
408
+    }
409
+
410
+    .footer {
411
+    	width: auto;
412
+    }
413
+
414
+    .bodywrapper {
415
+    	margin: 0;
416
+    }
417
+
418
+    .footer {
419
+    	width: auto;
420
+    }
421
+
422
+    div.sphinxsidebar {
423
+        display: none;
424
+    }
425
+
426
+}
427
+
428
+div.sidebar_container, div.sidebar_container h1 {
429
+}
430
+
431
+div.sidebar_container h1 {
432
+    padding: 0;
433
+    margin: 0;
434
+    font-size: 350%;
435
+    line-height: 100%;
436
+}
437
+
438
+div.sidebar_container ul li {
439
+    padding: 2px 8px;
440
+    font-size: 0.9em;
441
+}

+ 7
- 0
docs/_themes/searx_theme/theme.conf View File

@@ -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 = 

+ 358
- 0
docs/conf.py View File

@@ -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, Adam Tauber'
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.8.0'
61
+# The full version, including alpha/beta/rc tags.
62
+release = '0.8.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

+ 71
- 0
docs/dev/contribution_guide.rst View File

@@ -0,0 +1,71 @@
1
+How to contribute
2
+-----------------
3
+
4
+Prime directives: Privacy, Hackability
5
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6
+
7
+Searx has 2 prime directives, privacy-by-design and hackability. The
8
+hackability comes in at least 3 levels:
9
+
10
+-  support for search engines
11
+-  plugins for altering search behaviour
12
+-  hacking searx itself.
13
+
14
+Happy hacking. Observe the lack of "world domination" among the
15
+directives, searx has no intentions for wide mass-adoption, rounded
16
+corners, etc. The prime directive: "privacy" - deserves a seperate
17
+chapter, as it's quite uncommon unfortunately, here it goes:
18
+
19
+Privacy-by-design
20
+^^^^^^^^^^^^^^^^^
21
+
22
+Searx is a privacy-respecting, hackable meta-search engine. It was born
23
+out of the need for a privacy-respecing search facility that can be
24
+expanded easily to maximise both its search and it's privacy protecting
25
+capabilities.
26
+
27
+Consequences of Privacy-by-design are that some widely used features
28
+work differently or not by default or at all. If some feature reduces
29
+the privacy perserving aspects of searx, it should by default be
30
+switched of, if implemented at all. There is enough search engines
31
+already out there providing such features. = Since privacy-preservation
32
+is a prime goal, if some feature does reduce the protection of searx and
33
+is implemented, care should be taken to educate the user about the
34
+consequences of choosing to enable this. Further features which
35
+implement widely known features in a manner that protects privacy but
36
+thus deviate from the users expectations should also be explained to the
37
+user. Also if you think that something works weird with searx, maybe
38
+it's because of the tool you use is designed in a way to interfere with
39
+privacy respect, submiting a bugreport to the vendor of the tool that
40
+misbehaves might be a good feedback for the vendor to reconsider his
41
+disrespect towards his customers (e.g. GET vs POST requests in various
42
+browsers).
43
+
44
+Remember the other prime directive of searx is to be hackable, so if the
45
+above privacy concerns do not fancy you, simply fork it.
46
+
47
+Code
48
+~~~~
49
+
50
+Code modifications are accepted in pull requests, don't forget to add
51
+yourself to the AUTHORS file.
52
+
53
+Python code follows all the pep8 standards except maximum line width
54
+which is 120 char.
55
+
56
+Please be sure that the submitted code doesn't break existing tests and
57
+follows coding conventions.
58
+
59
+If new functionality implemented, tests are highly appreciated.
60
+
61
+Translation
62
+~~~~~~~~~~~
63
+
64
+Translation currently happens on
65
+`transifex <https://transifex.com/projects/p/searx>`__. Please do not
66
+update translation files in the repo.
67
+
68
+Documentation
69
+~~~~~~~~~~~~~
70
+
71
+The main place of the documentation is this wiki, updates are welcome.

+ 277
- 0
docs/dev/install/installation.rst View File

@@ -0,0 +1,277 @@
1
+Installation
2
+============
3
+
4
+Step by step installation for Debian / Ubuntu with virtualenv.
5
+
6
+Source: https://about.okhin.fr/posts/Searx/ with some additions
7
+
8
+How to: `Setup searx in a couple of hours with a free SSL
9
+certificate <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
10
+
11
+Basic installation
12
+------------------
13
+
14
+For Ubuntu, be sure to have enable universe repository.
15
+
16
+Install packages :
17
+
18
+.. code:: sh
19
+
20
+    sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
21
+
22
+Install searx :
23
+
24
+.. code:: sh
25
+
26
+    cd /usr/local
27
+    sudo git clone https://github.com/asciimoo/searx.git
28
+    sudo useradd searx -d /usr/local/searx
29
+    sudo chown searx:searx -R /usr/local/searx
30
+
31
+Install dependencies in a virtualenv :
32
+
33
+.. code:: sh
34
+
35
+    sudo -u searx -i
36
+    cd /usr/local/searx
37
+    virtualenv searx-ve
38
+    . ./searx-ve/bin/activate
39
+    pip install -r requirements.txt
40
+    python setup.py install
41
+
42
+Configuration
43
+-------------
44
+
45
+.. code:: sh
46
+
47
+    sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
48
+
49
+Edit searx/settings.yml if necessary.
50
+
51
+Check
52
+-----
53
+
54
+Start searx :
55
+
56
+.. code:: sh
57
+
58
+    python searx/webapp.py
59
+
60
+Go to http://localhost:8888
61
+
62
+If everything works fine, disable the debug option in settings.yml :
63
+
64
+.. code:: sh
65
+
66
+    sed -i -e "s/debug : True/debug : False/g" searx/settings.yml
67
+
68
+At this point searx is not demonized ; uwsgi allows this.
69
+
70
+You can exit the virtualenv and the searx user bash (enter exit command
71
+twice).
72
+
73
+uwsgi
74
+-----
75
+
76
+Install packages :
77
+
78
+.. code:: sh
79
+
80
+    sudo apt-get install uwsgi uwsgi-plugin-python
81
+
82
+Create the configuration file /etc/uwsgi/apps-available/searx.ini with
83
+this content :
84
+
85
+::
86
+
87
+    [uwsgi]
88
+    # Who will run the code
89
+    uid = searx
90
+    gid = searx
91
+
92
+    # disable logging for privacy
93
+    disable-logging = true
94
+
95
+    # Number of workers (usually CPU count)
96
+    workers = 4
97
+
98
+    # The right granted on the created socket
99
+    chmod-socket = 666
100
+
101
+    # Plugin to use and interpretor config
102
+    single-interpreter = true
103
+    master = true
104
+    plugin = python
105
+
106
+    # Module to import
107
+    module = searx.webapp
108
+
109
+    # Virtualenv and python path
110
+    virtualenv = /usr/local/searx/searx-ve/
111
+    pythonpath = /usr/local/searx/
112
+    chdir = /usr/local/searx/searx/
113
+
114
+Activate the uwsgi application and restart :
115
+
116
+.. code:: sh
117
+
118
+    cd /etc/uwsgi/apps-enabled
119
+    ln -s ../apps-available/searx.ini
120
+    /etc/init.d/uwsgi restart
121
+
122
+Web server
123
+----------
124
+
125
+with nginx
126
+^^^^^^^^^^
127
+
128
+If nginx is not installed (uwsgi will not work with the package
129
+nginx-light) :
130
+
131
+.. code:: sh
132
+
133
+    sudo apt-get install nginx
134
+
135
+Hosted at /
136
+"""""""""""
137
+
138
+Create the configuration file /etc/nginx/sites-available/searx with this
139
+content :
140
+
141
+.. code:: nginx
142
+
143
+    server {
144
+        listen 80;
145
+        server_name searx.example.com;
146
+        root /usr/local/searx;
147
+
148
+        location / {
149
+                include uwsgi_params;
150
+                uwsgi_pass unix:/run/uwsgi/app/searx/socket;
151
+        }
152
+    }
153
+
154
+Restart service :
155
+
156
+.. code:: sh
157
+
158
+    sudo service nginx restart
159
+    sudo service uwsgi restart
160
+
161
+from subdirectory URL (/searx)
162
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163
+
164
+Add this configuration in the server config file
165
+/etc/nginx/sites-available/default :
166
+
167
+.. code:: nginx
168
+
169
+    location = /searx { rewrite ^ /searx/; }
170
+    location /searx {
171
+            try_files $uri @searx;
172
+    }
173
+    location @searx {
174
+            uwsgi_param SCRIPT_NAME /searx;
175
+            include uwsgi_params;
176
+            uwsgi_modifier1 30;
177
+            uwsgi_pass unix:/run/uwsgi/app/searx/socket;
178
+    }
179
+
180
+Enable base\_url in searx/settings.yml
181
+
182
+::
183
+
184
+    base_url : http://your.domain.tld/searx/
185
+
186
+Restart service :
187
+
188
+.. code:: sh
189
+
190
+    sudo service nginx restart
191
+    sudo service uwsgi restart
192
+
193
+disable logs
194
+~~~~~~~~~~~~
195
+
196
+for better privacy you can disable nginx logs about searx.
197
+
198
+how to proceed : below ``uwsgi_pass`` in
199
+/etc/nginx/sites-available/default add
200
+
201
+::
202
+
203
+    access_log /dev/null;
204
+    error_log /dev/null;
205
+
206
+Restart service :
207
+
208
+.. code:: sh
209
+
210
+    sudo service nginx restart
211
+
212
+with apache
213
+-----------
214
+
215
+Add wsgi mod :
216
+
217
+.. code:: sh
218
+
219
+    sudo apt-get install libapache2-mod-uwsgi
220
+    sudo a2enmod uwsgi
221
+
222
+Add this configuration in the file /etc/apache2/apache2.conf :
223
+
224
+.. code:: apache
225
+
226
+    <Location />
227
+        Options FollowSymLinks Indexes
228
+        SetHandler uwsgi-handler
229
+        uWSGISocket /run/uwsgi/app/searx/socket
230
+    </Location>
231
+
232
+Note that if your instance of searx is not at the root, you should
233
+change ``<Location />`` by the location of your instance, like
234
+``<Location /searx>``.
235
+
236
+Restart Apache :
237
+
238
+.. code:: sh
239
+
240
+    sudo /etc/init.d/apache2 restart
241
+
242
+disable logs
243
+------------
244
+
245
+For better privacy you can disable Apache logs.
246
+
247
+WARNING : not tested
248
+
249
+WARNING : you can only disable logs for the whole (virtual) server not
250
+for a specific path.
251
+
252
+Go back to /etc/apache2/apache2.conf and above ``<Location />`` add :
253
+
254
+.. code:: apache
255
+
256
+    CustomLog /dev/null combined
257
+
258
+Restart Apache :
259
+
260
+.. code:: sh
261
+
262
+    sudo /etc/init.d/apache2 restart
263
+
264
+How to update
265
+-------------
266
+
267
+.. code:: sh
268
+
269
+    cd /usr/local/searx
270
+    sudo -u searx -i
271
+    . ./searx-ve/bin/activate
272
+    git stash
273
+    git pull origin master
274
+    git stash apply
275
+    pip install --upgrade -r requirements.txt
276
+    sudo service uwsgi restart
277
+

+ 45
- 0
docs/dev/plugins.rst View File

@@ -0,0 +1,45 @@
1
+Plugins
2
+-------
3
+
4
+Plugins can extend/replace functionality of various components inside
5
+searx.
6
+
7
+example\_plugin.py
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  # disable 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
+Currently implemented plugin entry points (a.k.a hooks)
28
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29
+
30
+-  Pre search hook (``pre_search``)
31
+-  Post search hook (``post_search``)
32
+-  Result hook (``on_result``) (is called if a new result is added (see
33
+   https\_rewrite plugin))
34
+
35
+Feel free to add more hooks to the code if it is required by a plugin.
36
+
37
+TODO
38
+~~~~
39
+
40
+-  Better documentation
41
+-  More hooks
42
+-  search hook (is called while searx is requesting results (for
43
+   example: things like math-solver), the different hooks are running
44
+   parallel)
45
+

+ 24
- 0
docs/dev/search_api.rst View File

@@ -0,0 +1,24 @@
1
+Search API
2
+==========
3
+
4
+Search API endpoints: ``/``, ``/search``
5
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
+
7
+Endpoints have equivalent functionality.
8
+
9
+Parameters
10
+^^^^^^^^^^
11
+
12
++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
13
+| Name             | Description                                                                                        |                             |
14
++==================+====================================================================================================+=============================+
15
+| ``q``            | The search query, see :doc:`/user/search_syntax`                                                   | required                    |
16
++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
17
+| ``categories``   | Comma separated list, specifies the active search categories                                       | optional                    |
18
++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
19
+| ``engines``      | Comma separated list, specifies the active search engines                                          | optional                    |
20
++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
21
+| ``pageno``       | Search page number                                                                                 | optional (default: ``1``)   |
22
++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
23
+
24
+Both ``GET`` and ``POST`` methods are supported.

+ 74
- 0
docs/dev/translation.rst View File

@@ -0,0 +1,74 @@
1
+Translation
2
+===========
3
+
4
+run these commands in the root directory of searx
5
+
6
+Add new language
7
+~~~~~~~~~~~~~~~~
8
+
9
+``pybabel init -i messages.pot -d searx/translations -l it``
10
+
11
+Update .po files
12
+~~~~~~~~~~~~~~~~
13
+
14
+``./utils/update-translations.sh``
15
+
16
+You may have errors here. In that case, edit the
17
+``update-translations.sh`` script to change ``pybabel`` to
18
+``pybabel-python2``
19
+
20
+After this step, you can modify the .po files.
21
+
22
+Compile translations
23
+~~~~~~~~~~~~~~~~~~~~
24
+
25
+``pybabel compile -d searx/translations``
26
+
27
+Transifex stuff
28
+~~~~~~~~~~~~~~~
29
+
30
+Init Project
31
+^^^^^^^^^^^^
32
+
33
+.. code:: shell
34
+
35
+    tx set --auto-local -r searx.messagespo 'searx/translations/<lang>/LC_MESSAGES/messages.po' \
36
+    --source-lang en --type PO --source-file messages.pot --execute
37
+
38
+http://docs.transifex.com/developer/client/set
39
+
40
+*TODO: mapping between transifex and searx*
41
+
42
+Get translations
43
+^^^^^^^^^^^^^^^^
44
+
45
+.. code:: shell
46
+
47
+    tx pull -a
48
+
49
+http://docs.transifex.com/developer/client/pull
50
+
51
+Upload source File
52
+^^^^^^^^^^^^^^^^^^
53
+
54
+::
55
+
56
+    tx push -s
57
+
58
+Upload all Translation
59
+^^^^^^^^^^^^^^^^^^^^^^
60
+
61
+::
62
+
63
+    tx push -s -t
64
+
65
+upload specifc Translation (only for admins)
66
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67
+
68
+::
69
+
70
+    tx push -t -l tr
71
+
72
+http://docs.transifex.com/developer/client/push
73
+
74
+*TODO: upload empty files? (new translations)*

+ 39
- 0
docs/index.rst View File

@@ -0,0 +1,39 @@
1
+Privacy-respecting free metasearch engine
2
+=========================================
3
+
4
+Searx is a free software internet metasearch engine which aggregates results from other search engines, while not storing information about its users. Searx does not track or profile its users, nor does it share its users' data with third parties. Additionally, searx can be used over Tor for online anonymity.
5
+
6
+
7
+Features
8
+--------
9
+
10
+ - Self hosted
11
+ - Does not track its users
12
+ - Does not share its users data with third parties
13
+ - Does not use cookies by default
14
+ - Does not profile its users
15
+ - Does not collect its users data
16
+ - Offers secure, encrypted connections (HTTPS/SSL)
17
+ - Hosted by organisations, such as La Quadrature du Net, which promote digital rights
18
+
19
+
20
+Further reading
21
+---------------
22
+
23
+.. toctree::
24
+   :maxdepth: 1
25
+
26
+   user/search_syntax
27
+
28
+
29
+Developer documentation
30
+-----------------------
31
+
32
+.. toctree::
33
+   :maxdepth: 1
34
+
35
+   dev/contribution_guide
36
+   dev/install/installation
37
+   dev/search_api
38
+   dev/plugins
39
+   dev/translation

BIN
docs/static/img/searx_logo_small.png View File


+ 33
- 0
docs/user/search_syntax.rst View File

@@ -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>`_

+ 1
- 0
requirements.txt View File

@@ -0,0 +1 @@
1
+sphinx