Kaynağa Gözat

[enh] render latest version

Adam Tauber 9 yıl önce
ebeveyn
işleme
febf725775

+ 71
- 0
_sources/dev/contribution_guide.txt Dosyayı Görüntüle

@@ -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
_sources/dev/install/installation.txt Dosyayı Görüntüle

@@ -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
_sources/dev/plugins.txt Dosyayı Görüntüle

@@ -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
_sources/dev/search_api.txt Dosyayı Görüntüle

@@ -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
_sources/dev/translation.txt Dosyayı Görüntüle

@@ -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
_sources/index.txt Dosyayı Görüntüle

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

+ 33
- 0
_sources/user/search_syntax.txt Dosyayı Görüntüle

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

BIN
_static/ajax-loader.gif Dosyayı Görüntüle


+ 599
- 0
_static/basic.css Dosyayı Görüntüle

@@ -0,0 +1,599 @@
1
+/*
2
+ * basic.css
3
+ * ~~~~~~~~~
4
+ *
5
+ * Sphinx stylesheet -- basic theme.
6
+ *
7
+ * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/* -- main layout ----------------------------------------------------------- */
13
+
14
+div.clearer {
15
+    clear: both;
16
+}
17
+
18
+/* -- relbar ---------------------------------------------------------------- */
19
+
20
+div.related {
21
+    width: 100%;
22
+    font-size: 90%;
23
+}
24
+
25
+div.related h3 {
26
+    display: none;
27
+}
28
+
29
+div.related ul {
30
+    margin: 0;
31
+    padding: 0 0 0 10px;
32
+    list-style: none;
33
+}
34
+
35
+div.related li {
36
+    display: inline;
37
+}
38
+
39
+div.related li.right {
40
+    float: right;
41
+    margin-right: 5px;
42
+}
43
+
44
+/* -- sidebar --------------------------------------------------------------- */
45
+
46
+div.sphinxsidebarwrapper {
47
+    padding: 10px 5px 0 10px;
48
+}
49
+
50
+div.sphinxsidebar {
51
+    float: left;
52
+    width: 230px;
53
+    margin-left: -100%;
54
+    font-size: 90%;
55
+}
56
+
57
+div.sphinxsidebar ul {
58
+    list-style: none;
59
+}
60
+
61
+div.sphinxsidebar ul ul,
62
+div.sphinxsidebar ul.want-points {
63
+    margin-left: 20px;
64
+    list-style: square;
65
+}
66
+
67
+div.sphinxsidebar ul ul {
68
+    margin-top: 0;
69
+    margin-bottom: 0;
70
+}
71
+
72
+div.sphinxsidebar form {
73
+    margin-top: 10px;
74
+}
75
+
76
+div.sphinxsidebar input {
77
+    border: 1px solid #98dbcc;
78
+    font-family: sans-serif;
79
+    font-size: 1em;
80
+}
81
+
82
+div.sphinxsidebar #searchbox input[type="text"] {
83
+    width: 170px;
84
+}
85
+
86
+div.sphinxsidebar #searchbox input[type="submit"] {
87
+    width: 30px;
88
+}
89
+
90
+img {
91
+    border: 0;
92
+    max-width: 100%;
93
+}
94
+
95
+/* -- search page ----------------------------------------------------------- */
96
+
97
+ul.search {
98
+    margin: 10px 0 0 20px;
99
+    padding: 0;
100
+}
101
+
102
+ul.search li {
103
+    padding: 5px 0 5px 20px;
104
+    background-image: url(file.png);
105
+    background-repeat: no-repeat;
106
+    background-position: 0 7px;
107
+}
108
+
109
+ul.search li a {
110
+    font-weight: bold;
111
+}
112
+
113
+ul.search li div.context {
114
+    color: #888;
115
+    margin: 2px 0 0 30px;
116
+    text-align: left;
117
+}
118
+
119
+ul.keywordmatches li.goodmatch a {
120
+    font-weight: bold;
121
+}
122
+
123
+/* -- index page ------------------------------------------------------------ */
124
+
125
+table.contentstable {
126
+    width: 90%;
127
+}
128
+
129
+table.contentstable p.biglink {
130
+    line-height: 150%;
131
+}
132
+
133
+a.biglink {
134
+    font-size: 1.3em;
135
+}
136
+
137
+span.linkdescr {
138
+    font-style: italic;
139
+    padding-top: 5px;
140
+    font-size: 90%;
141
+}
142
+
143
+/* -- general index --------------------------------------------------------- */
144
+
145
+table.indextable {
146
+    width: 100%;
147
+}
148
+
149
+table.indextable td {
150
+    text-align: left;
151
+    vertical-align: top;
152
+}
153
+
154
+table.indextable dl, table.indextable dd {
155
+    margin-top: 0;
156
+    margin-bottom: 0;
157
+}
158
+
159
+table.indextable tr.pcap {
160
+    height: 10px;
161
+}
162
+
163
+table.indextable tr.cap {
164
+    margin-top: 10px;
165
+    background-color: #f2f2f2;
166
+}
167
+
168
+img.toggler {
169
+    margin-right: 3px;
170
+    margin-top: 3px;
171
+    cursor: pointer;
172
+}
173
+
174
+div.modindex-jumpbox {
175
+    border-top: 1px solid #ddd;
176
+    border-bottom: 1px solid #ddd;
177
+    margin: 1em 0 1em 0;
178
+    padding: 0.4em;
179
+}
180
+
181
+div.genindex-jumpbox {
182
+    border-top: 1px solid #ddd;
183
+    border-bottom: 1px solid #ddd;
184
+    margin: 1em 0 1em 0;
185
+    padding: 0.4em;
186
+}
187
+
188
+/* -- general body styles --------------------------------------------------- */
189
+
190
+a.headerlink {
191
+    visibility: hidden;
192
+}
193
+
194
+h1:hover > a.headerlink,
195
+h2:hover > a.headerlink,
196
+h3:hover > a.headerlink,
197
+h4:hover > a.headerlink,
198
+h5:hover > a.headerlink,
199
+h6:hover > a.headerlink,
200
+dt:hover > a.headerlink,
201
+caption:hover > a.headerlink,
202
+p.caption:hover > a.headerlink,
203
+div.code-block-caption:hover > a.headerlink {
204
+    visibility: visible;
205
+}
206
+
207
+div.body p.caption {
208
+    text-align: inherit;
209
+}
210
+
211
+div.body td {
212
+    text-align: left;
213
+}
214
+
215
+.field-list ul {
216
+    padding-left: 1em;
217
+}
218
+
219
+.first {
220
+    margin-top: 0 !important;
221
+}
222
+
223
+p.rubric {
224
+    margin-top: 30px;
225
+    font-weight: bold;
226
+}
227
+
228
+img.align-left, .figure.align-left, object.align-left {
229
+    clear: left;
230
+    float: left;
231
+    margin-right: 1em;
232
+}
233
+
234
+img.align-right, .figure.align-right, object.align-right {
235
+    clear: right;
236
+    float: right;
237
+    margin-left: 1em;
238
+}
239
+
240
+img.align-center, .figure.align-center, object.align-center {
241
+  display: block;
242
+  margin-left: auto;
243
+  margin-right: auto;
244
+}
245
+
246
+.align-left {
247
+    text-align: left;
248
+}
249
+
250
+.align-center {
251
+    text-align: center;
252
+}
253
+
254
+.align-right {
255
+    text-align: right;
256
+}
257
+
258
+/* -- sidebars -------------------------------------------------------------- */
259
+
260
+div.sidebar {
261
+    margin: 0 0 0.5em 1em;
262
+    border: 1px solid #ddb;
263
+    padding: 7px 7px 0 7px;
264
+    background-color: #ffe;
265
+    width: 40%;
266
+    float: right;
267
+}
268
+
269
+p.sidebar-title {
270
+    font-weight: bold;
271
+}
272
+
273
+/* -- topics ---------------------------------------------------------------- */
274
+
275
+div.topic {
276
+    border: 1px solid #ccc;
277
+    padding: 7px 7px 0 7px;
278
+    margin: 10px 0 10px 0;
279
+}
280
+
281
+p.topic-title {
282
+    font-size: 1.1em;
283
+    font-weight: bold;
284
+    margin-top: 10px;
285
+}
286
+
287
+/* -- admonitions ----------------------------------------------------------- */
288
+
289
+div.admonition {
290
+    margin-top: 10px;
291
+    margin-bottom: 10px;
292
+    padding: 7px;
293
+}
294
+
295
+div.admonition dt {
296
+    font-weight: bold;
297
+}
298
+
299
+div.admonition dl {
300
+    margin-bottom: 0;
301
+}
302
+
303
+p.admonition-title {
304
+    margin: 0px 10px 5px 0px;
305
+    font-weight: bold;
306
+}
307
+
308
+div.body p.centered {
309
+    text-align: center;
310
+    margin-top: 25px;
311
+}
312
+
313
+/* -- tables ---------------------------------------------------------------- */
314
+
315
+table.docutils {
316
+    border: 0;
317
+    border-collapse: collapse;
318
+}
319
+
320
+table caption span.caption-number {
321
+    font-style: italic;
322
+}
323
+
324
+table caption span.caption-text {
325
+}
326
+
327
+table.docutils td, table.docutils th {
328
+    padding: 1px 8px 1px 5px;
329
+    border-top: 0;
330
+    border-left: 0;
331
+    border-right: 0;
332
+    border-bottom: 1px solid #aaa;
333
+}
334
+
335
+table.field-list td, table.field-list th {
336
+    border: 0 !important;
337
+}
338
+
339
+table.footnote td, table.footnote th {
340
+    border: 0 !important;
341
+}
342
+
343
+th {
344
+    text-align: left;
345
+    padding-right: 5px;
346
+}
347
+
348
+table.citation {
349
+    border-left: solid 1px gray;
350
+    margin-left: 1px;
351
+}
352
+
353
+table.citation td {
354
+    border-bottom: none;
355
+}
356
+
357
+/* -- figures --------------------------------------------------------------- */
358
+
359
+div.figure {
360
+    margin: 0.5em;
361
+    padding: 0.5em;
362
+}
363
+
364
+div.figure p.caption {
365
+    padding: 0.3em;
366
+}
367
+
368
+div.figure p.caption span.caption-number {
369
+    font-style: italic;
370
+}
371
+
372
+div.figure p.caption span.caption-text {
373
+}
374
+
375
+
376
+/* -- other body styles ----------------------------------------------------- */
377
+
378
+ol.arabic {
379
+    list-style: decimal;
380
+}
381
+
382
+ol.loweralpha {
383
+    list-style: lower-alpha;
384
+}
385
+
386
+ol.upperalpha {
387
+    list-style: upper-alpha;
388
+}
389
+
390
+ol.lowerroman {
391
+    list-style: lower-roman;
392
+}
393
+
394
+ol.upperroman {
395
+    list-style: upper-roman;
396
+}
397
+
398
+dl {
399
+    margin-bottom: 15px;
400
+}
401
+
402
+dd p {
403
+    margin-top: 0px;
404
+}
405
+
406
+dd ul, dd table {
407
+    margin-bottom: 10px;
408
+}
409
+
410
+dd {
411
+    margin-top: 3px;
412
+    margin-bottom: 10px;
413
+    margin-left: 30px;
414
+}
415
+
416
+dt:target, .highlighted {
417
+    background-color: #fbe54e;
418
+}
419
+
420
+dl.glossary dt {
421
+    font-weight: bold;
422
+    font-size: 1.1em;
423
+}
424
+
425
+.field-list ul {
426
+    margin: 0;
427
+    padding-left: 1em;
428
+}
429
+
430
+.field-list p {
431
+    margin: 0;
432
+}
433
+
434
+.optional {
435
+    font-size: 1.3em;
436
+}
437
+
438
+.sig-paren {
439
+    font-size: larger;
440
+}
441
+
442
+.versionmodified {
443
+    font-style: italic;
444
+}
445
+
446
+.system-message {
447
+    background-color: #fda;
448
+    padding: 5px;
449
+    border: 3px solid red;
450
+}
451
+
452
+.footnote:target  {
453
+    background-color: #ffa;
454
+}
455
+
456
+.line-block {
457
+    display: block;
458
+    margin-top: 1em;
459
+    margin-bottom: 1em;
460
+}
461
+
462
+.line-block .line-block {
463
+    margin-top: 0;
464
+    margin-bottom: 0;
465
+    margin-left: 1.5em;
466
+}
467
+
468
+.guilabel, .menuselection {
469
+    font-family: sans-serif;
470
+}
471
+
472
+.accelerator {
473
+    text-decoration: underline;
474
+}
475
+
476
+.classifier {
477
+    font-style: oblique;
478
+}
479
+
480
+abbr, acronym {
481
+    border-bottom: dotted 1px;
482
+    cursor: help;
483
+}
484
+
485
+/* -- code displays --------------------------------------------------------- */
486
+
487
+pre {
488
+    overflow: auto;
489
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
490
+}
491
+
492
+td.linenos pre {
493
+    padding: 5px 0px;
494
+    border: 0;
495
+    background-color: transparent;
496
+    color: #aaa;
497
+}
498
+
499
+table.highlighttable {
500
+    margin-left: 0.5em;
501
+}
502
+
503
+table.highlighttable td {
504
+    padding: 0 0.5em 0 0.5em;
505
+}
506
+
507
+div.code-block-caption {
508
+    padding: 2px 5px;
509
+    font-size: small;
510
+}
511
+
512
+div.code-block-caption code {
513
+    background-color: transparent;
514
+}
515
+
516
+div.code-block-caption + div > div.highlight > pre {
517
+    margin-top: 0;
518
+}
519
+
520
+div.code-block-caption span.caption-number {
521
+    padding: 0.1em 0.3em;
522
+    font-style: italic;
523
+}
524
+
525
+div.code-block-caption span.caption-text {
526
+}
527
+
528
+div.literal-block-wrapper {
529
+    padding: 1em 1em 0;
530
+}
531
+
532
+div.literal-block-wrapper div.highlight {
533
+    margin: 0;
534
+}
535
+
536
+code.descname {
537
+    background-color: transparent;
538
+    font-weight: bold;
539
+    font-size: 1.2em;
540
+}
541
+
542
+code.descclassname {
543
+    background-color: transparent;
544
+}
545
+
546
+code.xref, a code {
547
+    background-color: transparent;
548
+    font-weight: bold;
549
+}
550
+
551
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
552
+    background-color: transparent;
553
+}
554
+
555
+.viewcode-link {
556
+    float: right;
557
+}
558
+
559
+.viewcode-back {
560
+    float: right;
561
+    font-family: sans-serif;
562
+}
563
+
564
+div.viewcode-block:target {
565
+    margin: -1px -10px;
566
+    padding: 0 10px;
567
+}
568
+
569
+/* -- math display ---------------------------------------------------------- */
570
+
571
+img.math {
572
+    vertical-align: middle;
573
+}
574
+
575
+div.body div.math p {
576
+    text-align: center;
577
+}
578
+
579
+span.eqno {
580
+    float: right;
581
+}
582
+
583
+/* -- printout stylesheet --------------------------------------------------- */
584
+
585
+@media print {
586
+    div.document,
587
+    div.documentwrapper,
588
+    div.bodywrapper {
589
+        margin: 0 !important;
590
+        width: 100%;
591
+    }
592
+
593
+    div.sphinxsidebar,
594
+    div.related,
595
+    div.footer,
596
+    #top-link {
597
+        display: none;
598
+    }
599
+}

BIN
_static/comment-bright.png Dosyayı Görüntüle


BIN
_static/comment-close.png Dosyayı Görüntüle


BIN
_static/comment.png Dosyayı Görüntüle


+ 263
- 0
_static/doctools.js Dosyayı Görüntüle

@@ -0,0 +1,263 @@
1
+/*
2
+ * doctools.js
3
+ * ~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilities for all documentation.
6
+ *
7
+ * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/**
13
+ * select a different prefix for underscore
14
+ */
15
+$u = _.noConflict();
16
+
17
+/**
18
+ * make the code below compatible with browsers without
19
+ * an installed firebug like debugger
20
+if (!window.console || !console.firebug) {
21
+  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
22
+    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
23
+    "profile", "profileEnd"];
24
+  window.console = {};
25
+  for (var i = 0; i < names.length; ++i)
26
+    window.console[names[i]] = function() {};
27
+}
28
+ */
29
+
30
+/**
31
+ * small helper function to urldecode strings
32
+ */
33
+jQuery.urldecode = function(x) {
34
+  return decodeURIComponent(x).replace(/\+/g, ' ');
35
+};
36
+
37
+/**
38
+ * small helper function to urlencode strings
39
+ */
40
+jQuery.urlencode = encodeURIComponent;
41
+
42
+/**
43
+ * This function returns the parsed url parameters of the
44
+ * current request. Multiple values per key are supported,
45
+ * it will always return arrays of strings for the value parts.
46
+ */
47
+jQuery.getQueryParameters = function(s) {
48
+  if (typeof s == 'undefined')
49
+    s = document.location.search;
50
+  var parts = s.substr(s.indexOf('?') + 1).split('&');
51
+  var result = {};
52
+  for (var i = 0; i < parts.length; i++) {
53
+    var tmp = parts[i].split('=', 2);
54
+    var key = jQuery.urldecode(tmp[0]);
55
+    var value = jQuery.urldecode(tmp[1]);
56
+    if (key in result)
57
+      result[key].push(value);
58
+    else
59
+      result[key] = [value];
60
+  }
61
+  return result;
62
+};
63
+
64
+/**
65
+ * highlight a given string on a jquery object by wrapping it in
66
+ * span elements with the given class name.
67
+ */
68
+jQuery.fn.highlightText = function(text, className) {
69
+  function highlight(node) {
70
+    if (node.nodeType == 3) {
71
+      var val = node.nodeValue;
72
+      var pos = val.toLowerCase().indexOf(text);
73
+      if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
74
+        var span = document.createElement("span");
75
+        span.className = className;
76
+        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
77
+        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
78
+          document.createTextNode(val.substr(pos + text.length)),
79
+          node.nextSibling));
80
+        node.nodeValue = val.substr(0, pos);
81
+      }
82
+    }
83
+    else if (!jQuery(node).is("button, select, textarea")) {
84
+      jQuery.each(node.childNodes, function() {
85
+        highlight(this);
86
+      });
87
+    }
88
+  }
89
+  return this.each(function() {
90
+    highlight(this);
91
+  });
92
+};
93
+
94
+/*
95
+ * backward compatibility for jQuery.browser
96
+ * This will be supported until firefox bug is fixed.
97
+ */
98
+if (!jQuery.browser) {
99
+  jQuery.uaMatch = function(ua) {
100
+    ua = ua.toLowerCase();
101
+
102
+    var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
103
+      /(webkit)[ \/]([\w.]+)/.exec(ua) ||
104
+      /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
105
+      /(msie) ([\w.]+)/.exec(ua) ||
106
+      ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
107
+      [];
108
+
109
+    return {
110
+      browser: match[ 1 ] || "",
111
+      version: match[ 2 ] || "0"
112
+    };
113
+  };
114
+  jQuery.browser = {};
115
+  jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
116
+}
117
+
118
+/**
119
+ * Small JavaScript module for the documentation.
120
+ */
121
+var Documentation = {
122
+
123
+  init : function() {
124
+    this.fixFirefoxAnchorBug();
125
+    this.highlightSearchWords();
126
+    this.initIndexTable();
127
+  },
128
+
129
+  /**
130
+   * i18n support
131
+   */
132
+  TRANSLATIONS : {},
133
+  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
134
+  LOCALE : 'unknown',
135
+
136
+  // gettext and ngettext don't access this so that the functions
137
+  // can safely bound to a different name (_ = Documentation.gettext)
138
+  gettext : function(string) {
139
+    var translated = Documentation.TRANSLATIONS[string];
140
+    if (typeof translated == 'undefined')
141
+      return string;
142
+    return (typeof translated == 'string') ? translated : translated[0];
143
+  },
144
+
145
+  ngettext : function(singular, plural, n) {
146
+    var translated = Documentation.TRANSLATIONS[singular];
147
+    if (typeof translated == 'undefined')
148
+      return (n == 1) ? singular : plural;
149
+    return translated[Documentation.PLURALEXPR(n)];
150
+  },
151
+
152
+  addTranslations : function(catalog) {
153
+    for (var key in catalog.messages)
154
+      this.TRANSLATIONS[key] = catalog.messages[key];
155
+    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
156
+    this.LOCALE = catalog.locale;
157
+  },
158
+
159
+  /**
160
+   * add context elements like header anchor links
161
+   */
162
+  addContextElements : function() {
163
+    $('div[id] > :header:first').each(function() {
164
+      $('<a class="headerlink">\u00B6</a>').
165
+      attr('href', '#' + this.id).
166
+      attr('title', _('Permalink to this headline')).
167
+      appendTo(this);
168
+    });
169
+    $('dt[id]').each(function() {
170
+      $('<a class="headerlink">\u00B6</a>').
171
+      attr('href', '#' + this.id).
172
+      attr('title', _('Permalink to this definition')).
173
+      appendTo(this);
174
+    });
175
+  },
176
+
177
+  /**
178
+   * workaround a firefox stupidity
179
+   * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
180
+   */
181
+  fixFirefoxAnchorBug : function() {
182
+    if (document.location.hash)
183
+      window.setTimeout(function() {
184
+        document.location.href += '';
185
+      }, 10);
186
+  },
187
+
188
+  /**
189
+   * highlight the search words provided in the url in the text
190
+   */
191
+  highlightSearchWords : function() {
192
+    var params = $.getQueryParameters();
193
+    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
194
+    if (terms.length) {
195
+      var body = $('div.body');
196
+      if (!body.length) {
197
+        body = $('body');
198
+      }
199
+      window.setTimeout(function() {
200
+        $.each(terms, function() {
201
+          body.highlightText(this.toLowerCase(), 'highlighted');
202
+        });
203
+      }, 10);
204
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
205
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
206
+          .appendTo($('#searchbox'));
207
+    }
208
+  },
209
+
210
+  /**
211
+   * init the domain index toggle buttons
212
+   */
213
+  initIndexTable : function() {
214
+    var togglers = $('img.toggler').click(function() {
215
+      var src = $(this).attr('src');
216
+      var idnum = $(this).attr('id').substr(7);
217
+      $('tr.cg-' + idnum).toggle();
218
+      if (src.substr(-9) == 'minus.png')
219
+        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
220
+      else
221
+        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
222
+    }).css('display', '');
223
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
224
+        togglers.click();
225
+    }
226
+  },
227
+
228
+  /**
229
+   * helper function to hide the search marks again
230
+   */
231
+  hideSearchWords : function() {
232
+    $('#searchbox .highlight-link').fadeOut(300);
233
+    $('span.highlighted').removeClass('highlighted');
234
+  },
235
+
236
+  /**
237
+   * make the url absolute
238
+   */
239
+  makeURL : function(relativeURL) {
240
+    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
241
+  },
242
+
243
+  /**
244
+   * get the current relative url
245
+   */
246
+  getCurrentURL : function() {
247
+    var path = document.location.pathname;
248
+    var parts = path.split(/\//);
249
+    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
250
+      if (this == '..')
251
+        parts.pop();
252
+    });
253
+    var url = parts.join('/');
254
+    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
255
+  }
256
+};
257
+
258
+// quick alias for translations
259
+_ = Documentation.gettext;
260
+
261
+$(document).ready(function() {
262
+  Documentation.init();
263
+});

BIN
_static/down-pressed.png Dosyayı Görüntüle


BIN
_static/down.png Dosyayı Görüntüle


BIN
_static/file.png Dosyayı Görüntüle


BIN
_static/img/searx_logo_small.png Dosyayı Görüntüle


+ 10308
- 0
_static/jquery-1.11.1.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 4
- 0
_static/jquery.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


BIN
_static/minus.png Dosyayı Görüntüle


BIN
_static/plus.png Dosyayı Görüntüle


+ 63
- 0
_static/pygments.css Dosyayı Görüntüle

@@ -0,0 +1,63 @@
1
+.highlight .hll { background-color: #ffffcc }
2
+.highlight  { background: #eeffcc; }
3
+.highlight .c { color: #408090; font-style: italic } /* Comment */
4
+.highlight .err { border: 1px solid #FF0000 } /* Error */
5
+.highlight .k { color: #007020; font-weight: bold } /* Keyword */
6
+.highlight .o { color: #666666 } /* Operator */
7
+.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
8
+.highlight .cp { color: #007020 } /* Comment.Preproc */
9
+.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
10
+.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
11
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
12
+.highlight .ge { font-style: italic } /* Generic.Emph */
13
+.highlight .gr { color: #FF0000 } /* Generic.Error */
14
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
15
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
16
+.highlight .go { color: #333333 } /* Generic.Output */
17
+.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
18
+.highlight .gs { font-weight: bold } /* Generic.Strong */
19
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
20
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
21
+.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
22
+.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
23
+.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
24
+.highlight .kp { color: #007020 } /* Keyword.Pseudo */
25
+.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
26
+.highlight .kt { color: #902000 } /* Keyword.Type */
27
+.highlight .m { color: #208050 } /* Literal.Number */
28
+.highlight .s { color: #4070a0 } /* Literal.String */
29
+.highlight .na { color: #4070a0 } /* Name.Attribute */
30
+.highlight .nb { color: #007020 } /* Name.Builtin */
31
+.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
32
+.highlight .no { color: #60add5 } /* Name.Constant */
33
+.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
34
+.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
35
+.highlight .ne { color: #007020 } /* Name.Exception */
36
+.highlight .nf { color: #06287e } /* Name.Function */
37
+.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
38
+.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
39
+.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
40
+.highlight .nv { color: #bb60d5 } /* Name.Variable */
41
+.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
42
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
43
+.highlight .mb { color: #208050 } /* Literal.Number.Bin */
44
+.highlight .mf { color: #208050 } /* Literal.Number.Float */
45
+.highlight .mh { color: #208050 } /* Literal.Number.Hex */
46
+.highlight .mi { color: #208050 } /* Literal.Number.Integer */
47
+.highlight .mo { color: #208050 } /* Literal.Number.Oct */
48
+.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
49
+.highlight .sc { color: #4070a0 } /* Literal.String.Char */
50
+.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
51
+.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
52
+.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
53
+.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
54
+.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
55
+.highlight .sx { color: #c65d09 } /* Literal.String.Other */
56
+.highlight .sr { color: #235388 } /* Literal.String.Regex */
57
+.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
58
+.highlight .ss { color: #517918 } /* Literal.String.Symbol */
59
+.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
60
+.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
61
+.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
62
+.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
63
+.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */

+ 622
- 0
_static/searchtools.js Dosyayı Görüntüle

@@ -0,0 +1,622 @@
1
+/*
2
+ * searchtools.js_t
3
+ * ~~~~~~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilties for the full-text search.
6
+ *
7
+ * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+
13
+/**
14
+ * Porter Stemmer
15
+ */
16
+var Stemmer = function() {
17
+
18
+  var step2list = {
19
+    ational: 'ate',
20
+    tional: 'tion',
21
+    enci: 'ence',
22
+    anci: 'ance',
23
+    izer: 'ize',
24
+    bli: 'ble',
25
+    alli: 'al',
26
+    entli: 'ent',
27
+    eli: 'e',
28
+    ousli: 'ous',
29
+    ization: 'ize',
30
+    ation: 'ate',
31
+    ator: 'ate',
32
+    alism: 'al',
33
+    iveness: 'ive',
34
+    fulness: 'ful',
35
+    ousness: 'ous',
36
+    aliti: 'al',
37
+    iviti: 'ive',
38
+    biliti: 'ble',
39
+    logi: 'log'
40
+  };
41
+
42
+  var step3list = {
43
+    icate: 'ic',
44
+    ative: '',
45
+    alize: 'al',
46
+    iciti: 'ic',
47
+    ical: 'ic',
48
+    ful: '',
49
+    ness: ''
50
+  };
51
+
52
+  var c = "[^aeiou]";          // consonant
53
+  var v = "[aeiouy]";          // vowel
54
+  var C = c + "[^aeiouy]*";    // consonant sequence
55
+  var V = v + "[aeiou]*";      // vowel sequence
56
+
57
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
58
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
59
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
60
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
61
+
62
+  this.stemWord = function (w) {
63
+    var stem;
64
+    var suffix;
65
+    var firstch;
66
+    var origword = w;
67
+
68
+    if (w.length < 3)
69
+      return w;
70
+
71
+    var re;
72
+    var re2;
73
+    var re3;
74
+    var re4;
75
+
76
+    firstch = w.substr(0,1);
77
+    if (firstch == "y")
78
+      w = firstch.toUpperCase() + w.substr(1);
79
+
80
+    // Step 1a
81
+    re = /^(.+?)(ss|i)es$/;
82
+    re2 = /^(.+?)([^s])s$/;
83
+
84
+    if (re.test(w))
85
+      w = w.replace(re,"$1$2");
86
+    else if (re2.test(w))
87
+      w = w.replace(re2,"$1$2");
88
+
89
+    // Step 1b
90
+    re = /^(.+?)eed$/;
91
+    re2 = /^(.+?)(ed|ing)$/;
92
+    if (re.test(w)) {
93
+      var fp = re.exec(w);
94
+      re = new RegExp(mgr0);
95
+      if (re.test(fp[1])) {
96
+        re = /.$/;
97
+        w = w.replace(re,"");
98
+      }
99
+    }
100
+    else if (re2.test(w)) {
101
+      var fp = re2.exec(w);
102
+      stem = fp[1];
103
+      re2 = new RegExp(s_v);
104
+      if (re2.test(stem)) {
105
+        w = stem;
106
+        re2 = /(at|bl|iz)$/;
107
+        re3 = new RegExp("([^aeiouylsz])\\1$");
108
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
109
+        if (re2.test(w))
110
+          w = w + "e";
111
+        else if (re3.test(w)) {
112
+          re = /.$/;
113
+          w = w.replace(re,"");
114
+        }
115
+        else if (re4.test(w))
116
+          w = w + "e";
117
+      }
118
+    }
119
+
120
+    // Step 1c
121
+    re = /^(.+?)y$/;
122
+    if (re.test(w)) {
123
+      var fp = re.exec(w);
124
+      stem = fp[1];
125
+      re = new RegExp(s_v);
126
+      if (re.test(stem))
127
+        w = stem + "i";
128
+    }
129
+
130
+    // Step 2
131
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
132
+    if (re.test(w)) {
133
+      var fp = re.exec(w);
134
+      stem = fp[1];
135
+      suffix = fp[2];
136
+      re = new RegExp(mgr0);
137
+      if (re.test(stem))
138
+        w = stem + step2list[suffix];
139
+    }
140
+
141
+    // Step 3
142
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
143
+    if (re.test(w)) {
144
+      var fp = re.exec(w);
145
+      stem = fp[1];
146
+      suffix = fp[2];
147
+      re = new RegExp(mgr0);
148
+      if (re.test(stem))
149
+        w = stem + step3list[suffix];
150
+    }
151
+
152
+    // Step 4
153
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
154
+    re2 = /^(.+?)(s|t)(ion)$/;
155
+    if (re.test(w)) {
156
+      var fp = re.exec(w);
157
+      stem = fp[1];
158
+      re = new RegExp(mgr1);
159
+      if (re.test(stem))
160
+        w = stem;
161
+    }
162
+    else if (re2.test(w)) {
163
+      var fp = re2.exec(w);
164
+      stem = fp[1] + fp[2];
165
+      re2 = new RegExp(mgr1);
166
+      if (re2.test(stem))
167
+        w = stem;
168
+    }
169
+
170
+    // Step 5
171
+    re = /^(.+?)e$/;
172
+    if (re.test(w)) {
173
+      var fp = re.exec(w);
174
+      stem = fp[1];
175
+      re = new RegExp(mgr1);
176
+      re2 = new RegExp(meq1);
177
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
178
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
179
+        w = stem;
180
+    }
181
+    re = /ll$/;
182
+    re2 = new RegExp(mgr1);
183
+    if (re.test(w) && re2.test(w)) {
184
+      re = /.$/;
185
+      w = w.replace(re,"");
186
+    }
187
+
188
+    // and turn initial Y back to y
189
+    if (firstch == "y")
190
+      w = firstch.toLowerCase() + w.substr(1);
191
+    return w;
192
+  }
193
+}
194
+
195
+
196
+
197
+/**
198
+ * Simple result scoring code.
199
+ */
200
+var Scorer = {
201
+  // Implement the following function to further tweak the score for each result
202
+  // The function takes a result array [filename, title, anchor, descr, score]
203
+  // and returns the new score.
204
+  /*
205
+  score: function(result) {
206
+    return result[4];
207
+  },
208
+  */
209
+
210
+  // query matches the full name of an object
211
+  objNameMatch: 11,
212
+  // or matches in the last dotted part of the object name
213
+  objPartialMatch: 6,
214
+  // Additive scores depending on the priority of the object
215
+  objPrio: {0:  15,   // used to be importantResults
216
+            1:  5,   // used to be objectResults
217
+            2: -5},  // used to be unimportantResults
218
+  //  Used when the priority is not in the mapping.
219
+  objPrioDefault: 0,
220
+
221
+  // query found in title
222
+  title: 15,
223
+  // query found in terms
224
+  term: 5
225
+};
226
+
227
+
228
+/**
229
+ * Search Module
230
+ */
231
+var Search = {
232
+
233
+  _index : null,
234
+  _queued_query : null,
235
+  _pulse_status : -1,
236
+
237
+  init : function() {
238
+      var params = $.getQueryParameters();
239
+      if (params.q) {
240
+          var query = params.q[0];
241
+          $('input[name="q"]')[0].value = query;
242
+          this.performSearch(query);
243
+      }
244
+  },
245
+
246
+  loadIndex : function(url) {
247
+    $.ajax({type: "GET", url: url, data: null,
248
+            dataType: "script", cache: true,
249
+            complete: function(jqxhr, textstatus) {
250
+              if (textstatus != "success") {
251
+                document.getElementById("searchindexloader").src = url;
252
+              }
253
+            }});
254
+  },
255
+
256
+  setIndex : function(index) {
257
+    var q;
258
+    this._index = index;
259
+    if ((q = this._queued_query) !== null) {
260
+      this._queued_query = null;
261
+      Search.query(q);
262
+    }
263
+  },
264
+
265
+  hasIndex : function() {
266
+      return this._index !== null;
267
+  },
268
+
269
+  deferQuery : function(query) {
270
+      this._queued_query = query;
271
+  },
272
+
273
+  stopPulse : function() {
274
+      this._pulse_status = 0;
275
+  },
276
+
277
+  startPulse : function() {
278
+    if (this._pulse_status >= 0)
279
+        return;
280
+    function pulse() {
281
+      var i;
282
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
283
+      var dotString = '';
284
+      for (i = 0; i < Search._pulse_status; i++)
285
+        dotString += '.';
286
+      Search.dots.text(dotString);
287
+      if (Search._pulse_status > -1)
288
+        window.setTimeout(pulse, 500);
289
+    }
290
+    pulse();
291
+  },
292
+
293
+  /**
294
+   * perform a search for something (or wait until index is loaded)
295
+   */
296
+  performSearch : function(query) {
297
+    // create the required interface elements
298
+    this.out = $('#search-results');
299
+    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
300
+    this.dots = $('<span></span>').appendTo(this.title);
301
+    this.status = $('<p style="display: none"></p>').appendTo(this.out);
302
+    this.output = $('<ul class="search"/>').appendTo(this.out);
303
+
304
+    $('#search-progress').text(_('Preparing search...'));
305
+    this.startPulse();
306
+
307
+    // index already loaded, the browser was quick!
308
+    if (this.hasIndex())
309
+      this.query(query);
310
+    else
311
+      this.deferQuery(query);
312
+  },
313
+
314
+  /**
315
+   * execute search (requires search index to be loaded)
316
+   */
317
+  query : function(query) {
318
+    var i;
319
+    var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
320
+
321
+    // stem the searchterms and add them to the correct list
322
+    var stemmer = new Stemmer();
323
+    var searchterms = [];
324
+    var excluded = [];
325
+    var hlterms = [];
326
+    var tmp = query.split(/\s+/);
327
+    var objectterms = [];
328
+    for (i = 0; i < tmp.length; i++) {
329
+      if (tmp[i] !== "") {
330
+          objectterms.push(tmp[i].toLowerCase());
331
+      }
332
+
333
+      if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
334
+          tmp[i] === "") {
335
+        // skip this "word"
336
+        continue;
337
+      }
338
+      // stem the word
339
+      var word = stemmer.stemWord(tmp[i].toLowerCase());
340
+      var toAppend;
341
+      // select the correct list
342
+      if (word[0] == '-') {
343
+        toAppend = excluded;
344
+        word = word.substr(1);
345
+      }
346
+      else {
347
+        toAppend = searchterms;
348
+        hlterms.push(tmp[i].toLowerCase());
349
+      }
350
+      // only add if not already in the list
351
+      if (!$u.contains(toAppend, word))
352
+        toAppend.push(word);
353
+    }
354
+    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
355
+
356
+    // console.debug('SEARCH: searching for:');
357
+    // console.info('required: ', searchterms);
358
+    // console.info('excluded: ', excluded);
359
+
360
+    // prepare search
361
+    var terms = this._index.terms;
362
+    var titleterms = this._index.titleterms;
363
+
364
+    // array of [filename, title, anchor, descr, score]
365
+    var results = [];
366
+    $('#search-progress').empty();
367
+
368
+    // lookup as object
369
+    for (i = 0; i < objectterms.length; i++) {
370
+      var others = [].concat(objectterms.slice(0, i),
371
+                             objectterms.slice(i+1, objectterms.length));
372
+      results = results.concat(this.performObjectSearch(objectterms[i], others));
373
+    }
374
+
375
+    // lookup as search terms in fulltext
376
+    results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
377
+                     .concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
378
+
379
+    // let the scorer override scores with a custom scoring function
380
+    if (Scorer.score) {
381
+      for (i = 0; i < results.length; i++)
382
+        results[i][4] = Scorer.score(results[i]);
383
+    }
384
+
385
+    // now sort the results by score (in opposite order of appearance, since the
386
+    // display function below uses pop() to retrieve items) and then
387
+    // alphabetically
388
+    results.sort(function(a, b) {
389
+      var left = a[4];
390
+      var right = b[4];
391
+      if (left > right) {
392
+        return 1;
393
+      } else if (left < right) {
394
+        return -1;
395
+      } else {
396
+        // same score: sort alphabetically
397
+        left = a[1].toLowerCase();
398
+        right = b[1].toLowerCase();
399
+        return (left > right) ? -1 : ((left < right) ? 1 : 0);
400
+      }
401
+    });
402
+
403
+    // for debugging
404
+    //Search.lastresults = results.slice();  // a copy
405
+    //console.info('search results:', Search.lastresults);
406
+
407
+    // print the results
408
+    var resultCount = results.length;
409
+    function displayNextItem() {
410
+      // results left, load the summary and display it
411
+      if (results.length) {
412
+        var item = results.pop();
413
+        var listItem = $('<li style="display:none"></li>');
414
+        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
415
+          // dirhtml builder
416
+          var dirname = item[0] + '/';
417
+          if (dirname.match(/\/index\/$/)) {
418
+            dirname = dirname.substring(0, dirname.length-6);
419
+          } else if (dirname == 'index/') {
420
+            dirname = '';
421
+          }
422
+          listItem.append($('<a/>').attr('href',
423
+            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
424
+            highlightstring + item[2]).html(item[1]));
425
+        } else {
426
+          // normal html builders
427
+          listItem.append($('<a/>').attr('href',
428
+            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
429
+            highlightstring + item[2]).html(item[1]));
430
+        }
431
+        if (item[3]) {
432
+          listItem.append($('<span> (' + item[3] + ')</span>'));
433
+          Search.output.append(listItem);
434
+          listItem.slideDown(5, function() {
435
+            displayNextItem();
436
+          });
437
+        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
438
+          $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
439
+                  dataType: "text",
440
+                  complete: function(jqxhr, textstatus) {
441
+                    var data = jqxhr.responseText;
442
+                    if (data !== '' && data !== undefined) {
443
+                      listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
444
+                    }
445
+                    Search.output.append(listItem);
446
+                    listItem.slideDown(5, function() {
447
+                      displayNextItem();
448
+                    });
449
+                  }});
450
+        } else {
451
+          // no source available, just display title
452
+          Search.output.append(listItem);
453
+          listItem.slideDown(5, function() {
454
+            displayNextItem();
455
+          });
456
+        }
457
+      }
458
+      // search finished, update title and status message
459
+      else {
460
+        Search.stopPulse();
461
+        Search.title.text(_('Search Results'));
462
+        if (!resultCount)
463
+          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
464
+        else
465
+            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
466
+        Search.status.fadeIn(500);
467
+      }
468
+    }
469
+    displayNextItem();
470
+  },
471
+
472
+  /**
473
+   * search for object names
474
+   */
475
+  performObjectSearch : function(object, otherterms) {
476
+    var filenames = this._index.filenames;
477
+    var objects = this._index.objects;
478
+    var objnames = this._index.objnames;
479
+    var titles = this._index.titles;
480
+
481
+    var i;
482
+    var results = [];
483
+
484
+    for (var prefix in objects) {
485
+      for (var name in objects[prefix]) {
486
+        var fullname = (prefix ? prefix + '.' : '') + name;
487
+        if (fullname.toLowerCase().indexOf(object) > -1) {
488
+          var score = 0;
489
+          var parts = fullname.split('.');
490
+          // check for different match types: exact matches of full name or
491
+          // "last name" (i.e. last dotted part)
492
+          if (fullname == object || parts[parts.length - 1] == object) {
493
+            score += Scorer.objNameMatch;
494
+          // matches in last name
495
+          } else if (parts[parts.length - 1].indexOf(object) > -1) {
496
+            score += Scorer.objPartialMatch;
497
+          }
498
+          var match = objects[prefix][name];
499
+          var objname = objnames[match[1]][2];
500
+          var title = titles[match[0]];
501
+          // If more than one term searched for, we require other words to be
502
+          // found in the name/title/description
503
+          if (otherterms.length > 0) {
504
+            var haystack = (prefix + ' ' + name + ' ' +
505
+                            objname + ' ' + title).toLowerCase();
506
+            var allfound = true;
507
+            for (i = 0; i < otherterms.length; i++) {
508
+              if (haystack.indexOf(otherterms[i]) == -1) {
509
+                allfound = false;
510
+                break;
511
+              }
512
+            }
513
+            if (!allfound) {
514
+              continue;
515
+            }
516
+          }
517
+          var descr = objname + _(', in ') + title;
518
+
519
+          var anchor = match[3];
520
+          if (anchor === '')
521
+            anchor = fullname;
522
+          else if (anchor == '-')
523
+            anchor = objnames[match[1]][1] + '-' + fullname;
524
+          // add custom score for some objects according to scorer
525
+          if (Scorer.objPrio.hasOwnProperty(match[2])) {
526
+            score += Scorer.objPrio[match[2]];
527
+          } else {
528
+            score += Scorer.objPrioDefault;
529
+          }
530
+          results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
531
+        }
532
+      }
533
+    }
534
+
535
+    return results;
536
+  },
537
+
538
+  /**
539
+   * search for full-text terms in the index
540
+   */
541
+  performTermsSearch : function(searchterms, excluded, terms, score) {
542
+    var filenames = this._index.filenames;
543
+    var titles = this._index.titles;
544
+
545
+    var i, j, file, files;
546
+    var fileMap = {};
547
+    var results = [];
548
+
549
+    // perform the search on the required terms
550
+    for (i = 0; i < searchterms.length; i++) {
551
+      var word = searchterms[i];
552
+      // no match but word was a required one
553
+      if ((files = terms[word]) === undefined)
554
+        break;
555
+      if (files.length === undefined) {
556
+        files = [files];
557
+      }
558
+      // create the mapping
559
+      for (j = 0; j < files.length; j++) {
560
+        file = files[j];
561
+        if (file in fileMap)
562
+          fileMap[file].push(word);
563
+        else
564
+          fileMap[file] = [word];
565
+      }
566
+    }
567
+
568
+    // now check if the files don't contain excluded terms
569
+    for (file in fileMap) {
570
+      var valid = true;
571
+
572
+      // check if all requirements are matched
573
+      if (fileMap[file].length != searchterms.length)
574
+          continue;
575
+
576
+      // ensure that none of the excluded terms is in the search result
577
+      for (i = 0; i < excluded.length; i++) {
578
+        if (terms[excluded[i]] == file ||
579
+          $u.contains(terms[excluded[i]] || [], file)) {
580
+          valid = false;
581
+          break;
582
+        }
583
+      }
584
+
585
+      // if we have still a valid result we can add it to the result list
586
+      if (valid) {
587
+        results.push([filenames[file], titles[file], '', null, score]);
588
+      }
589
+    }
590
+    return results;
591
+  },
592
+
593
+  /**
594
+   * helper function to return a node containing the
595
+   * search summary for a given text. keywords is a list
596
+   * of stemmed words, hlwords is the list of normal, unstemmed
597
+   * words. the first one is used to find the occurance, the
598
+   * latter for highlighting it.
599
+   */
600
+  makeSearchSummary : function(text, keywords, hlwords) {
601
+    var textLower = text.toLowerCase();
602
+    var start = 0;
603
+    $.each(keywords, function() {
604
+      var i = textLower.indexOf(this.toLowerCase());
605
+      if (i > -1)
606
+        start = i;
607
+    });
608
+    start = Math.max(start - 120, 0);
609
+    var excerpt = ((start > 0) ? '...' : '') +
610
+      $.trim(text.substr(start, 240)) +
611
+      ((start + 240 - text.length) ? '...' : '');
612
+    var rv = $('<div class="context"></div>').text(excerpt);
613
+    $.each(hlwords, function() {
614
+      rv = rv.highlightText(this, 'highlighted');
615
+    });
616
+    return rv;
617
+  }
618
+};
619
+
620
+$(document).ready(function() {
621
+  Search.init();
622
+});

+ 441
- 0
_static/style.css Dosyayı Görüntüle

@@ -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
+
10
+
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: 940px;
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 220px;
37
+}
38
+
39
+div.sphinxsidebar {
40
+    width: 220px;
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: 940px;
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
+}

+ 999
- 0
_static/underscore-1.3.1.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 31
- 0
_static/underscore.js Dosyayı Görüntüle

@@ -0,0 +1,31 @@
1
+// Underscore.js 1.3.1
2
+// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3
+// Underscore is freely distributable under the MIT license.
4
+// Portions of Underscore are inspired or borrowed from Prototype,
5
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
6
+// For all details and documentation:
7
+// http://documentcloud.github.com/underscore
8
+(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
9
+c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
10
+h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
11
+b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
12
+null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
13
+function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
14
+e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
15
+function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
16
+return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
17
+c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
18
+b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
19
+return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
20
+d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
21
+var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
22
+c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
23
+a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
24
+b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
25
+1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
26
+b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
27
+b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.mixin=function(a){j(b.functions(a),
28
+function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
29
+u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
30
+function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
31
+true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);

BIN
_static/up-pressed.png Dosyayı Görüntüle


BIN
_static/up.png Dosyayı Görüntüle


+ 808
- 0
_static/websupport.js Dosyayı Görüntüle

@@ -0,0 +1,808 @@
1
+/*
2
+ * websupport.js
3
+ * ~~~~~~~~~~~~~
4
+ *
5
+ * sphinx.websupport utilties for all documentation.
6
+ *
7
+ * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+(function($) {
13
+  $.fn.autogrow = function() {
14
+    return this.each(function() {
15
+    var textarea = this;
16
+
17
+    $.fn.autogrow.resize(textarea);
18
+
19
+    $(textarea)
20
+      .focus(function() {
21
+        textarea.interval = setInterval(function() {
22
+          $.fn.autogrow.resize(textarea);
23
+        }, 500);
24
+      })
25
+      .blur(function() {
26
+        clearInterval(textarea.interval);
27
+      });
28
+    });
29
+  };
30
+
31
+  $.fn.autogrow.resize = function(textarea) {
32
+    var lineHeight = parseInt($(textarea).css('line-height'), 10);
33
+    var lines = textarea.value.split('\n');
34
+    var columns = textarea.cols;
35
+    var lineCount = 0;
36
+    $.each(lines, function() {
37
+      lineCount += Math.ceil(this.length / columns) || 1;
38
+    });
39
+    var height = lineHeight * (lineCount + 1);
40
+    $(textarea).css('height', height);
41
+  };
42
+})(jQuery);
43
+
44
+(function($) {
45
+  var comp, by;
46
+
47
+  function init() {
48
+    initEvents();
49
+    initComparator();
50
+  }
51
+
52
+  function initEvents() {
53
+    $(document).on("click", 'a.comment-close', function(event) {
54
+      event.preventDefault();
55
+      hide($(this).attr('id').substring(2));
56
+    });
57
+    $(document).on("click", 'a.vote', function(event) {
58
+      event.preventDefault();
59
+      handleVote($(this));
60
+    });
61
+    $(document).on("click", 'a.reply', function(event) {
62
+      event.preventDefault();
63
+      openReply($(this).attr('id').substring(2));
64
+    });
65
+    $(document).on("click", 'a.close-reply', function(event) {
66
+      event.preventDefault();
67
+      closeReply($(this).attr('id').substring(2));
68
+    });
69
+    $(document).on("click", 'a.sort-option', function(event) {
70
+      event.preventDefault();
71
+      handleReSort($(this));
72
+    });
73
+    $(document).on("click", 'a.show-proposal', function(event) {
74
+      event.preventDefault();
75
+      showProposal($(this).attr('id').substring(2));
76
+    });
77
+    $(document).on("click", 'a.hide-proposal', function(event) {
78
+      event.preventDefault();
79
+      hideProposal($(this).attr('id').substring(2));
80
+    });
81
+    $(document).on("click", 'a.show-propose-change', function(event) {
82
+      event.preventDefault();
83
+      showProposeChange($(this).attr('id').substring(2));
84
+    });
85
+    $(document).on("click", 'a.hide-propose-change', function(event) {
86
+      event.preventDefault();
87
+      hideProposeChange($(this).attr('id').substring(2));
88
+    });
89
+    $(document).on("click", 'a.accept-comment', function(event) {
90
+      event.preventDefault();
91
+      acceptComment($(this).attr('id').substring(2));
92
+    });
93
+    $(document).on("click", 'a.delete-comment', function(event) {
94
+      event.preventDefault();
95
+      deleteComment($(this).attr('id').substring(2));
96
+    });
97
+    $(document).on("click", 'a.comment-markup', function(event) {
98
+      event.preventDefault();
99
+      toggleCommentMarkupBox($(this).attr('id').substring(2));
100
+    });
101
+  }
102
+
103
+  /**
104
+   * Set comp, which is a comparator function used for sorting and
105
+   * inserting comments into the list.
106
+   */
107
+  function setComparator() {
108
+    // If the first three letters are "asc", sort in ascending order
109
+    // and remove the prefix.
110
+    if (by.substring(0,3) == 'asc') {
111
+      var i = by.substring(3);
112
+      comp = function(a, b) { return a[i] - b[i]; };
113
+    } else {
114
+      // Otherwise sort in descending order.
115
+      comp = function(a, b) { return b[by] - a[by]; };
116
+    }
117
+
118
+    // Reset link styles and format the selected sort option.
119
+    $('a.sel').attr('href', '#').removeClass('sel');
120
+    $('a.by' + by).removeAttr('href').addClass('sel');
121
+  }
122
+
123
+  /**
124
+   * Create a comp function. If the user has preferences stored in
125
+   * the sortBy cookie, use those, otherwise use the default.
126
+   */
127
+  function initComparator() {
128
+    by = 'rating'; // Default to sort by rating.
129
+    // If the sortBy cookie is set, use that instead.
130
+    if (document.cookie.length > 0) {
131
+      var start = document.cookie.indexOf('sortBy=');
132
+      if (start != -1) {
133
+        start = start + 7;
134
+        var end = document.cookie.indexOf(";", start);
135
+        if (end == -1) {
136
+          end = document.cookie.length;
137
+          by = unescape(document.cookie.substring(start, end));
138
+        }
139
+      }
140
+    }
141
+    setComparator();
142
+  }
143
+
144
+  /**
145
+   * Show a comment div.
146
+   */
147
+  function show(id) {
148
+    $('#ao' + id).hide();
149
+    $('#ah' + id).show();
150
+    var context = $.extend({id: id}, opts);
151
+    var popup = $(renderTemplate(popupTemplate, context)).hide();
152
+    popup.find('textarea[name="proposal"]').hide();
153
+    popup.find('a.by' + by).addClass('sel');
154
+    var form = popup.find('#cf' + id);
155
+    form.submit(function(event) {
156
+      event.preventDefault();
157
+      addComment(form);
158
+    });
159
+    $('#s' + id).after(popup);
160
+    popup.slideDown('fast', function() {
161
+      getComments(id);
162
+    });
163
+  }
164
+
165
+  /**
166
+   * Hide a comment div.
167
+   */
168
+  function hide(id) {
169
+    $('#ah' + id).hide();
170
+    $('#ao' + id).show();
171
+    var div = $('#sc' + id);
172
+    div.slideUp('fast', function() {
173
+      div.remove();
174
+    });
175
+  }
176
+
177
+  /**
178
+   * Perform an ajax request to get comments for a node
179
+   * and insert the comments into the comments tree.
180
+   */
181
+  function getComments(id) {
182
+    $.ajax({
183
+     type: 'GET',
184
+     url: opts.getCommentsURL,
185
+     data: {node: id},
186
+     success: function(data, textStatus, request) {
187
+       var ul = $('#cl' + id);
188
+       var speed = 100;
189
+       $('#cf' + id)
190
+         .find('textarea[name="proposal"]')
191
+         .data('source', data.source);
192
+
193
+       if (data.comments.length === 0) {
194
+         ul.html('<li>No comments yet.</li>');
195
+         ul.data('empty', true);
196
+       } else {
197
+         // If there are comments, sort them and put them in the list.
198
+         var comments = sortComments(data.comments);
199
+         speed = data.comments.length * 100;
200
+         appendComments(comments, ul);
201
+         ul.data('empty', false);
202
+       }
203
+       $('#cn' + id).slideUp(speed + 200);
204
+       ul.slideDown(speed);
205
+     },
206
+     error: function(request, textStatus, error) {
207
+       showError('Oops, there was a problem retrieving the comments.');
208
+     },
209
+     dataType: 'json'
210
+    });
211
+  }
212
+
213
+  /**
214
+   * Add a comment via ajax and insert the comment into the comment tree.
215
+   */
216
+  function addComment(form) {
217
+    var node_id = form.find('input[name="node"]').val();
218
+    var parent_id = form.find('input[name="parent"]').val();
219
+    var text = form.find('textarea[name="comment"]').val();
220
+    var proposal = form.find('textarea[name="proposal"]').val();
221
+
222
+    if (text == '') {
223
+      showError('Please enter a comment.');
224
+      return;
225
+    }
226
+
227
+    // Disable the form that is being submitted.
228
+    form.find('textarea,input').attr('disabled', 'disabled');
229
+
230
+    // Send the comment to the server.
231
+    $.ajax({
232
+      type: "POST",
233
+      url: opts.addCommentURL,
234
+      dataType: 'json',
235
+      data: {
236
+        node: node_id,
237
+        parent: parent_id,
238
+        text: text,
239
+        proposal: proposal
240
+      },
241
+      success: function(data, textStatus, error) {
242
+        // Reset the form.
243
+        if (node_id) {
244
+          hideProposeChange(node_id);
245
+        }
246
+        form.find('textarea')
247
+          .val('')
248
+          .add(form.find('input'))
249
+          .removeAttr('disabled');
250
+	var ul = $('#cl' + (node_id || parent_id));
251
+        if (ul.data('empty')) {
252
+          $(ul).empty();
253
+          ul.data('empty', false);
254
+        }
255
+        insertComment(data.comment);
256
+        var ao = $('#ao' + node_id);
257
+        ao.find('img').attr({'src': opts.commentBrightImage});
258
+        if (node_id) {
259
+          // if this was a "root" comment, remove the commenting box
260
+          // (the user can get it back by reopening the comment popup)
261
+          $('#ca' + node_id).slideUp();
262
+        }
263
+      },
264
+      error: function(request, textStatus, error) {
265
+        form.find('textarea,input').removeAttr('disabled');
266
+        showError('Oops, there was a problem adding the comment.');
267
+      }
268
+    });
269
+  }
270
+
271
+  /**
272
+   * Recursively append comments to the main comment list and children
273
+   * lists, creating the comment tree.
274
+   */
275
+  function appendComments(comments, ul) {
276
+    $.each(comments, function() {
277
+      var div = createCommentDiv(this);
278
+      ul.append($(document.createElement('li')).html(div));
279
+      appendComments(this.children, div.find('ul.comment-children'));
280
+      // To avoid stagnating data, don't store the comments children in data.
281
+      this.children = null;
282
+      div.data('comment', this);
283
+    });
284
+  }
285
+
286
+  /**
287
+   * After adding a new comment, it must be inserted in the correct
288
+   * location in the comment tree.
289
+   */
290
+  function insertComment(comment) {
291
+    var div = createCommentDiv(comment);
292
+
293
+    // To avoid stagnating data, don't store the comments children in data.
294
+    comment.children = null;
295
+    div.data('comment', comment);
296
+
297
+    var ul = $('#cl' + (comment.node || comment.parent));
298
+    var siblings = getChildren(ul);
299
+
300
+    var li = $(document.createElement('li'));
301
+    li.hide();
302
+
303
+    // Determine where in the parents children list to insert this comment.
304
+    for(i=0; i < siblings.length; i++) {
305
+      if (comp(comment, siblings[i]) <= 0) {
306
+        $('#cd' + siblings[i].id)
307
+          .parent()
308
+          .before(li.html(div));
309
+        li.slideDown('fast');
310
+        return;
311
+      }
312
+    }
313
+
314
+    // If we get here, this comment rates lower than all the others,
315
+    // or it is the only comment in the list.
316
+    ul.append(li.html(div));
317
+    li.slideDown('fast');
318
+  }
319
+
320
+  function acceptComment(id) {
321
+    $.ajax({
322
+      type: 'POST',
323
+      url: opts.acceptCommentURL,
324
+      data: {id: id},
325
+      success: function(data, textStatus, request) {
326
+        $('#cm' + id).fadeOut('fast');
327
+        $('#cd' + id).removeClass('moderate');
328
+      },
329
+      error: function(request, textStatus, error) {
330
+        showError('Oops, there was a problem accepting the comment.');
331
+      }
332
+    });
333
+  }
334
+
335
+  function deleteComment(id) {
336
+    $.ajax({
337
+      type: 'POST',
338
+      url: opts.deleteCommentURL,
339
+      data: {id: id},
340
+      success: function(data, textStatus, request) {
341
+        var div = $('#cd' + id);
342
+        if (data == 'delete') {
343
+          // Moderator mode: remove the comment and all children immediately
344
+          div.slideUp('fast', function() {
345
+            div.remove();
346
+          });
347
+          return;
348
+        }
349
+        // User mode: only mark the comment as deleted
350
+        div
351
+          .find('span.user-id:first')
352
+          .text('[deleted]').end()
353
+          .find('div.comment-text:first')
354
+          .text('[deleted]').end()
355
+          .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
356
+                ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
357
+          .remove();
358
+        var comment = div.data('comment');
359
+        comment.username = '[deleted]';
360
+        comment.text = '[deleted]';
361
+        div.data('comment', comment);
362
+      },
363
+      error: function(request, textStatus, error) {
364
+        showError('Oops, there was a problem deleting the comment.');
365
+      }
366
+    });
367
+  }
368
+
369
+  function showProposal(id) {
370
+    $('#sp' + id).hide();
371
+    $('#hp' + id).show();
372
+    $('#pr' + id).slideDown('fast');
373
+  }
374
+
375
+  function hideProposal(id) {
376
+    $('#hp' + id).hide();
377
+    $('#sp' + id).show();
378
+    $('#pr' + id).slideUp('fast');
379
+  }
380
+
381
+  function showProposeChange(id) {
382
+    $('#pc' + id).hide();
383
+    $('#hc' + id).show();
384
+    var textarea = $('#pt' + id);
385
+    textarea.val(textarea.data('source'));
386
+    $.fn.autogrow.resize(textarea[0]);
387
+    textarea.slideDown('fast');
388
+  }
389
+
390
+  function hideProposeChange(id) {
391
+    $('#hc' + id).hide();
392
+    $('#pc' + id).show();
393
+    var textarea = $('#pt' + id);
394
+    textarea.val('').removeAttr('disabled');
395
+    textarea.slideUp('fast');
396
+  }
397
+
398
+  function toggleCommentMarkupBox(id) {
399
+    $('#mb' + id).toggle();
400
+  }
401
+
402
+  /** Handle when the user clicks on a sort by link. */
403
+  function handleReSort(link) {
404
+    var classes = link.attr('class').split(/\s+/);
405
+    for (var i=0; i<classes.length; i++) {
406
+      if (classes[i] != 'sort-option') {
407
+	by = classes[i].substring(2);
408
+      }
409
+    }
410
+    setComparator();
411
+    // Save/update the sortBy cookie.
412
+    var expiration = new Date();
413
+    expiration.setDate(expiration.getDate() + 365);
414
+    document.cookie= 'sortBy=' + escape(by) +
415
+                     ';expires=' + expiration.toUTCString();
416
+    $('ul.comment-ul').each(function(index, ul) {
417
+      var comments = getChildren($(ul), true);
418
+      comments = sortComments(comments);
419
+      appendComments(comments, $(ul).empty());
420
+    });
421
+  }
422
+
423
+  /**
424
+   * Function to process a vote when a user clicks an arrow.
425
+   */
426
+  function handleVote(link) {
427
+    if (!opts.voting) {
428
+      showError("You'll need to login to vote.");
429
+      return;
430
+    }
431
+
432
+    var id = link.attr('id');
433
+    if (!id) {
434
+      // Didn't click on one of the voting arrows.
435
+      return;
436
+    }
437
+    // If it is an unvote, the new vote value is 0,
438
+    // Otherwise it's 1 for an upvote, or -1 for a downvote.
439
+    var value = 0;
440
+    if (id.charAt(1) != 'u') {
441
+      value = id.charAt(0) == 'u' ? 1 : -1;
442
+    }
443
+    // The data to be sent to the server.
444
+    var d = {
445
+      comment_id: id.substring(2),
446
+      value: value
447
+    };
448
+
449
+    // Swap the vote and unvote links.
450
+    link.hide();
451
+    $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
452
+      .show();
453
+
454
+    // The div the comment is displayed in.
455
+    var div = $('div#cd' + d.comment_id);
456
+    var data = div.data('comment');
457
+
458
+    // If this is not an unvote, and the other vote arrow has
459
+    // already been pressed, unpress it.
460
+    if ((d.value !== 0) && (data.vote === d.value * -1)) {
461
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
462
+      $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
463
+    }
464
+
465
+    // Update the comments rating in the local data.
466
+    data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
467
+    data.vote = d.value;
468
+    div.data('comment', data);
469
+
470
+    // Change the rating text.
471
+    div.find('.rating:first')
472
+      .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
473
+
474
+    // Send the vote information to the server.
475
+    $.ajax({
476
+      type: "POST",
477
+      url: opts.processVoteURL,
478
+      data: d,
479
+      error: function(request, textStatus, error) {
480
+        showError('Oops, there was a problem casting that vote.');
481
+      }
482
+    });
483
+  }
484
+
485
+  /**
486
+   * Open a reply form used to reply to an existing comment.
487
+   */
488
+  function openReply(id) {
489
+    // Swap out the reply link for the hide link
490
+    $('#rl' + id).hide();
491
+    $('#cr' + id).show();
492
+
493
+    // Add the reply li to the children ul.
494
+    var div = $(renderTemplate(replyTemplate, {id: id})).hide();
495
+    $('#cl' + id)
496
+      .prepend(div)
497
+      // Setup the submit handler for the reply form.
498
+      .find('#rf' + id)
499
+      .submit(function(event) {
500
+        event.preventDefault();
501
+        addComment($('#rf' + id));
502
+        closeReply(id);
503
+      })
504
+      .find('input[type=button]')
505
+      .click(function() {
506
+        closeReply(id);
507
+      });
508
+    div.slideDown('fast', function() {
509
+      $('#rf' + id).find('textarea').focus();
510
+    });
511
+  }
512
+
513
+  /**
514
+   * Close the reply form opened with openReply.
515
+   */
516
+  function closeReply(id) {
517
+    // Remove the reply div from the DOM.
518
+    $('#rd' + id).slideUp('fast', function() {
519
+      $(this).remove();
520
+    });
521
+
522
+    // Swap out the hide link for the reply link
523
+    $('#cr' + id).hide();
524
+    $('#rl' + id).show();
525
+  }
526
+
527
+  /**
528
+   * Recursively sort a tree of comments using the comp comparator.
529
+   */
530
+  function sortComments(comments) {
531
+    comments.sort(comp);
532
+    $.each(comments, function() {
533
+      this.children = sortComments(this.children);
534
+    });
535
+    return comments;
536
+  }
537
+
538
+  /**
539
+   * Get the children comments from a ul. If recursive is true,
540
+   * recursively include childrens' children.
541
+   */
542
+  function getChildren(ul, recursive) {
543
+    var children = [];
544
+    ul.children().children("[id^='cd']")
545
+      .each(function() {
546
+        var comment = $(this).data('comment');
547
+        if (recursive)
548
+          comment.children = getChildren($(this).find('#cl' + comment.id), true);
549
+        children.push(comment);
550
+      });
551
+    return children;
552
+  }
553
+
554
+  /** Create a div to display a comment in. */
555
+  function createCommentDiv(comment) {
556
+    if (!comment.displayed && !opts.moderator) {
557
+      return $('<div class="moderate">Thank you!  Your comment will show up '
558
+               + 'once it is has been approved by a moderator.</div>');
559
+    }
560
+    // Prettify the comment rating.
561
+    comment.pretty_rating = comment.rating + ' point' +
562
+      (comment.rating == 1 ? '' : 's');
563
+    // Make a class (for displaying not yet moderated comments differently)
564
+    comment.css_class = comment.displayed ? '' : ' moderate';
565
+    // Create a div for this comment.
566
+    var context = $.extend({}, opts, comment);
567
+    var div = $(renderTemplate(commentTemplate, context));
568
+
569
+    // If the user has voted on this comment, highlight the correct arrow.
570
+    if (comment.vote) {
571
+      var direction = (comment.vote == 1) ? 'u' : 'd';
572
+      div.find('#' + direction + 'v' + comment.id).hide();
573
+      div.find('#' + direction + 'u' + comment.id).show();
574
+    }
575
+
576
+    if (opts.moderator || comment.text != '[deleted]') {
577
+      div.find('a.reply').show();
578
+      if (comment.proposal_diff)
579
+        div.find('#sp' + comment.id).show();
580
+      if (opts.moderator && !comment.displayed)
581
+        div.find('#cm' + comment.id).show();
582
+      if (opts.moderator || (opts.username == comment.username))
583
+        div.find('#dc' + comment.id).show();
584
+    }
585
+    return div;
586
+  }
587
+
588
+  /**
589
+   * A simple template renderer. Placeholders such as <%id%> are replaced
590
+   * by context['id'] with items being escaped. Placeholders such as <#id#>
591
+   * are not escaped.
592
+   */
593
+  function renderTemplate(template, context) {
594
+    var esc = $(document.createElement('div'));
595
+
596
+    function handle(ph, escape) {
597
+      var cur = context;
598
+      $.each(ph.split('.'), function() {
599
+        cur = cur[this];
600
+      });
601
+      return escape ? esc.text(cur || "").html() : cur;
602
+    }
603
+
604
+    return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
605
+      return handle(arguments[2], arguments[1] == '%' ? true : false);
606
+    });
607
+  }
608
+
609
+  /** Flash an error message briefly. */
610
+  function showError(message) {
611
+    $(document.createElement('div')).attr({'class': 'popup-error'})
612
+      .append($(document.createElement('div'))
613
+               .attr({'class': 'error-message'}).text(message))
614
+      .appendTo('body')
615
+      .fadeIn("slow")
616
+      .delay(2000)
617
+      .fadeOut("slow");
618
+  }
619
+
620
+  /** Add a link the user uses to open the comments popup. */
621
+  $.fn.comment = function() {
622
+    return this.each(function() {
623
+      var id = $(this).attr('id').substring(1);
624
+      var count = COMMENT_METADATA[id];
625
+      var title = count + ' comment' + (count == 1 ? '' : 's');
626
+      var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
627
+      var addcls = count == 0 ? ' nocomment' : '';
628
+      $(this)
629
+        .append(
630
+          $(document.createElement('a')).attr({
631
+            href: '#',
632
+            'class': 'sphinx-comment-open' + addcls,
633
+            id: 'ao' + id
634
+          })
635
+            .append($(document.createElement('img')).attr({
636
+              src: image,
637
+              alt: 'comment',
638
+              title: title
639
+            }))
640
+            .click(function(event) {
641
+              event.preventDefault();
642
+              show($(this).attr('id').substring(2));
643
+            })
644
+        )
645
+        .append(
646
+          $(document.createElement('a')).attr({
647
+            href: '#',
648
+            'class': 'sphinx-comment-close hidden',
649
+            id: 'ah' + id
650
+          })
651
+            .append($(document.createElement('img')).attr({
652
+              src: opts.closeCommentImage,
653
+              alt: 'close',
654
+              title: 'close'
655
+            }))
656
+            .click(function(event) {
657
+              event.preventDefault();
658
+              hide($(this).attr('id').substring(2));
659
+            })
660
+        );
661
+    });
662
+  };
663
+
664
+  var opts = {
665
+    processVoteURL: '/_process_vote',
666
+    addCommentURL: '/_add_comment',
667
+    getCommentsURL: '/_get_comments',
668
+    acceptCommentURL: '/_accept_comment',
669
+    deleteCommentURL: '/_delete_comment',
670
+    commentImage: '/static/_static/comment.png',
671
+    closeCommentImage: '/static/_static/comment-close.png',
672
+    loadingImage: '/static/_static/ajax-loader.gif',
673
+    commentBrightImage: '/static/_static/comment-bright.png',
674
+    upArrow: '/static/_static/up.png',
675
+    downArrow: '/static/_static/down.png',
676
+    upArrowPressed: '/static/_static/up-pressed.png',
677
+    downArrowPressed: '/static/_static/down-pressed.png',
678
+    voting: false,
679
+    moderator: false
680
+  };
681
+
682
+  if (typeof COMMENT_OPTIONS != "undefined") {
683
+    opts = jQuery.extend(opts, COMMENT_OPTIONS);
684
+  }
685
+
686
+  var popupTemplate = '\
687
+    <div class="sphinx-comments" id="sc<%id%>">\
688
+      <p class="sort-options">\
689
+        Sort by:\
690
+        <a href="#" class="sort-option byrating">best rated</a>\
691
+        <a href="#" class="sort-option byascage">newest</a>\
692
+        <a href="#" class="sort-option byage">oldest</a>\
693
+      </p>\
694
+      <div class="comment-header">Comments</div>\
695
+      <div class="comment-loading" id="cn<%id%>">\
696
+        loading comments... <img src="<%loadingImage%>" alt="" /></div>\
697
+      <ul id="cl<%id%>" class="comment-ul"></ul>\
698
+      <div id="ca<%id%>">\
699
+      <p class="add-a-comment">Add a comment\
700
+        (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
701
+      <div class="comment-markup-box" id="mb<%id%>">\
702
+        reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
703
+        <code>``code``</code>, \
704
+        code blocks: <code>::</code> and an indented block after blank line</div>\
705
+      <form method="post" id="cf<%id%>" class="comment-form" action="">\
706
+        <textarea name="comment" cols="80"></textarea>\
707
+        <p class="propose-button">\
708
+          <a href="#" id="pc<%id%>" class="show-propose-change">\
709
+            Propose a change &#9657;\
710
+          </a>\
711
+          <a href="#" id="hc<%id%>" class="hide-propose-change">\
712
+            Propose a change &#9663;\
713
+          </a>\
714
+        </p>\
715
+        <textarea name="proposal" id="pt<%id%>" cols="80"\
716
+                  spellcheck="false"></textarea>\
717
+        <input type="submit" value="Add comment" />\
718
+        <input type="hidden" name="node" value="<%id%>" />\
719
+        <input type="hidden" name="parent" value="" />\
720
+      </form>\
721
+      </div>\
722
+    </div>';
723
+
724
+  var commentTemplate = '\
725
+    <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
726
+      <div class="vote">\
727
+        <div class="arrow">\
728
+          <a href="#" id="uv<%id%>" class="vote" title="vote up">\
729
+            <img src="<%upArrow%>" />\
730
+          </a>\
731
+          <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
732
+            <img src="<%upArrowPressed%>" />\
733
+          </a>\
734
+        </div>\
735
+        <div class="arrow">\
736
+          <a href="#" id="dv<%id%>" class="vote" title="vote down">\
737
+            <img src="<%downArrow%>" id="da<%id%>" />\
738
+          </a>\
739
+          <a href="#" id="du<%id%>" class="un vote" title="vote down">\
740
+            <img src="<%downArrowPressed%>" />\
741
+          </a>\
742
+        </div>\
743
+      </div>\
744
+      <div class="comment-content">\
745
+        <p class="tagline comment">\
746
+          <span class="user-id"><%username%></span>\
747
+          <span class="rating"><%pretty_rating%></span>\
748
+          <span class="delta"><%time.delta%></span>\
749
+        </p>\
750
+        <div class="comment-text comment"><#text#></div>\
751
+        <p class="comment-opts comment">\
752
+          <a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
753
+          <a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
754
+          <a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
755
+          <a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
756
+          <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
757
+          <span id="cm<%id%>" class="moderation hidden">\
758
+            <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
759
+          </span>\
760
+        </p>\
761
+        <pre class="proposal" id="pr<%id%>">\
762
+<#proposal_diff#>\
763
+        </pre>\
764
+          <ul class="comment-children" id="cl<%id%>"></ul>\
765
+        </div>\
766
+        <div class="clearleft"></div>\
767
+      </div>\
768
+    </div>';
769
+
770
+  var replyTemplate = '\
771
+    <li>\
772
+      <div class="reply-div" id="rd<%id%>">\
773
+        <form id="rf<%id%>">\
774
+          <textarea name="comment" cols="80"></textarea>\
775
+          <input type="submit" value="Add reply" />\
776
+          <input type="button" value="Cancel" />\
777
+          <input type="hidden" name="parent" value="<%id%>" />\
778
+          <input type="hidden" name="node" value="" />\
779
+        </form>\
780
+      </div>\
781
+    </li>';
782
+
783
+  $(document).ready(function() {
784
+    init();
785
+  });
786
+})(jQuery);
787
+
788
+$(document).ready(function() {
789
+  // add comment anchors for all paragraphs that are commentable
790
+  $('.sphinx-has-comment').comment();
791
+
792
+  // highlight search words in search results
793
+  $("div.context").each(function() {
794
+    var params = $.getQueryParameters();
795
+    var terms = (params.q) ? params.q[0].split(/\s+/) : [];
796
+    var result = $(this);
797
+    $.each(terms, function() {
798
+      result.highlightText(this.toLowerCase(), 'highlighted');
799
+    });
800
+  });
801
+
802
+  // directly open comment window if requested
803
+  var anchor = document.location.hash;
804
+  if (anchor.substring(0, 9) == '#comment-') {
805
+    $('#ao' + anchor.substring(9)).click();
806
+    document.location.hash = '#s' + anchor.substring(9);
807
+  }
808
+});

+ 133
- 0
dev/contribution_guide.html Dosyayı Görüntüle

@@ -0,0 +1,133 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>How to contribute &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    '../',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="../_static/jquery.js"></script>
24
+    <script type="text/javascript" src="../_static/underscore.js"></script>
25
+    <script type="text/javascript" src="../_static/doctools.js"></script>
26
+    <link rel="top" title="searx 0.8.0 documentation" href="../index.html" />
27
+    <link rel="next" title="Installation" href="install/installation.html" />
28
+    <link rel="prev" title="Search syntax" href="../user/search_syntax.html" />
29
+   
30
+  
31
+  <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
32
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
33
+
34
+  </head>
35
+  <body role="document">  
36
+
37
+    <div class="document">
38
+      <div class="documentwrapper">
39
+        <div class="bodywrapper">
40
+          <div class="body" role="main">
41
+            
42
+  <div class="section" id="how-to-contribute">
43
+<h1>How to contribute<a class="headerlink" href="#how-to-contribute" title="Permalink to this headline">¶</a></h1>
44
+<div class="section" id="prime-directives-privacy-hackability">
45
+<h2>Prime directives: Privacy, Hackability<a class="headerlink" href="#prime-directives-privacy-hackability" title="Permalink to this headline">¶</a></h2>
46
+<p>Searx has 2 prime directives, privacy-by-design and hackability. The
47
+hackability comes in at least 3 levels:</p>
48
+<ul class="simple">
49
+<li>support for search engines</li>
50
+<li>plugins for altering search behaviour</li>
51
+<li>hacking searx itself.</li>
52
+</ul>
53
+<p>Happy hacking. Observe the lack of &#8220;world domination&#8221; among the
54
+directives, searx has no intentions for wide mass-adoption, rounded
55
+corners, etc. The prime directive: &#8220;privacy&#8221; - deserves a seperate
56
+chapter, as it&#8217;s quite uncommon unfortunately, here it goes:</p>
57
+<div class="section" id="privacy-by-design">
58
+<h3>Privacy-by-design<a class="headerlink" href="#privacy-by-design" title="Permalink to this headline">¶</a></h3>
59
+<p>Searx is a privacy-respecting, hackable meta-search engine. It was born
60
+out of the need for a privacy-respecing search facility that can be
61
+expanded easily to maximise both its search and it&#8217;s privacy protecting
62
+capabilities.</p>
63
+<p>Consequences of Privacy-by-design are that some widely used features
64
+work differently or not by default or at all. If some feature reduces
65
+the privacy perserving aspects of searx, it should by default be
66
+switched of, if implemented at all. There is enough search engines
67
+already out there providing such features. =&nbsp;Since privacy-preservation
68
+is a prime goal, if some feature does reduce the protection of searx and
69
+is implemented, care should be taken to educate the user about the
70
+consequences of choosing to enable this. Further features which
71
+implement widely known features in a manner that protects privacy but
72
+thus deviate from the users expectations should also be explained to the
73
+user. Also if you think that something works weird with searx, maybe
74
+it&#8217;s because of the tool you use is designed in a way to interfere with
75
+privacy respect, submiting a bugreport to the vendor of the tool that
76
+misbehaves might be a good feedback for the vendor to reconsider his
77
+disrespect towards his customers (e.g. GET vs POST requests in various
78
+browsers).</p>
79
+<p>Remember the other prime directive of searx is to be hackable, so if the
80
+above privacy concerns do not fancy you, simply fork it.</p>
81
+</div>
82
+</div>
83
+<div class="section" id="code">
84
+<h2>Code<a class="headerlink" href="#code" title="Permalink to this headline">¶</a></h2>
85
+<p>Code modifications are accepted in pull requests, don&#8217;t forget to add
86
+yourself to the AUTHORS file.</p>
87
+<p>Python code follows all the pep8 standards except maximum line width
88
+which is 120 char.</p>
89
+<p>Please be sure that the submitted code doesn&#8217;t break existing tests and
90
+follows coding conventions.</p>
91
+<p>If new functionality implemented, tests are highly appreciated.</p>
92
+</div>
93
+<div class="section" id="translation">
94
+<h2>Translation<a class="headerlink" href="#translation" title="Permalink to this headline">¶</a></h2>
95
+<p>Translation currently happens on
96
+<a class="reference external" href="https://transifex.com/projects/p/searx">transifex</a>. Please do not
97
+update translation files in the repo.</p>
98
+</div>
99
+<div class="section" id="documentation">
100
+<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h2>
101
+<p>The main place of the documentation is this wiki, updates are welcome.</p>
102
+</div>
103
+</div>
104
+
105
+
106
+          </div>
107
+        </div>
108
+      </div>
109
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
110
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
111
+<h1>Searx</h1>
112
+<ul>
113
+    <li><a href="../index.html">Home</a></li>
114
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
115
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
116
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
117
+</ul>
118
+<hr />
119
+<ul>
120
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
121
+    <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>
122
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
123
+</ul>
124
+</div>
125
+        </div>
126
+      </div>
127
+      <div class="clearer"></div>
128
+    </div>
129
+    <div class="footer">
130
+      &copy; Copyright 2015, Adam Tauber.
131
+    </div>
132
+  </body>
133
+</html>

+ 291
- 0
dev/install/installation.html Dosyayı Görüntüle

@@ -0,0 +1,291 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>Installation &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="../../_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    '../../',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="../../_static/jquery.js"></script>
24
+    <script type="text/javascript" src="../../_static/underscore.js"></script>
25
+    <script type="text/javascript" src="../../_static/doctools.js"></script>
26
+    <link rel="top" title="searx 0.8.0 documentation" href="../../index.html" />
27
+    <link rel="next" title="Search API" href="../search_api.html" />
28
+    <link rel="prev" title="How to contribute" href="../contribution_guide.html" />
29
+   
30
+  
31
+  <link media="only screen and (max-device-width: 480px)" href="../../_static/small_flask.css" type= "text/css" rel="stylesheet" />
32
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
33
+
34
+  </head>
35
+  <body role="document">  
36
+
37
+    <div class="document">
38
+      <div class="documentwrapper">
39
+        <div class="bodywrapper">
40
+          <div class="body" role="main">
41
+            
42
+  <div class="section" id="installation">
43
+<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
44
+<p>Step by step installation for Debian / Ubuntu with virtualenv.</p>
45
+<p>Source: <a class="reference external" href="https://about.okhin.fr/posts/Searx/">https://about.okhin.fr/posts/Searx/</a> with some additions</p>
46
+<p>How to: <a class="reference external" href="https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/">Setup searx in a couple of hours with a free SSL
47
+certificate</a></p>
48
+<div class="section" id="basic-installation">
49
+<h2>Basic installation<a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
50
+<p>For Ubuntu, be sure to have enable universe repository.</p>
51
+<p>Install packages :</p>
52
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
53
+</pre></div>
54
+</div>
55
+<p>Install searx :</p>
56
+<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local
57
+sudo git clone https://github.com/asciimoo/searx.git
58
+sudo useradd searx -d /usr/local/searx
59
+sudo chown searx:searx -R /usr/local/searx
60
+</pre></div>
61
+</div>
62
+<p>Install dependencies in a virtualenv :</p>
63
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo -u searx -i
64
+cd /usr/local/searx
65
+virtualenv searx-ve
66
+. ./searx-ve/bin/activate
67
+pip install -r requirements.txt
68
+python setup.py install
69
+</pre></div>
70
+</div>
71
+</div>
72
+<div class="section" id="configuration">
73
+<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
74
+<div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e &quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot; searx/settings.yml
75
+</pre></div>
76
+</div>
77
+<p>Edit searx/settings.yml if necessary.</p>
78
+</div>
79
+<div class="section" id="check">
80
+<h2>Check<a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
81
+<p>Start searx :</p>
82
+<div class="code sh highlight-python"><div class="highlight"><pre>python searx/webapp.py
83
+</pre></div>
84
+</div>
85
+<p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
86
+<p>If everything works fine, disable the debug option in settings.yml :</p>
87
+<div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e &quot;s/debug : True/debug : False/g&quot; searx/settings.yml
88
+</pre></div>
89
+</div>
90
+<p>At this point searx is not demonized ; uwsgi allows this.</p>
91
+<p>You can exit the virtualenv and the searx user bash (enter exit command
92
+twice).</p>
93
+</div>
94
+<div class="section" id="uwsgi">
95
+<h2>uwsgi<a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
96
+<p>Install packages :</p>
97
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install uwsgi uwsgi-plugin-python
98
+</pre></div>
99
+</div>
100
+<p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
101
+this content :</p>
102
+<div class="highlight-python"><div class="highlight"><pre>[uwsgi]
103
+# Who will run the code
104
+uid = searx
105
+gid = searx
106
+
107
+# disable logging for privacy
108
+disable-logging = true
109
+
110
+# Number of workers (usually CPU count)
111
+workers = 4
112
+
113
+# The right granted on the created socket
114
+chmod-socket = 666
115
+
116
+# Plugin to use and interpretor config
117
+single-interpreter = true
118
+master = true
119
+plugin = python
120
+
121
+# Module to import
122
+module = searx.webapp
123
+
124
+# Virtualenv and python path
125
+virtualenv = /usr/local/searx/searx-ve/
126
+pythonpath = /usr/local/searx/
127
+chdir = /usr/local/searx/searx/
128
+</pre></div>
129
+</div>
130
+<p>Activate the uwsgi application and restart :</p>
131
+<div class="code sh highlight-python"><div class="highlight"><pre>cd /etc/uwsgi/apps-enabled
132
+ln -s ../apps-available/searx.ini
133
+/etc/init.d/uwsgi restart
134
+</pre></div>
135
+</div>
136
+</div>
137
+<div class="section" id="web-server">
138
+<h2>Web server<a class="headerlink" href="#web-server" title="Permalink to this headline">¶</a></h2>
139
+<div class="section" id="with-nginx">
140
+<h3>with nginx<a class="headerlink" href="#with-nginx" title="Permalink to this headline">¶</a></h3>
141
+<p>If nginx is not installed (uwsgi will not work with the package
142
+nginx-light) :</p>
143
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install nginx
144
+</pre></div>
145
+</div>
146
+<div class="section" id="hosted-at">
147
+<h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline">¶</a></h4>
148
+<p>Create the configuration file /etc/nginx/sites-available/searx with this
149
+content :</p>
150
+<div class="code nginx highlight-python"><div class="highlight"><pre>server {
151
+    listen 80;
152
+    server_name searx.example.com;
153
+    root /usr/local/searx;
154
+
155
+    location / {
156
+            include uwsgi_params;
157
+            uwsgi_pass unix:/run/uwsgi/app/searx/socket;
158
+    }
159
+}
160
+</pre></div>
161
+</div>
162
+<p>Restart service :</p>
163
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
164
+sudo service uwsgi restart
165
+</pre></div>
166
+</div>
167
+<div class="section" id="from-subdirectory-url-searx">
168
+<h5>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline">¶</a></h5>
169
+<p>Add this configuration in the server config file
170
+/etc/nginx/sites-available/default :</p>
171
+<div class="code nginx highlight-python"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
172
+location /searx {
173
+        try_files $uri @searx;
174
+}
175
+location @searx {
176
+        uwsgi_param SCRIPT_NAME /searx;
177
+        include uwsgi_params;
178
+        uwsgi_modifier1 30;
179
+        uwsgi_pass unix:/run/uwsgi/app/searx/socket;
180
+}
181
+</pre></div>
182
+</div>
183
+<p>Enable base_url in searx/settings.yml</p>
184
+<div class="highlight-python"><div class="highlight"><pre>base_url : http://your.domain.tld/searx/
185
+</pre></div>
186
+</div>
187
+<p>Restart service :</p>
188
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
189
+sudo service uwsgi restart
190
+</pre></div>
191
+</div>
192
+</div>
193
+<div class="section" id="disable-logs">
194
+<h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline">¶</a></h5>
195
+<p>for better privacy you can disable nginx logs about searx.</p>
196
+<p>how to proceed : below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
197
+/etc/nginx/sites-available/default add</p>
198
+<div class="highlight-python"><div class="highlight"><pre><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
199
+<span class="n">error_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
200
+</pre></div>
201
+</div>
202
+<p>Restart service :</p>
203
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
204
+</pre></div>
205
+</div>
206
+</div>
207
+</div>
208
+</div>
209
+</div>
210
+<div class="section" id="with-apache">
211
+<h2>with apache<a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h2>
212
+<p>Add wsgi mod :</p>
213
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install libapache2-mod-uwsgi
214
+sudo a2enmod uwsgi
215
+</pre></div>
216
+</div>
217
+<p>Add this configuration in the file /etc/apache2/apache2.conf :</p>
218
+<div class="code apache highlight-python"><div class="highlight"><pre>&lt;Location /&gt;
219
+    Options FollowSymLinks Indexes
220
+    SetHandler uwsgi-handler
221
+    uWSGISocket /run/uwsgi/app/searx/socket
222
+&lt;/Location&gt;
223
+</pre></div>
224
+</div>
225
+<p>Note that if your instance of searx is not at the root, you should
226
+change <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like
227
+<code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
228
+<p>Restart Apache :</p>
229
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
230
+</pre></div>
231
+</div>
232
+</div>
233
+<div class="section" id="id1">
234
+<h2>disable logs<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
235
+<p>For better privacy you can disable Apache logs.</p>
236
+<p>WARNING : not tested</p>
237
+<p>WARNING : you can only disable logs for the whole (virtual) server not
238
+for a specific path.</p>
239
+<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add :</p>
240
+<div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
241
+</pre></div>
242
+</div>
243
+<p>Restart Apache :</p>
244
+<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
245
+</pre></div>
246
+</div>
247
+</div>
248
+<div class="section" id="how-to-update">
249
+<h2>How to update<a class="headerlink" href="#how-to-update" title="Permalink to this headline">¶</a></h2>
250
+<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local/searx
251
+sudo -u searx -i
252
+. ./searx-ve/bin/activate
253
+git stash
254
+git pull origin master
255
+git stash apply
256
+pip install --upgrade -r requirements.txt
257
+sudo service uwsgi restart
258
+</pre></div>
259
+</div>
260
+</div>
261
+</div>
262
+
263
+
264
+          </div>
265
+        </div>
266
+      </div>
267
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
268
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
269
+<h1>Searx</h1>
270
+<ul>
271
+    <li><a href="../../index.html">Home</a></li>
272
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
273
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
274
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
275
+</ul>
276
+<hr />
277
+<ul>
278
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
279
+    <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>
280
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
281
+</ul>
282
+</div>
283
+        </div>
284
+      </div>
285
+      <div class="clearer"></div>
286
+    </div>
287
+    <div class="footer">
288
+      &copy; Copyright 2015, Adam Tauber.
289
+    </div>
290
+  </body>
291
+</html>

+ 115
- 0
dev/plugins.html Dosyayı Görüntüle

@@ -0,0 +1,115 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>Plugins &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    '../',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="../_static/jquery.js"></script>
24
+    <script type="text/javascript" src="../_static/underscore.js"></script>
25
+    <script type="text/javascript" src="../_static/doctools.js"></script>
26
+    <link rel="top" title="searx 0.8.0 documentation" href="../index.html" />
27
+    <link rel="next" title="Translation" href="translation.html" />
28
+    <link rel="prev" title="Search API" href="search_api.html" />
29
+   
30
+  
31
+  <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
32
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
33
+
34
+  </head>
35
+  <body role="document">  
36
+
37
+    <div class="document">
38
+      <div class="documentwrapper">
39
+        <div class="bodywrapper">
40
+          <div class="body" role="main">
41
+            
42
+  <div class="section" id="plugins">
43
+<h1>Plugins<a class="headerlink" href="#plugins" title="Permalink to this headline">¶</a></h1>
44
+<p>Plugins can extend/replace functionality of various components inside
45
+searx.</p>
46
+<div class="section" id="example-plugin-py">
47
+<h2>example_plugin.py<a class="headerlink" href="#example-plugin-py" title="Permalink to this headline">¶</a></h2>
48
+<div class="code python highlight-python"><div class="highlight"><pre><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;Example plugin&#39;</span>
49
+<span class="n">description</span> <span class="o">=</span> <span class="s">&#39;This plugin extends the suggestions with the word &quot;example&quot;&#39;</span>
50
+<span class="n">default_on</span> <span class="o">=</span> <span class="bp">False</span>  <span class="c"># disable by default</span>
51
+
52
+<span class="n">js_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span>  <span class="c"># optional, list of static js files</span>
53
+<span class="n">css_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span>  <span class="c"># optional, list of static css files</span>
54
+
55
+
56
+<span class="c"># attach callback to the post search hook</span>
57
+<span class="c">#  request: flask request object</span>
58
+<span class="c">#  ctx: the whole local context of the post search hook</span>
59
+<span class="k">def</span> <span class="nf">post_search</span><span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">ctx</span><span class="p">):</span>
60
+    <span class="n">ctx</span><span class="p">[</span><span class="s">&#39;search&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">suggestions</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s">&#39;example&#39;</span><span class="p">)</span>
61
+    <span class="k">return</span> <span class="bp">True</span>
62
+</pre></div>
63
+</div>
64
+</div>
65
+<div class="section" id="currently-implemented-plugin-entry-points-a-k-a-hooks">
66
+<h2>Currently implemented plugin entry points (a.k.a hooks)<a class="headerlink" href="#currently-implemented-plugin-entry-points-a-k-a-hooks" title="Permalink to this headline">¶</a></h2>
67
+<ul class="simple">
68
+<li>Pre search hook (<code class="docutils literal"><span class="pre">pre_search</span></code>)</li>
69
+<li>Post search hook (<code class="docutils literal"><span class="pre">post_search</span></code>)</li>
70
+<li>Result hook (<code class="docutils literal"><span class="pre">on_result</span></code>) (is called if a new result is added (see
71
+https_rewrite plugin))</li>
72
+</ul>
73
+<p>Feel free to add more hooks to the code if it is required by a plugin.</p>
74
+</div>
75
+<div class="section" id="todo">
76
+<h2>TODO<a class="headerlink" href="#todo" title="Permalink to this headline">¶</a></h2>
77
+<ul class="simple">
78
+<li>Better documentation</li>
79
+<li>More hooks</li>
80
+<li>search hook (is called while searx is requesting results (for
81
+example: things like math-solver), the different hooks are running
82
+parallel)</li>
83
+</ul>
84
+</div>
85
+</div>
86
+
87
+
88
+          </div>
89
+        </div>
90
+      </div>
91
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
92
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
93
+<h1>Searx</h1>
94
+<ul>
95
+    <li><a href="../index.html">Home</a></li>
96
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
97
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
98
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
99
+</ul>
100
+<hr />
101
+<ul>
102
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
103
+    <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>
104
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
105
+</ul>
106
+</div>
107
+        </div>
108
+      </div>
109
+      <div class="clearer"></div>
110
+    </div>
111
+    <div class="footer">
112
+      &copy; Copyright 2015, Adam Tauber.
113
+    </div>
114
+  </body>
115
+</html>

+ 113
- 0
dev/search_api.html Dosyayı Görüntüle

@@ -0,0 +1,113 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>Search API &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    '../',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="../_static/jquery.js"></script>
24
+    <script type="text/javascript" src="../_static/underscore.js"></script>
25
+    <script type="text/javascript" src="../_static/doctools.js"></script>
26
+    <link rel="top" title="searx 0.8.0 documentation" href="../index.html" />
27
+    <link rel="next" title="Plugins" href="plugins.html" />
28
+    <link rel="prev" title="Installation" href="install/installation.html" />
29
+   
30
+  
31
+  <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
32
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
33
+
34
+  </head>
35
+  <body role="document">  
36
+
37
+    <div class="document">
38
+      <div class="documentwrapper">
39
+        <div class="bodywrapper">
40
+          <div class="body" role="main">
41
+            
42
+  <div class="section" id="search-api">
43
+<h1>Search API<a class="headerlink" href="#search-api" title="Permalink to this headline">¶</a></h1>
44
+<div class="section" id="search-api-endpoints-search">
45
+<h2>Search API endpoints: <code class="docutils literal"><span class="pre">/</span></code>, <code class="docutils literal"><span class="pre">/search</span></code><a class="headerlink" href="#search-api-endpoints-search" title="Permalink to this headline">¶</a></h2>
46
+<p>Endpoints have equivalent functionality.</p>
47
+</div>
48
+<div class="section" id="parameters">
49
+<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
50
+<table border="1" class="docutils">
51
+<colgroup>
52
+<col width="12%" />
53
+<col width="68%" />
54
+<col width="20%" />
55
+</colgroup>
56
+<thead valign="bottom">
57
+<tr class="row-odd"><th class="head">Name</th>
58
+<th class="head">Description</th>
59
+<th class="head">&nbsp;</th>
60
+</tr>
61
+</thead>
62
+<tbody valign="top">
63
+<tr class="row-even"><td><code class="docutils literal"><span class="pre">q</span></code></td>
64
+<td>The search query, see <a class="reference internal" href="../user/search_syntax.html"><em>Search syntax</em></a></td>
65
+<td>required</td>
66
+</tr>
67
+<tr class="row-odd"><td><code class="docutils literal"><span class="pre">categories</span></code></td>
68
+<td>Comma separated list, specifies the active search categories</td>
69
+<td>optional</td>
70
+</tr>
71
+<tr class="row-even"><td><code class="docutils literal"><span class="pre">engines</span></code></td>
72
+<td>Comma separated list, specifies the active search engines</td>
73
+<td>optional</td>
74
+</tr>
75
+<tr class="row-odd"><td><code class="docutils literal"><span class="pre">pageno</span></code></td>
76
+<td>Search page number</td>
77
+<td>optional (default: <code class="docutils literal"><span class="pre">1</span></code>)</td>
78
+</tr>
79
+</tbody>
80
+</table>
81
+<p>Both <code class="docutils literal"><span class="pre">GET</span></code> and <code class="docutils literal"><span class="pre">POST</span></code> methods are supported.</p>
82
+</div>
83
+</div>
84
+
85
+
86
+          </div>
87
+        </div>
88
+      </div>
89
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
90
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
91
+<h1>Searx</h1>
92
+<ul>
93
+    <li><a href="../index.html">Home</a></li>
94
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
95
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
96
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
97
+</ul>
98
+<hr />
99
+<ul>
100
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
101
+    <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>
102
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
103
+</ul>
104
+</div>
105
+        </div>
106
+      </div>
107
+      <div class="clearer"></div>
108
+    </div>
109
+    <div class="footer">
110
+      &copy; Copyright 2015, Adam Tauber.
111
+    </div>
112
+  </body>
113
+</html>

+ 129
- 0
dev/translation.html Dosyayı Görüntüle

@@ -0,0 +1,129 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>Translation &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    '../',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="../_static/jquery.js"></script>
24
+    <script type="text/javascript" src="../_static/underscore.js"></script>
25
+    <script type="text/javascript" src="../_static/doctools.js"></script>
26
+    <link rel="top" title="searx 0.8.0 documentation" href="../index.html" />
27
+    <link rel="prev" title="Plugins" href="plugins.html" />
28
+   
29
+  
30
+  <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
31
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
32
+
33
+  </head>
34
+  <body role="document">  
35
+
36
+    <div class="document">
37
+      <div class="documentwrapper">
38
+        <div class="bodywrapper">
39
+          <div class="body" role="main">
40
+            
41
+  <div class="section" id="translation">
42
+<h1>Translation<a class="headerlink" href="#translation" title="Permalink to this headline">¶</a></h1>
43
+<p>run these commands in the root directory of searx</p>
44
+<div class="section" id="add-new-language">
45
+<h2>Add new language<a class="headerlink" href="#add-new-language" title="Permalink to this headline">¶</a></h2>
46
+<p><code class="docutils literal"><span class="pre">pybabel</span> <span class="pre">init</span> <span class="pre">-i</span> <span class="pre">messages.pot</span> <span class="pre">-d</span> <span class="pre">searx/translations</span> <span class="pre">-l</span> <span class="pre">it</span></code></p>
47
+</div>
48
+<div class="section" id="update-po-files">
49
+<h2>Update .po files<a class="headerlink" href="#update-po-files" title="Permalink to this headline">¶</a></h2>
50
+<p><code class="docutils literal"><span class="pre">./utils/update-translations.sh</span></code></p>
51
+<p>You may have errors here. In that case, edit the
52
+<code class="docutils literal"><span class="pre">update-translations.sh</span></code> script to change <code class="docutils literal"><span class="pre">pybabel</span></code> to
53
+<code class="docutils literal"><span class="pre">pybabel-python2</span></code></p>
54
+<p>After this step, you can modify the .po files.</p>
55
+</div>
56
+<div class="section" id="compile-translations">
57
+<h2>Compile translations<a class="headerlink" href="#compile-translations" title="Permalink to this headline">¶</a></h2>
58
+<p><code class="docutils literal"><span class="pre">pybabel</span> <span class="pre">compile</span> <span class="pre">-d</span> <span class="pre">searx/translations</span></code></p>
59
+</div>
60
+<div class="section" id="transifex-stuff">
61
+<h2>Transifex stuff<a class="headerlink" href="#transifex-stuff" title="Permalink to this headline">¶</a></h2>
62
+<div class="section" id="init-project">
63
+<h3>Init Project<a class="headerlink" href="#init-project" title="Permalink to this headline">¶</a></h3>
64
+<div class="code shell highlight-python"><div class="highlight"><pre>tx set --auto-local -r searx.messagespo &#39;searx/translations/&lt;lang&gt;/LC_MESSAGES/messages.po&#39; \
65
+--source-lang en --type PO --source-file messages.pot --execute
66
+</pre></div>
67
+</div>
68
+<p><a class="reference external" href="http://docs.transifex.com/developer/client/set">http://docs.transifex.com/developer/client/set</a></p>
69
+<p><em>TODO: mapping between transifex and searx</em></p>
70
+</div>
71
+<div class="section" id="get-translations">
72
+<h3>Get translations<a class="headerlink" href="#get-translations" title="Permalink to this headline">¶</a></h3>
73
+<div class="code shell highlight-python"><div class="highlight"><pre>tx pull -a
74
+</pre></div>
75
+</div>
76
+<p><a class="reference external" href="http://docs.transifex.com/developer/client/pull">http://docs.transifex.com/developer/client/pull</a></p>
77
+</div>
78
+<div class="section" id="upload-source-file">
79
+<h3>Upload source File<a class="headerlink" href="#upload-source-file" title="Permalink to this headline">¶</a></h3>
80
+<div class="highlight-python"><div class="highlight"><pre>tx push -s
81
+</pre></div>
82
+</div>
83
+</div>
84
+<div class="section" id="upload-all-translation">
85
+<h3>Upload all Translation<a class="headerlink" href="#upload-all-translation" title="Permalink to this headline">¶</a></h3>
86
+<div class="highlight-python"><div class="highlight"><pre>tx push -s -t
87
+</pre></div>
88
+</div>
89
+</div>
90
+</div>
91
+<div class="section" id="upload-specifc-translation-only-for-admins">
92
+<h2>upload specifc Translation (only for admins)<a class="headerlink" href="#upload-specifc-translation-only-for-admins" title="Permalink to this headline">¶</a></h2>
93
+<div class="highlight-python"><div class="highlight"><pre>tx push -t -l tr
94
+</pre></div>
95
+</div>
96
+<p><a class="reference external" href="http://docs.transifex.com/developer/client/push">http://docs.transifex.com/developer/client/push</a></p>
97
+<p><em>TODO: upload empty files? (new translations)</em></p>
98
+</div>
99
+</div>
100
+
101
+
102
+          </div>
103
+        </div>
104
+      </div>
105
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
106
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
107
+<h1>Searx</h1>
108
+<ul>
109
+    <li><a href="../index.html">Home</a></li>
110
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
111
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
112
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
113
+</ul>
114
+<hr />
115
+<ul>
116
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
117
+    <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>
118
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
119
+</ul>
120
+</div>
121
+        </div>
122
+      </div>
123
+      <div class="clearer"></div>
124
+    </div>
125
+    <div class="footer">
126
+      &copy; Copyright 2015, Adam Tauber.
127
+    </div>
128
+  </body>
129
+</html>

+ 79
- 0
genindex.html Dosyayı Görüntüle

@@ -0,0 +1,79 @@
1
+
2
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+
5
+
6
+<html xmlns="http://www.w3.org/1999/xhtml">
7
+  <head>
8
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+    
10
+    <title>Index &mdash; searx 0.8.0 documentation</title>
11
+    
12
+    <link rel="stylesheet" href="_static/style.css" type="text/css" />
13
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
14
+    
15
+    <script type="text/javascript">
16
+      var DOCUMENTATION_OPTIONS = {
17
+        URL_ROOT:    './',
18
+        VERSION:     '0.8.0',
19
+        COLLAPSE_INDEX: false,
20
+        FILE_SUFFIX: '.html',
21
+        HAS_SOURCE:  true
22
+      };
23
+    </script>
24
+    <script type="text/javascript" src="_static/jquery.js"></script>
25
+    <script type="text/javascript" src="_static/underscore.js"></script>
26
+    <script type="text/javascript" src="_static/doctools.js"></script>
27
+    <link rel="top" title="searx 0.8.0 documentation" href="index.html" />
28
+   
29
+  
30
+  <link media="only screen and (max-device-width: 480px)" href="_static/small_flask.css" type= "text/css" rel="stylesheet" />
31
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
32
+
33
+  </head>
34
+  <body role="document">  
35
+
36
+    <div class="document">
37
+      <div class="documentwrapper">
38
+        <div class="bodywrapper">
39
+          <div class="body" role="main">
40
+            
41
+
42
+<h1 id="index">Index</h1>
43
+
44
+<div class="genindex-jumpbox">
45
+ 
46
+</div>
47
+
48
+
49
+          </div>
50
+        </div>
51
+      </div>
52
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
53
+        <div class="sphinxsidebarwrapper">
54
+
55
+   <div class="sidebar_container body">
56
+<h1>Searx</h1>
57
+<ul>
58
+    <li><a href="index.html">Home</a></li>
59
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
60
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
61
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
62
+</ul>
63
+<hr />
64
+<ul>
65
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
66
+    <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>
67
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
68
+</ul>
69
+</div>
70
+
71
+        </div>
72
+      </div>
73
+      <div class="clearer"></div>
74
+    </div>
75
+    <div class="footer">
76
+      &copy; Copyright 2015, Adam Tauber.
77
+    </div>
78
+  </body>
79
+</html>

+ 109
- 0
index.html Dosyayı Görüntüle

@@ -0,0 +1,109 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>Privacy-respecting free metasearch engine &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    './',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="_static/jquery.js"></script>
24
+    <script type="text/javascript" src="_static/underscore.js"></script>
25
+    <script type="text/javascript" src="_static/doctools.js"></script>
26
+    <link rel="top" title="searx 0.8.0 documentation" href="#" />
27
+    <link rel="next" title="Search syntax" href="user/search_syntax.html" />
28
+   
29
+  
30
+  <link media="only screen and (max-device-width: 480px)" href="_static/small_flask.css" type= "text/css" rel="stylesheet" />
31
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
32
+
33
+  </head>
34
+  <body role="document">  
35
+
36
+    <div class="document">
37
+      <div class="documentwrapper">
38
+        <div class="bodywrapper">
39
+          <div class="body" role="main">
40
+            
41
+  <div class="section" id="privacy-respecting-free-metasearch-engine">
42
+<h1>Privacy-respecting free metasearch engine<a class="headerlink" href="#privacy-respecting-free-metasearch-engine" title="Permalink to this headline">¶</a></h1>
43
+<p>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&#8217; data with third parties. Additionally, searx can be used over Tor for online anonymity.</p>
44
+<div class="section" id="features">
45
+<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
46
+<blockquote>
47
+<div><ul class="simple">
48
+<li>Self hosted</li>
49
+<li>Does not track its users</li>
50
+<li>Does not share its users data with third parties</li>
51
+<li>Does not use cookies by default</li>
52
+<li>Does not profile its users</li>
53
+<li>Does not collect its users data</li>
54
+<li>Offers secure, encrypted connections (HTTPS/SSL)</li>
55
+<li>Hosted by organisations, such as La Quadrature du Net, which promote digital rights</li>
56
+</ul>
57
+</div></blockquote>
58
+</div>
59
+<div class="section" id="further-reading">
60
+<h2>Further reading<a class="headerlink" href="#further-reading" title="Permalink to this headline">¶</a></h2>
61
+<div class="toctree-wrapper compound">
62
+<ul>
63
+<li class="toctree-l1"><a class="reference internal" href="user/search_syntax.html">Search syntax</a></li>
64
+</ul>
65
+</div>
66
+</div>
67
+<div class="section" id="developer-documentation">
68
+<h2>Developer documentation<a class="headerlink" href="#developer-documentation" title="Permalink to this headline">¶</a></h2>
69
+<div class="toctree-wrapper compound">
70
+<ul>
71
+<li class="toctree-l1"><a class="reference internal" href="dev/contribution_guide.html">How to contribute</a></li>
72
+<li class="toctree-l1"><a class="reference internal" href="dev/install/installation.html">Installation</a></li>
73
+<li class="toctree-l1"><a class="reference internal" href="dev/search_api.html">Search API</a></li>
74
+<li class="toctree-l1"><a class="reference internal" href="dev/plugins.html">Plugins</a></li>
75
+<li class="toctree-l1"><a class="reference internal" href="dev/translation.html">Translation</a></li>
76
+</ul>
77
+</div>
78
+</div>
79
+</div>
80
+
81
+
82
+          </div>
83
+        </div>
84
+      </div>
85
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
86
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
87
+<h1>Searx</h1>
88
+<ul>
89
+    <li><a href="#">Home</a></li>
90
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
91
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
92
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
93
+</ul>
94
+<hr />
95
+<ul>
96
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
97
+    <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>
98
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
99
+</ul>
100
+</div>
101
+        </div>
102
+      </div>
103
+      <div class="clearer"></div>
104
+    </div>
105
+    <div class="footer">
106
+      &copy; Copyright 2015, Adam Tauber.
107
+    </div>
108
+  </body>
109
+</html>

BIN
objects.inv Dosyayı Görüntüle


+ 99
- 0
search.html Dosyayı Görüntüle

@@ -0,0 +1,99 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>Search &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    './',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="_static/jquery.js"></script>
24
+    <script type="text/javascript" src="_static/underscore.js"></script>
25
+    <script type="text/javascript" src="_static/doctools.js"></script>
26
+    <script type="text/javascript" src="_static/searchtools.js"></script>
27
+    <link rel="top" title="searx 0.8.0 documentation" href="index.html" />
28
+  <script type="text/javascript">
29
+    jQuery(function() { Search.loadIndex("searchindex.js"); });
30
+  </script>
31
+  
32
+  <script type="text/javascript" id="searchindexloader"></script>
33
+  
34
+   
35
+  
36
+  <link media="only screen and (max-device-width: 480px)" href="_static/small_flask.css" type= "text/css" rel="stylesheet" />
37
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
38
+
39
+
40
+  </head>
41
+  <body role="document">  
42
+
43
+    <div class="document">
44
+      <div class="documentwrapper">
45
+        <div class="bodywrapper">
46
+          <div class="body" role="main">
47
+            
48
+  <h1 id="search-documentation">Search</h1>
49
+  <div id="fallback" class="admonition warning">
50
+  <script type="text/javascript">$('#fallback').hide();</script>
51
+  <p>
52
+    Please activate JavaScript to enable the search
53
+    functionality.
54
+  </p>
55
+  </div>
56
+  <p>
57
+    From here you can search these documents. Enter your search
58
+    words into the box below and click "search". Note that the search
59
+    function will automatically search for all of the words. Pages
60
+    containing fewer words won't appear in the result list.
61
+  </p>
62
+  <form action="" method="get">
63
+    <input type="text" name="q" value="" />
64
+    <input type="submit" value="search" />
65
+    <span id="search-progress" style="padding-left: 10px"></span>
66
+  </form>
67
+  
68
+  <div id="search-results">
69
+  
70
+  </div>
71
+
72
+          </div>
73
+        </div>
74
+      </div>
75
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
76
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
77
+<h1>Searx</h1>
78
+<ul>
79
+    <li><a href="index.html">Home</a></li>
80
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
81
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
82
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
83
+</ul>
84
+<hr />
85
+<ul>
86
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
87
+    <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>
88
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
89
+</ul>
90
+</div>
91
+        </div>
92
+      </div>
93
+      <div class="clearer"></div>
94
+    </div>
95
+    <div class="footer">
96
+      &copy; Copyright 2015, Adam Tauber.
97
+    </div>
98
+  </body>
99
+</html>

+ 1
- 0
searchindex.js Dosyayı Görüntüle

@@ -0,0 +1 @@
1
+Search.setIndex({envversion:46,filenames:["dev/contribution_guide","dev/install/installation","dev/plugins","dev/search_api","dev/translation","index","user/search_syntax"],objects:{},objnames:{},objtypes:{},terms:{"break":0,"case":4,"char":0,"default":[0,1,2,3,5,6],"function":[0,2,3],"import":1,"new":[],"null":1,"return":2,"static":2,"switch":0,"true":[1,2],"while":[2,5],a2enmod:1,abbrev:6,about:[0,1,5],abov:[0,1],accept:[0,6],access_log:1,activ:[1,3],add:[],addit:1,addition:5,adopt:0,after:4,aggreg:5,all:[],allow:[1,6],alreadi:0,also:[0,6],alter:0,among:0,anonym:5,apache2:1,app:1,appli:1,applic:1,appreci:0,apt:1,asciimoo:1,aspect:0,attach:2,author:0,auto:4,avail:1,back:1,base_url:1,bash:1,becaus:0,behaviour:0,below:1,better:[1,2],between:4,bin:1,born:0,both:[0,3],browser:0,bugreport:0,build:1,call:2,callback:2,can:[0,1,2,4,5],capabl:0,care:0,categori:[3,6],certif:1,chainabl:6,chang:[1,4],chapter:0,chdir:1,chmod:1,choos:0,chown:1,client:4,clone:1,collect:5,com:[1,4],combin:1,come:0,comma:3,command:[1,4],compon:2,concern:0,conf:1,config:1,connect:5,consequ:0,content:1,context:2,convent:0,cooki:5,corner:0,count:1,coupl:1,cpu:1,creat:1,css:2,css_depend:2,cthulhu:6,ctx:2,current:[],custom:[0,6],customlog:1,data:5,ddg:6,debian:1,debug:1,def:2,default_on:2,demon:1,depend:1,descript:[2,3],deserv:0,dev:1,develop:[],deviat:0,differ:[0,2],digit:5,directori:4,disrespect:0,doc:4,doe:[0,5],doesn:0,domain:1,domin:0,don:0,duckduckgo:6,easili:0,edit:[1,4],educ:0,empti:4,enabl:[0,1],encrypt:5,engin:[],enough:0,enter:1,equival:3,error:4,error_log:1,essenti:1,etc:[0,1],everyth:1,exampl:[],except:0,execut:4,exist:0,exit:1,expand:0,expect:0,explain:0,extend:2,facil:0,fals:[1,2],fanci:0,featur:[],feedback:0,feel:2,file:[],fine:1,flask:2,follow:0,followsymlink:1,forget:0,fork:0,free:[],from:[],further:[],get:[],gid:1,git:1,github:1,goal:0,goe:0,good:0,grant:1,hack:0,hackerspac:6,handler:1,happen:0,happi:0,have:[1,3,4],here:[0,4],hex:1,highli:0,hour:1,http:[1,4,5],https_rewrit:2,imag:6,implement:[],includ:1,inclus:6,index:1,inform:5,ini:1,init:[],insid:2,instanc:1,intent:0,interfer:0,internet:5,interpret:1,interpretor:1,itself:0,js_depend:2,known:0,lack:0,lang:4,lc_messag:4,least:0,level:0,libapache2:1,libffi:1,libssl:1,libxslt:1,light:1,like:[1,2],line:0,list:[2,3,6],listen:1,local:[1,2,4],localhost:1,locat:1,mai:4,main:0,manner:0,map:4,mass:0,master:1,math:2,maximis:0,maximum:0,mayb:0,messag:4,messagespo:4,meta:0,method:3,might:0,misbehav:0,mod:1,modif:0,modifi:[4,6],modul:1,more:2,name:[2,3],necessari:1,need:0,net:5,nor:5,note:1,number:[1,3],object:2,observ:0,offer:5,okhin:1,on_result:2,onli:[],onlin:5,openssl:1,option:[1,2,3],organis:5,origin:1,other:[0,5],out:0,over:5,packag:1,page:[3,6],pageno:3,parallel:2,parti:5,path:1,pep8:0,perserv:0,pip:1,place:0,pleas:0,plugin:[],point:[],post:[0,1,2,3],post_search:2,pot:4,pre:2,pre_search:2,prefer:6,prefix:6,preserv:0,proce:1,profil:5,promot:5,protect:0,provid:0,pull:[0,1,4],push:4,pybabel:[1,4],python2:4,python:[0,1],pythonpath:1,quadratur:5,queri:[3,6],quit:0,qwer:6,rand:1,reconsid:0,reduc:0,rememb:0,replac:2,repo:0,repositori:1,request:[0,2],requir:[1,2,3],respec:0,respect:[],restart:1,result:[2,5],rewrit:1,right:[1,5],root:[1,4],round:0,run:[1,2,4],script:4,script_nam:1,search:[],searx:[],secur:5,sed:1,see:[2,3,6],select:6,self:5,separ:3,seper:0,server_nam:1,servic:1,set:[1,4],sethandl:1,setup:1,share:5,should:[0,1],simpli:0,sinc:0,singl:1,site:1,socket:1,softwar:5,solver:2,some:[0,1],someth:0,sourc:[],specif:1,specifi:3,ssl:[1,5],standard:0,start:1,stash:1,step:[1,4],store:5,submit:0,sudo:1,suggest:2,support:[0,3],sure:[0,1],syntax:[],taken:0,test:[0,1],thi:[0,1,2,4],thing:2,think:0,third:5,thu:0,tld:1,tool:0,tor:5,toward:0,track:5,transifex:[],try_fil:1,tupl:2,twice:1,txt:1,type:4,ubuntu:1,uid:1,ultrasecretkei:1,uncommon:0,unfortun:0,univers:1,unix:1,updat:[],upgrad:1,uri:1,user:[0,1,5],useradd:1,usr:1,usual:1,util:4,uwsgi_modifier1:1,uwsgi_param:1,uwsgi_pass:1,uwsgisocket:1,variou:[0,2],vendor:0,via:6,virtual:1,virtualenv:1,wai:0,warn:1,webapp:1,weird:0,welcom:0,which:[0,5],who:1,whole:[1,2],wide:0,width:0,wiki:0,wikipedia:6,word:2,work:[0,1],worker:1,world:0,wsgi:1,yml:1,you:[0,1,4,6],your:1,yourself:0,zlib1g:1},titles:["How to contribute","Installation","Plugins","Search API","Translation","Privacy-respecting free metasearch engine","Search syntax"],titleterms:{"new":4,add:4,admin:4,all:4,apach:1,api:3,basic:1,check:1,code:0,compil:4,configur:1,contribut:0,current:2,design:0,develop:5,direct:0,disabl:1,document:[0,5],endpoint:3,engin:5,entri:2,exampl:6,example_plugin:2,featur:5,file:4,free:5,from:1,further:5,get:4,hackabl:0,hook:2,host:1,how:[0,1],implement:2,init:4,instal:1,languag:4,log:1,metasearch:5,nginx:1,onli:4,paramet:3,plugin:2,point:2,prime:0,privaci:[0,5],project:4,read:5,respect:5,search:[3,6],searx:1,server:1,sourc:4,specifc:4,stuff:4,subdirectori:1,syntax:6,todo:2,transifex:4,translat:[0,4],updat:[1,4],upload:4,url:1,uwsgi:1,web:1}})

+ 96
- 0
user/search_syntax.html Dosyayı Görüntüle

@@ -0,0 +1,96 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+
5
+<html xmlns="http://www.w3.org/1999/xhtml">
6
+  <head>
7
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+    
9
+    <title>Search syntax &mdash; searx 0.8.0 documentation</title>
10
+    
11
+    <link rel="stylesheet" href="../_static/style.css" type="text/css" />
12
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+    
14
+    <script type="text/javascript">
15
+      var DOCUMENTATION_OPTIONS = {
16
+        URL_ROOT:    '../',
17
+        VERSION:     '0.8.0',
18
+        COLLAPSE_INDEX: false,
19
+        FILE_SUFFIX: '.html',
20
+        HAS_SOURCE:  true
21
+      };
22
+    </script>
23
+    <script type="text/javascript" src="../_static/jquery.js"></script>
24
+    <script type="text/javascript" src="../_static/underscore.js"></script>
25
+    <script type="text/javascript" src="../_static/doctools.js"></script>
26
+    <link rel="top" title="searx 0.8.0 documentation" href="../index.html" />
27
+    <link rel="next" title="How to contribute" href="../dev/contribution_guide.html" />
28
+    <link rel="prev" title="Privacy-respecting free metasearch engine" href="../index.html" />
29
+   
30
+  
31
+  <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
32
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
33
+
34
+  </head>
35
+  <body role="document">  
36
+
37
+    <div class="document">
38
+      <div class="documentwrapper">
39
+        <div class="bodywrapper">
40
+          <div class="body" role="main">
41
+            
42
+  <div class="section" id="search-syntax">
43
+<h1>Search syntax<a class="headerlink" href="#search-syntax" title="Permalink to this headline">¶</a></h1>
44
+<p>Searx allows you to modify the default categories, engines and search
45
+language via the search query.</p>
46
+<p>Category/engine prefix: <code class="docutils literal"><span class="pre">!</span></code></p>
47
+<p>Language prefix: <code class="docutils literal"><span class="pre">:</span></code></p>
48
+<p>Prefix to add engines and categories to the currently selected
49
+categories: <code class="docutils literal"><span class="pre">?</span></code></p>
50
+<p>Abbrevations of the engines and languages are also accepted.
51
+Engine/category modifiers are chainable and inclusive (e.g. with
52
+<a class="reference external" href="https://searx.me/?q=%21it%20%21ddg%20%21wp%20qwer">!it !ddg !wp qwer</a>
53
+search in IT category <strong>and</strong> duckduckgo <strong>and</strong> wikipedia for <code class="docutils literal"><span class="pre">qwer</span></code>).</p>
54
+<p>See the <a class="reference external" href="https://searx.me/preferences">/preferences page</a> for the
55
+list of engines, categories and languages.</p>
56
+<div class="section" id="examples">
57
+<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
58
+<p>Search in wikipedia for <code class="docutils literal"><span class="pre">qwer</span></code>:
59
+<a class="reference external" href="https://searx.me/?q=%21wp%20qwer">!wp qwer</a> or
60
+<a class="reference external" href="https://searx.me/?q=%21wikipedia%20qwer">!wikipedia qwer</a></p>
61
+<p>Image search:
62
+<a class="reference external" href="https://searx.me/?q=%21images%20Cthulhu">!images Cthulhu</a></p>
63
+<p>Custom language in wikipedia:
64
+<a class="reference external" href="https://searx.me/?q=%3Ahu%20%21wp%20hackerspace">:hu !wp hackerspace</a></p>
65
+</div>
66
+</div>
67
+
68
+
69
+          </div>
70
+        </div>
71
+      </div>
72
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
73
+        <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
74
+<h1>Searx</h1>
75
+<ul>
76
+    <li><a href="../index.html">Home</a></li>
77
+    <li><a href="https://github.com/asciimoo/searx">Source</a></li>
78
+    <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
79
+    <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
80
+</ul>
81
+<hr />
82
+<ul>
83
+    <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
84
+    <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>
85
+    <li><a href="https://gratipay.com/searx">Gratipay</a></li>
86
+</ul>
87
+</div>
88
+        </div>
89
+      </div>
90
+      <div class="clearer"></div>
91
+    </div>
92
+    <div class="footer">
93
+      &copy; Copyright 2015, Adam Tauber.
94
+    </div>
95
+  </body>
96
+</html>