Przeglądaj źródła

Merge branch 'master' of https://github.com/asciimoo/searx

pw3t 11 lat temu
rodzic
commit
a62b94e21c

+ 5
- 1
engines.cfg_sample Wyświetl plik

@@ -22,6 +22,10 @@ engine = duckduckgo_definitions
22 22
 engine = duckduckgo
23 23
 locale = en-us
24 24
 
25
+[filecrop]
26
+engine = filecrop
27
+categories = files
28
+
25 29
 [flickr]
26 30
 engine = flickr
27 31
 categories = images
@@ -44,7 +48,7 @@ categories = images
44 48
 
45 49
 [piratebay]
46 50
 engine = piratebay
47
-categories = videos, music
51
+categories = videos, music, files
48 52
 
49 53
 [soundcloud]
50 54
 engine = soundcloud

+ 1
- 0
searx/engines/piratebay.py Wyświetl plik

@@ -9,6 +9,7 @@ url = 'https://thepiratebay.se/'
9 9
 search_url = url + 'search/{search_term}/0/99/{search_type}'
10 10
 search_types = {'videos': '200'
11 11
                ,'music' : '100'
12
+               ,'files' : '0'
12 13
                }
13 14
 
14 15
 def request(query, params):

+ 11
- 4
searx/static/css/style.css Wyświetl plik

@@ -25,7 +25,16 @@ body, #container {
25 25
 .row p { padding: 0 10px; max-width: 700px; }
26 26
 .row h3,ul { margin: 4px 8px;}
27 27
 
28
-.hmarg { margin: 0 20px; }
28
+.hmarg {
29
+    margin: 0 20px;
30
+    border: 1px solid #3498DB;
31
+    padding: 4px 10px;
32
+}
33
+
34
+a:link.hmarg { color: #3498DB; }
35
+a:visited.hmarg { color: #3498DB; }
36
+a:active.hmarg { color: #3498DB; }
37
+a:hover.hmarg { color: #3498DB; }
29 38
 
30 39
 .top_margin { margin-top: 60px; }
31 40
 
@@ -113,9 +122,7 @@ tr:hover td { background: #DDDDDD; }
113 122
 .center #search_wrapper { margin-left: auto; margin-right: auto; }
114 123
 .q {
115 124
     background: none repeat scroll 0 0 #FFFFFF;
116
-    border: 1px solid #8D8D8D;
117
-    border-radius: 3px;
118
-    box-shadow: 1px 1px 2px #999999 inset;
125
+    border: 1px solid #3498DB;
119 126
     color: #222222;
120 127
     font-size: 16px;
121 128
     height: 28px;

BIN
searx/static/img/searx.png Wyświetl plik


+ 28
- 25
searx/templates/about.html Wyświetl plik

@@ -4,49 +4,52 @@
4 4
 <div class="row">
5 5
     <h1>About <a href="/">searx</a></h1>
6 6
 
7
-    <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a> inspired by the <a href="http://seeks-project.info/">seeks-project</a>.
8
-    <br />It tries to provide basic privacy by mixing your queries with those from others while avoiding storing search data. For all browsers (except chrom*) queries are made using a POST request. Thus they don't show up in our logs, nor in your url history. For Chrom* users there is an exception, searx is used from the search bar, it issues GET requests.
9
-    <br />You can add it to your browsers search bar and even make it your default search engine.
7
+    <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, aggregating the results of other <a href="/engines">search engines</a> while not storing information about its users.
10 8
     </p>
11
-    <h2>What makes searx different</h2>
9
+    <h2>Why use Searx?</h2>
12 10
     <ul>
13
-        <li>No ads - searx is Free Software (free-as-in-freedom), funded by your donations</li>
14
-        <li>Privacy - tries to minimalize the digital footprint of the searches</li>
15
-        <li>Optionally self hosted - see the <a href="#faq">FAQ</a></li>
16
-        <li>Easy to add new engines/categories</li>
11
+        <li>Maybe Searx won’t offer you as personalised results as Google, but it doesn't make a profile about you</li>
12
+        <li>Searx doesn't care about what you search, never shares anything with a third party, and it can't be used to compromise you</li>
13
+        <li>Searx doesn't make money on ads and it isn't customised based on your interests. You get the pure search results</li>
14
+        <li>Searx is a free software, the code is 100% open and you can help to make it better. See more on <a href="https://gmail.com/asciimoo/searx">github</a></li>
17 15
     </ul>
16
+    <p>If you do care about privacy, want to be a conscious user, moreover believe
17
+    in digital freedom, make Searx your default search engine or run it on your own server</p>
18 18
 
19
-<h2>Engines</h2>
19
+<h2>Technical details - How does it work?</h2>
20 20
 
21
-{% for (categ,search_engines) in categs %}
22
-    <h3>{{ categ.capitalize() }}</h3>
23
-    <ul>
24
-        {% for search_engine in search_engines %}
25
-            {% if not search_engine.private %}
26
-                <li>{{ search_engine.name }}</li>
27
-            {% endif %}
28
-        {% endfor %}
29
-    </ul>
30
-{% endfor %}
31
-<p>Please add more engines to this list, pull requests are welcome!</p>
21
+<p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>,
22
+inspired by the <a href="http://seeks-project.info/">seeks project</a>.<br />
23
+It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they don't show up in our logs, neither in your url history. In case of Chrome* users there is an exception, Searx uses the search bar to perform GET requests.<br />
24
+Searx can be added to your browser's search bar, moreover it can be set as the default search engine.
25
+</p>
26
+
27
+<h2>How can I have my own?</h2>
32 28
 
33
-<h2><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Running public instances</a></h2>
29
+<p>Searx appreciates your suspicion regarding logs, so take the <a href="https://github.com/asciimoo/searx">code</a> and run it yourself! <br />Add your Searx to this <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">list</a> to help other people to have privacy and make the Internet freer!
30
+<br />The more decentralized the Internet is the more freedom we have!</p>
31
+
32
+<hr />
34 33
 
35 34
 <h2 id="faq">FAQ</h2>
36
-<h3>Trust</h3>
37
-<p>It's ok if you don't trust us regarding the logs, <a href="https://github.com/asciimoo/searx">take the code</a> and run it yourself! decentralize!</p>
35
+
38 36
 <h3>How to add to firefox?</h3>
39 37
 <p><a href="#" onclick="window.external.AddSearchProvider(window.location.protocol + '//' + window.location.host + '/opensearch.xml')">Install</a> searx as a search engine on any version of Firefox! (javascript required)</p>
38
+
40 39
 <h2 id="dev_faq">Developer FAQ</h2>
40
+
41 41
 <h3>New engines?</h3>
42 42
 <ul>
43 43
     <li>Edit your engines.cfg, see <a href="https://raw.github.com/asciimoo/searx/master/engines.cfg_sample">sample config</a></li>
44 44
     <li>Create your custom engine module, check the <a href="https://github.com/asciimoo/searx/blob/master/examples/basic_engine.py">example engine</a></li>
45 45
 </ul>
46 46
 <p>Don't forget to restart searx after config edit!</p>
47
-<h3>WSGI support?</h3>
48
-<p><a href="https://about.okhin.fr/posts/Searx/">Okhin wrote</a> a great and detailed article about the setup.</p>
47
+
48
+<h3>Installation/WSGI support?</h3>
49
+<p>See the <a href="https://github.com/asciimoo/searx/wiki/Installation">installation and setup</a> wiki page</p>
50
+
49 51
 <h3>How to debug engines?</h3>
50 52
 <p><a href="/stats">Stats page</a> contains some useful data about the used engines.</p>
53
+
51 54
 </div>
52 55
 {% endblock %}

+ 26
- 0
searx/templates/engines.html Wyświetl plik

@@ -0,0 +1,26 @@
1
+{% extends 'base.html' %}
2
+{% block content %}
3
+<div class="row">
4
+<h2>Currently used search engines</h2>
5
+
6
+    <table style="width: 80%;">
7
+        <tr>
8
+            <th>Engine name</th>
9
+            <th>Category</th>
10
+        </tr>
11
+    {% for (categ,search_engines) in categs %}
12
+        {% for search_engine in search_engines %}
13
+
14
+            {% if not search_engine.private %}
15
+            <tr>
16
+                <td>{{ search_engine.name }}</td>
17
+                <td>{{ categ }}</td>
18
+            </tr>
19
+            {% endif %}
20
+        {% endfor %}
21
+    {% endfor %}
22
+    </table>
23
+<p>Please add more engines to this list, pull requests are welcome!</p>
24
+<p class="right"><a href="/">back</a></p>
25
+</div>
26
+{% endblock %}

+ 8
- 2
searx/webapp.py Wyświetl plik

@@ -70,7 +70,8 @@ def get_base_url():
70 70
 
71 71
 def render(template_name, **kwargs):
72 72
     global categories
73
-    kwargs['categories'] = sorted(categories.keys())
73
+    kwargs['categories'] = ['general']
74
+    kwargs['categories'].extend(x for x in sorted(categories.keys()) if x != 'general')
74 75
     if not 'selected_categories' in kwargs:
75 76
         kwargs['selected_categories'] = []
76 77
         cookie_categories = request.cookies.get('categories', '').split(',')
@@ -183,8 +184,13 @@ def index():
183 184
 
184 185
 @app.route('/about', methods=['GET'])
185 186
 def about():
187
+    return render('about.html')
188
+
189
+
190
+@app.route('/engines', methods=['GET'])
191
+def list_engines():
186 192
     global categories
187
-    return render('about.html', categs=categories.items())
193
+    return render('engines.html', categs=categories.items())
188 194
 
189 195
 
190 196
 @app.route('/preferences', methods=['GET', 'POST'])