| 
									
										
										
										
											2019-12-22 14:05:33 +01:00
										 |  |  | .. _how to contribute:
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | =================
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | How to contribute
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | =================
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-04 16:42:13 +01:00
										 |  |  | .. contents:: Contents
 | 
					
						
							|  |  |  |    :depth: 2
 | 
					
						
							|  |  |  |    :local: | 
					
						
							|  |  |  |    :backlinks: entry
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | Prime directives: Privacy, Hackability
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ======================================
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | Searx has two prime directives, **privacy-by-design and hackability** .  The
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | hackability comes in three levels:
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | - support of search engines
 | 
					
						
							|  |  |  | - plugins to alter search behaviour
 | 
					
						
							|  |  |  | - hacking searx itself
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | Note the lack of "world domination" among the directives.  Searx has no
 | 
					
						
							|  |  |  | intention of wide mass-adoption, rounded corners, etc.  The prime directive
 | 
					
						
							|  |  |  | "privacy" deserves a separate chapter, as it's quite uncommon unfortunately.
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | Privacy-by-design
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | -----------------
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | Searx was born out of the need for a **privacy-respecting** search tool which
 | 
					
						
							|  |  |  | can be extended easily to maximize both, its search and its privacy protecting
 | 
					
						
							|  |  |  | capabilities.
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | A few widely used features work differently or turned off by default or not
 | 
					
						
							|  |  |  | implemented at all **as a consequence of privacy-by-design**.
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | If a feature reduces the privacy preserving aspects of searx, it should be
 | 
					
						
							|  |  |  | switched off by default or should not implemented at all.  There are plenty of
 | 
					
						
							|  |  |  | search engines already providing such features.  If a feature reduces the
 | 
					
						
							|  |  |  | protection of searx, users must be informed about the effect of choosing to
 | 
					
						
							|  |  |  | enable it.  Features that protect privacy but differ from the expectations of
 | 
					
						
							|  |  |  | the user should also be explained.
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | Also, if you think that something works weird with searx, it's might be because
 | 
					
						
							|  |  |  | of the tool you use is designed in a way to interfere with the privacy respect.
 | 
					
						
							|  |  |  | Submitting a bugreport to the vendor of the tool that misbehaves might be a good
 | 
					
						
							|  |  |  | feedback to reconsider the disrespect to its customers (e.g. ``GET`` vs ``POST``
 | 
					
						
							|  |  |  | requests in various browsers).
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | Remember the other prime directive of searx is to be hackable, so if the above
 | 
					
						
							|  |  |  | privacy concerns do not fancy you, simply fork it.
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   *Happy hacking.*
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | Code
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ====
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .. _PEP8: https://www.python.org/dev/peps/pep-0008/
 | 
					
						
							| 
									
										
										
										
											2019-12-24 18:48:23 +01:00
										 |  |  | .. _Conventional Commits: https://www.conventionalcommits.org/
 | 
					
						
							|  |  |  | .. _Git Commit Good Practice: https://wiki.openstack.org/wiki/GitCommitMessages
 | 
					
						
							|  |  |  | .. _Structural split of changes:
 | 
					
						
							|  |  |  |     https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes
 | 
					
						
							| 
									
										
										
										
											2019-12-25 09:57:21 +01:00
										 |  |  | .. _gitmoji: https://gitmoji.carloscuesta.me/
 | 
					
						
							|  |  |  | .. _Semantic PR: https://github.com/zeke/semantic-pull-requests
 | 
					
						
							| 
									
										
										
										
											2019-12-24 18:48:23 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | .. sidebar:: Create good commits!
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    - `Structural split of changes`_
 | 
					
						
							|  |  |  |    - `Conventional Commits`_
 | 
					
						
							|  |  |  |    - `Git Commit Good Practice`_
 | 
					
						
							| 
									
										
										
										
											2019-12-25 09:57:21 +01:00
										 |  |  |    - some like to use: gitmoji_
 | 
					
						
							|  |  |  |    - not yet active: `Semantic PR`_
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | In order to submit a patch, please follow the steps below:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - Follow coding conventions.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |   - PEP8_ standards apply, except the convention of line length
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  |   - Maximum line length is 120 characters
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-24 18:48:23 +01:00
										 |  |  | - The cardinal rule for creating good commits is to ensure there is only one
 | 
					
						
							|  |  |  |   *logical change* per commit / read `Structural split of changes`_
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | - Check if your code breaks existing tests.  If so, update the tests or fix your
 | 
					
						
							|  |  |  |   code.
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | - If your code can be unit-tested, add unit tests.
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | - Add yourself to the :origin:`AUTHORS.rst` file.
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-24 18:48:23 +01:00
										 |  |  | - Choose meaning full commit messages, read `Conventional Commits`_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   .. code::
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      <type>[optional scope]: <description>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      [optional body]
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      [optional footer(s)]
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | - Create a pull request.
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-21 13:15:04 +02:00
										 |  |  | For more help on getting started with searx development, see :ref:`devquickstart`.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | Translation
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | ===========
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | Translation currently takes place on :ref:`transifex <translation>`.
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | .. caution::
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  |    Please, do not update translation files in the repo.
 | 
					
						
							| 
									
										
										
										
											2015-11-17 23:13:30 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-18 16:11:05 +01:00
										 |  |  | .. _contrib docs:
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-12 19:20:56 +01:00
										 |  |  | Documentation
 | 
					
						
							|  |  |  | =============
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | .. _Sphinx: http://www.sphinx-doc.org
 | 
					
						
							|  |  |  | .. _reST: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | .. sidebar:: The reST sources
 | 
					
						
							| 
									
										
										
										
											2015-12-10 21:40:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  |    has been moved from ``gh-branch`` into ``master`` (:origin:`docs`).
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The documentation is built using Sphinx_.  So in order to be able to generate
 | 
					
						
							|  |  |  | the required files, you have to install it on your system.  Much easier, use
 | 
					
						
							| 
									
										
										
										
											2019-12-18 16:11:05 +01:00
										 |  |  | our :ref:`makefile`.
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 15:22:10 +01:00
										 |  |  | Here is an example which makes a complete rebuild:
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | .. code:: sh
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    $ make docs-clean docs
 | 
					
						
							|  |  |  |    ...
 | 
					
						
							|  |  |  |    The HTML pages are in dist/docs.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-18 16:11:05 +01:00
										 |  |  | .. _make docs-live:
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | live build
 | 
					
						
							|  |  |  | ----------
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 15:22:10 +01:00
										 |  |  | .. sidebar:: docs-clean
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    It is recommended to assert a complete rebuild before deploying (use
 | 
					
						
							|  |  |  |    ``docs-clean``).
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-18 16:11:05 +01:00
										 |  |  | Live build is like WYSIWYG.  If you want to edit the documentation, its
 | 
					
						
							|  |  |  | recommended to use.  The Makefile target ``docs-live`` builds the docs, opens
 | 
					
						
							|  |  |  | URL in your favorite browser and rebuilds every time a reST file has been
 | 
					
						
							|  |  |  | changed.
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | .. code:: sh
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 15:22:10 +01:00
										 |  |  |    $ make docs-live
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  |    ...
 | 
					
						
							|  |  |  |    The HTML pages are in dist/docs.
 | 
					
						
							|  |  |  |    ... Serving on http://0.0.0.0:8080
 | 
					
						
							|  |  |  |    ... Start watching changes
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-18 16:11:05 +01:00
										 |  |  | .. _deploy on github.io:
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | deploy on github.io
 | 
					
						
							|  |  |  | -------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To deploy documentation at :docs:`github.io <.>` use Makefile target
 | 
					
						
							| 
									
										
										
										
											2019-12-18 16:11:05 +01:00
										 |  |  | :ref:`make gh-pages`, which will builds the documentation, clones searx into a sub
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  | folder ``gh-pages``, cleans it, copies the doc build into and runs all the
 | 
					
						
							|  |  |  | needed git add, commit and push:
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .. code:: sh
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-13 15:22:10 +01:00
										 |  |  |    $ make docs-clean gh-pages
 | 
					
						
							| 
									
										
										
										
											2019-12-13 14:57:07 +01:00
										 |  |  |    ...
 | 
					
						
							|  |  |  |    SPHINX    docs --> file://<...>/dist/docs
 | 
					
						
							|  |  |  |    The HTML pages are in dist/docs.
 | 
					
						
							|  |  |  |    ...
 | 
					
						
							|  |  |  |    Cloning into 'gh-pages' ...
 | 
					
						
							|  |  |  |    ...
 | 
					
						
							|  |  |  |    cd gh-pages; git checkout gh-pages >/dev/null
 | 
					
						
							|  |  |  |    Switched to a new branch 'gh-pages'
 | 
					
						
							|  |  |  |    ...
 | 
					
						
							|  |  |  |    doc available at --> https://asciimoo.github.io/searx
 |