on master help sign in
Merge branch 'master' of https://github.com/asciimoo/searx
commita62b94e21c4c521430fb3b37f4241adb1faee63c authorpw3t <romain@berthor.fr> dateFri 17 Jan 2014, 20:32 (13 years ago) parentdd1baa6cc5e7e9
7 files changed+79−32
engines.cfg_sample+5−1 searx/engines/piratebay.py+1 searx/static/css/style.css+11−4 searx/static/img/searx.png searx/templates/about.html+28−25 searx/templates/engines.html+26 searx/webapp.py+8−2
engines.cfg_sample+5−1
@@ -22,6 +22,10 @@ engine = duckduckgo_definitions
2222engine = duckduckgo
2323locale = en-us
2424
25+[filecrop]
26+engine = filecrop
27+categories = files
28+
2529[flickr]
2630engine = flickr
2731categories = images
@@ -44,7 +48,7 @@ categories = images
4448
4549[piratebay]
4650engine = piratebay
47−categories = videos, music
51+categories = videos, music, files
4852
4953[soundcloud]
5054engine = soundcloud
searx/engines/piratebay.py+1
@@ -9,6 +9,7 @@ url = 'https://thepiratebay.se/'
99search_url = url + 'search/{search_term}/0/99/{search_type}'
1010search_types = {'videos': '200'
1111 ,'music' : '100'
12+ ,'files' : '0'
1213 }
1314
1415def request(query, params):
searx/static/css/style.css+11−4
@@ -25,7 +25,16 @@ body, #container {
2525.row p { padding: 0 10px; max-width: 700px; }
2626.row h3,ul { margin: 4px 8px;}
2727
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; }
2938
3039.top_margin { margin-top: 60px; }
3140
@@ -113,9 +122,7 @@ tr:hover td { background: #DDDDDD; }
113122.center #search_wrapper { margin-left: auto; margin-right: auto; }
114123.q {
115124 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;
119126 color: #222222;
120127 font-size: 16px;
121128 height: 28px;
searx/static/img/searx.png

Binary file not shown.

searx/templates/about.html+28−25
@@ -4,49 +4,52 @@
44<div class="row">
55 <h1>About <a href="/">searx</a></h1>
66
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.
108 </p>
11− <h2>What makes searx different</h2>
9+ <h2>Why use Searx?</h2>
1210 <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>
1715 </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>
1818
19−<h2>Engines</h2>
19+<h2>Technical details - How does it work?</h2>
2020
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>
3228
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 />
3433
3534<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+
3836<h3>How to add to firefox?</h3>
3937<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+
4039<h2 id="dev_faq">Developer FAQ</h2>
40+
4141<h3>New engines?</h3>
4242<ul>
4343 <li>Edit your engines.cfg, see <a href="https://raw.github.com/asciimoo/searx/master/engines.cfg_sample">sample config</a></li>
4444 <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>
4545</ul>
4646<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+
4951<h3>How to debug engines?</h3>
5052<p><a href="/stats">Stats page</a> contains some useful data about the used engines.</p>
53+
5154</div>
5255{% endblock %}
searx/templates/engines.htmlnew file+26
@@ -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 %}
searx/webapp.py+8−2
@@ -70,7 +70,8 @@ def get_base_url():
7070
7171def render(template_name, **kwargs):
7272 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')
7475 if not 'selected_categories' in kwargs:
7576 kwargs['selected_categories'] = []
7677 cookie_categories = request.cookies.get('categories', '').split(',')
@@ -183,8 +184,13 @@ def index():
183184
184185@app.route('/about', methods=['GET'])
185186def about():
187+ return render('about.html')
188+
189+
190+@app.route('/engines', methods=['GET'])
191+def list_engines():
186192 global categories
187− return render('about.html', categs=categories.items())
193+ return render('engines.html', categs=categories.items())
188194
189195
190196@app.route('/preferences', methods=['GET', 'POST'])