Merge pull request #614 from kvch/gh-pages

documentation updates
This commit is contained in:
Adam Tauber 2016-07-10 08:28:00 +02:00 committed by GitHub
commit 7bd30fd21b
6 changed files with 128 additions and 32 deletions

View File

@ -38,6 +38,8 @@ div.bodywrapper {
div.sphinxsidebar {
width: {{ sidebar_width }};
word-wrap: normal !important;
overflow-wrap: normal !important;
}
hr {

78
docs/admin/api.rst Normal file
View File

@ -0,0 +1,78 @@
.. _adminapi:
Administration API
------------------
Get configuration data
~~~~~~~~~~~~~~~~~~~~~~
.. code:: sh
GET /config
Sample response
```````````````
.. code:: sh
{
"autocomplete": "",
"categories": [
"map",
"it",
"images",
],
"default_locale": "",
"default_theme": "oscar",
"engines": [
{
"categories": [
"map"
],
"enabled": true,
"name": "openstreetmap",
"shortcut": "osm"
},
{
"categories": [
"it"
],
"enabled": true,
"name": "arch linux wiki",
"shortcut": "al"
},
{
"categories": [
"images"
],
"enabled": true,
"name": "google images",
"shortcut": "goi"
},
{
"categories": [
"it"
],
"enabled": false,
"name": "bitbucket",
"shortcut": "bb"
},
],
"instance_name": "searx",
"locales": {
"de": "Deutsch (German)",
"en": "English",
"eo": "Esperanto (Esperanto)",
},
"plugins": [
{
"enabled": true,
"name": "HTTPS rewrite"
},
{
"enabled": false,
"name": "Vim-like hotkeys"
}
],
"safe_search": 0
}

View File

@ -49,7 +49,7 @@ master_doc = 'index'
# General information about the project.
project = u'searx'
copyright = u'2015, Adam Tauber'
copyright = u'2015-2016, Adam Tauber'
author = u'Adam Tauber'
# The version info for the project you're documenting, acts as replacement for
@ -57,9 +57,9 @@ author = u'Adam Tauber'
# built documents.
#
# The short X.Y version.
version = '0.8.0'
version = '0.9.0'
# The full version, including alpha/beta/rc tags.
release = '0.8.0'
release = '0.9.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -1,11 +1,11 @@
Plugins
-------
Plugins can extend/replace functionality of various components inside
Plugins can extend or replace functionality of various components of
searx.
example\_plugin.py
~~~~~~~~~~~~~~~~~~
Example plugin
~~~~~~~~~~~~~~
.. code:: python
@ -24,22 +24,22 @@ example\_plugin.py
ctx['search'].suggestions.add('example')
return True
Currently implemented plugin entry points (a.k.a hooks)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Plugin entry points
~~~~~~~~~~~~~~~~~~~
- Pre search hook (``pre_search``)
- Post search hook (``post_search``)
- Result hook (``on_result``) (is called if a new result is added (see
https\_rewrite plugin))
Entry points (hooks) define when a plugin runs. Right now only three hooks are implemented. So feel free to implement a hook if it fits the behaviour of your plugin.
Feel free to add more hooks to the code if it is required by a plugin.
Pre search hook
```````````````
TODO
~~~~
Runs BEFORE the search request. Function to implement: ``pre_search``
- Better documentation
- More hooks
- search hook (is called while searx is requesting results (for
example: things like math-solver), the different hooks are running
parallel)
Post search hook
````````````````
Runs AFTER the search request. Function to implement: ``post_search``
Result hook
```````````
Runs when a new result is added to the result list. Function to implement: ``on_result``

View File

@ -1,13 +1,20 @@
Search API
==========
Search API endpoints: ``/``, ``/search``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The search supports both ``GET`` and ``POST``. However, using ``GET`` the parameters of the request remain hidden. So it is advised to use ``GET`` for querying.
Endpoints have equivalent functionality.
Furthermore, two enpoints ``/`` and ``/search`` are available for querying.
.. code:: sh
GET /
.. code:: sh
GET /search
Parameters
^^^^^^^^^^
``````````
+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
| Name | Description | |
@ -18,7 +25,7 @@ Parameters
+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
| ``engines`` | Comma separated list, specifies the active search engines | optional |
+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
| ``lang`` | Code of the language | optional (default: ``all``) |
+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
| ``pageno`` | Search page number | optional (default: ``1``) |
+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+
Both ``GET`` and ``POST`` methods are supported.

View File

@ -1,7 +1,7 @@
Privacy-respecting free metasearch engine
=========================================
Welcome to searx
================
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.
Searx is a free software internet metasearch engine which aggregates results from more than 70 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.
Features
@ -15,16 +15,26 @@ Features
- Does not collect its users data
- Offers secure, encrypted connections (HTTPS/SSL)
- Hosted by organisations, such as La Quadrature du Net, which promote digital rights
- About 70 supported search engines
- Easy intergration with any search engine
Further reading
---------------
User documentation
------------------
.. toctree::
:maxdepth: 1
user/search_syntax
Administrator documentation
---------------------------
.. toctree::
:maxdepth: 1
dev/install/installation
admin/api
Developer documentation
-----------------------
@ -34,7 +44,6 @@ Developer documentation
dev/quickstart
dev/contribution_guide
dev/install/installation
dev/engine_overview
dev/search_api
dev/plugins