on master help sign in
[enh] csv/json download buttons
d1dd636asciimoo
searx/templates/results.html+14
@@ -18,5 +18,19 @@
18 {% include 'result_templates/default.html' %}
18 {% include 'result_templates/default.html' %}
19 {% endif %}
19 {% endif %}
20 {% endfor %}
20 {% endfor %}
21+ <form method="post" action="">
22+ <div class="left">
23+ <input type="hidden" name="q" value="{{ q }}" />
24+ <input type="hidden" name="format" value="csv" />
25+ <input type="submit" value="download results in csv" />
26+ </div>
27+ </form>
28+ <form method="post" action="">
29+ <div class="">
30+ <input type="hidden" name="q" value="{{ q }}" />
31+ <input type="hidden" name="format" value="json" />
32+ <input type="submit" value="download results in json" />
33+ </div>
34+ </form>
21</div>
35</div>
22{% endblock %}
36{% endblock %}
searx/templates/search.html+1−1
@@ -1,4 +1,4 @@
1−<form method="post" action="/" id="search_form">
1+<form method="post" action="" id="search_form">
2<div id="search_wrapper">
2<div id="search_wrapper">
3 <input type="text" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
3 <input type="text" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
4 <input type="submit" value="" id="search_submit" />
4 <input type="submit" value="" id="search_submit" />