|
@@ -6,7 +6,7 @@
|
6
|
6
|
<head>
|
7
|
7
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
8
|
|
9
|
|
- <title>Plugins — searx 0.8.0 documentation</title>
|
|
9
|
+ <title>Plugins — searx 0.9.0 documentation</title>
|
10
|
10
|
|
11
|
11
|
<link rel="stylesheet" href="../_static/style.css" type="text/css" />
|
12
|
12
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
@@ -14,7 +14,7 @@
|
14
|
14
|
<script type="text/javascript">
|
15
|
15
|
var DOCUMENTATION_OPTIONS = {
|
16
|
16
|
URL_ROOT: '../',
|
17
|
|
- VERSION: '0.8.0',
|
|
17
|
+ VERSION: '0.9.0',
|
18
|
18
|
COLLAPSE_INDEX: false,
|
19
|
19
|
FILE_SUFFIX: '.html',
|
20
|
20
|
HAS_SOURCE: true
|
|
@@ -23,7 +23,7 @@
|
23
|
23
|
<script type="text/javascript" src="../_static/jquery.js"></script>
|
24
|
24
|
<script type="text/javascript" src="../_static/underscore.js"></script>
|
25
|
25
|
<script type="text/javascript" src="../_static/doctools.js"></script>
|
26
|
|
- <link rel="top" title="searx 0.8.0 documentation" href="../index.html" />
|
|
26
|
+ <link rel="top" title="searx 0.9.0 documentation" href="../index.html" />
|
27
|
27
|
<link rel="next" title="Translation" href="translation.html" />
|
28
|
28
|
<link rel="prev" title="Search API" href="search_api.html" />
|
29
|
29
|
|
|
@@ -45,20 +45,20 @@
|
45
|
45
|
searx.</p>
|
46
|
46
|
<div class="section" id="example-plugin-py">
|
47
|
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="s1">'Example plugin'</span>
|
49
|
|
-<span class="n">description</span> <span class="o">=</span> <span class="s1">'This plugin extends the suggestions with the word "example"'</span>
|
50
|
|
-<span class="n">default_on</span> <span class="o">=</span> <span class="bp">False</span> <span class="c1"># disable by default</span>
|
|
48
|
+<div class="code python highlight-default"><div class="highlight"><pre><span class="n">name</span> <span class="o">=</span> <span class="s">'Example plugin'</span>
|
|
49
|
+<span class="n">description</span> <span class="o">=</span> <span class="s">'This plugin extends the suggestions with the word "example"'</span>
|
|
50
|
+<span class="n">default_on</span> <span class="o">=</span> <span class="k">False</span> <span class="c"># disable by default</span>
|
51
|
51
|
|
52
|
|
-<span class="n">js_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span> <span class="c1"># optional, list of static js files</span>
|
53
|
|
-<span class="n">css_dependencies</span> <span class="o">=</span> <span class="nb">tuple</span><span class="p">()</span> <span class="c1"># optional, list of static css files</span>
|
|
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
|
54
|
|
55
|
55
|
|
56
|
|
-<span class="c1"># attach callback to the post search hook</span>
|
57
|
|
-<span class="c1"># request: flask request object</span>
|
58
|
|
-<span class="c1"># ctx: the whole local context of the post search hook</span>
|
|
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
|
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="s1">'search'</span><span class="p">]</span><span class="o">.</span><span class="n">suggestions</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s1">'example'</span><span class="p">)</span>
|
61
|
|
- <span class="k">return</span> <span class="bp">True</span>
|
|
60
|
+ <span class="n">ctx</span><span class="p">[</span><span class="s">'search'</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">'example'</span><span class="p">)</span>
|
|
61
|
+ <span class="k">return</span> <span class="k">True</span>
|
62
|
62
|
</pre></div>
|
63
|
63
|
</div>
|
64
|
64
|
</div>
|
|
@@ -109,7 +109,7 @@ parallel)</li>
|
109
|
109
|
<div class="clearer"></div>
|
110
|
110
|
</div>
|
111
|
111
|
<div class="footer">
|
112
|
|
- © Copyright 2015, Adam Tauber.
|
|
112
|
+ © Copyright 2015-2016, Adam Tauber.
|
113
|
113
|
</div>
|
114
|
114
|
</body>
|
115
|
115
|
</html>
|