index.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. ********
  2. searx-qt
  3. ********
  4. Lightweight desktop application for searx
  5. #########################################
  6. This is documentation for searx-qt version 0.1
  7. .. _index:
  8. ******
  9. Index
  10. ******
  11. - `Index <index_>`_
  12. - `About <about_>`_
  13. - - `Summary <about/summary_>`_
  14. - - `Source <about/source_>`_
  15. - - `License <about/license_>`_
  16. - - `Dependencies <about/dependencies_>`_
  17. - `Getting started <getting_started_>`_
  18. - - `Install dependencies <getting_started/install_dependencies_>`_
  19. - - `Installation <getting_started/installation_>`_
  20. - `Usage <usage_>`_
  21. - - `Settings <usage/settings_>`_
  22. - - `Instances <usage/instances_>`_
  23. - - `Search <usage/search_>`_
  24. .. _about:
  25. ******
  26. About
  27. ******
  28. .. _about/summary:
  29. Summary
  30. #######
  31. searx-qt is a lightweight desktop application that lets you search on
  32. public searx instances listed on `https://searx.space`.
  33. Technically searx-qt is a client application that does magic with the searx
  34. API and searx-stats2 it's instances.json
  35. searx
  36. -----
  37. Actual search requests will be made to a server running searx software,
  38. there are many public available. We call such servers 'searx instances'
  39. or in this document we may refer to just 'instance(s)'.
  40. If you are not familiar with the searx project; you can checkout their page
  41. here: https://asciimoo.github.io/searx/ or https://searx.me/
  42. - API Docs: https://asciimoo.github.io/searx/dev/search_api.html
  43. - Source: https://github.com/asciimoo/searx
  44. - License: GPLv3
  45. searx-stats2
  46. ------------
  47. The searx-stats2 project lists public searx instances with statistics. The
  48. original searx-stats2 instance is running at https://searx.space/. This is
  49. where searx-qt will request a list with instances when the update button
  50. is pressed.
  51. - Source: https://github.com/dalf/searx-stats2
  52. - License: GPLv3
  53. .. _about/source:
  54. Source
  55. ######
  56. https://notabug.org/CYBERDEViL/searx-qt
  57. .. _about/license:
  58. License
  59. #######
  60. - GPLv3
  61. - https://www.gnu.org/licenses/gpl-3.0.en.html
  62. .. _about/dependencies:
  63. Dependencies
  64. ############
  65. ======== ========= ========= =====
  66. name version license URL
  67. ======== ========= ========= =====
  68. python 3 PSFL https://docs.python.org/3/license.html
  69. requests - Apache 2 http://docs.python-requests.org/en/master/
  70. PyQt5 - GPLv3 https://www.riverbankcomputing.com/software/pyqt/intro
  71. urllib3 - MIT https://urllib3.readthedocs.io/
  72. ======== ========= ========= =====
  73. Optional for socks proxy support:
  74. ======== ========= ========= =====
  75. name version license URL
  76. ======== ========= ========= =====
  77. pysocks - BSD https://github.com/Anorov/PySocks
  78. ======== ========= ========= =====
  79. .. _getting_started:
  80. ****************
  81. Getting started
  82. ****************
  83. .. _getting_started/install_dependencies:
  84. Install dependencies
  85. ####################
  86. Note: ``python-requests`` is also dependent on ``python-urllib3`` ;
  87. so ``python-urllib3`` will be installed with ``python-requests``
  88. (No need to do a explicit install).
  89. Debian / Ubuntu based
  90. ---------------------
  91. Install required dependencies::
  92. # apt update
  93. # apt upgrade
  94. # apt install python3 python3-requests python3-pyqt5
  95. **Optional** for socks proxy support::
  96. # apt install python3-socks
  97. Arch based
  98. ----------
  99. Install required dependencies::
  100. # pacman -Syu python python-requests python-pyqt5
  101. **Optional** for socks proxy support::
  102. # pacman -S python-pysocks
  103. .. _getting_started/installation:
  104. Installation
  105. ############
  106. It is always recommended to let the package-manager of your system
  107. do the installing of software, so your package-manager will keep
  108. track of files installed. Only use ``setup.py`` directly if you
  109. know what you are doing.
  110. Since searx-qt isn't available in any GNU/Linux distribution (yet?); the
  111. best option is to create a package for your distribution yourself from the
  112. latest release. This will also mean that you have to manually update
  113. searx-qt if there is a new version available.
  114. Note: https://notabug.org/CYBERDEViL/searx-qt/releases
  115. Note: noticed the ``#`` or ``$`` before every command? When there is a
  116. ``$`` before the command, it should be run as a regular user. ``#`` as root.
  117. Debian based
  118. ------------
  119. The steps below describe how to get a specific version of searx-qt; then
  120. package and install it. This method is available from version
  121. ``0.1-beta2`` and up.
  122. 1) Make sure you have ``python3-stdeb`` and ``git`` installed::
  123. # apt install python3-stdeb git
  124. 2) Creating a working directory and ``cd`` in to it, you may
  125. change this to your own preference::
  126. $ mkdir ~/git
  127. $ cd ~/git
  128. 3) Cloning the repository and ``cd`` in to it::
  129. $ git clone "https://notabug.org/CYBERDEViL/searx-qt.git" "searx-qt"
  130. $ cd searx-qt
  131. 4) Checkout a specific version:
  132. Note: get a list with available tags (versions) with the
  133. ``git tag`` command.
  134. Below is a example to checkout version ``0.1-beta2``::
  135. $ git checkout 0.1-beta2
  136. 5) Create .deb::
  137. $ ./utils/gen_deb.sh
  138. 6) Install the created package::
  139. # dpkg -i ./deb_dist/python3-searx-qt_0.1-beta2-1_all.deb
  140. Arch based
  141. ----------
  142. For Arch based distributions there is a package available in the AUR;
  143. https://aur.archlinux.org/packages/searx-qt/
  144. 1) Make sure you have ``git`` installed::
  145. # pacman -S git
  146. 2) Creating a working directory and ``cd`` in to it, you may change this
  147. to your own preference::
  148. $ mkdir ~/pkg
  149. $ cd ~/pkg
  150. 3) Getting the ``PKGBUILD`` from Arch AUR::
  151. $ git clone https://aur.archlinux.org/searx-qt.git
  152. $ cd searx-qt
  153. 4) Build and install searx-qt package::
  154. $ makepkg -si
  155. .. _usage:
  156. ******
  157. Usage
  158. ******
  159. .. _usage/settings:
  160. Settings
  161. ########
  162. .. image:: images/settings.png
  163. :align: right
  164. Connection
  165. ----------
  166. Verify (SSL)
  167. ============
  168. Request will fail on a invalid SSL/TLS certificate.
  169. Leave checked if unsure.
  170. See
  171. https://requests.readthedocs.io/en/master/user/advanced/#ssl-cert-verification
  172. for a more technical description.
  173. Timeout
  174. =======
  175. Timeout in seconds for a single request.
  176. Leave it at the default value of 10 seconds if unsure.
  177. See https://requests.readthedocs.io/en/master/user/advanced/#timeouts for a
  178. more technical description.
  179. Proxy
  180. =====
  181. Here you can set a proxy that will be used for every connection searx-qt
  182. makes. Leave the input field blank to use no proxy.
  183. The 'Http' section can be used to proxy plain http:// requests to for
  184. example instances without a certificate. The 'Https' section can be used
  185. to proxy all https:// requests to instances (including fetching the
  186. instances list data from https://searx.space) with a certificate. So you
  187. can use a separate proxy for both protocols.
  188. If you use a socks4 or socks5 proxy you probably want to make sure the
  189. 'Proxy DNS' checkbox is checked so DNS requests will also go through the
  190. proxy. DNS proxy is not available for a http proxy type.
  191. searx-stats2
  192. ------------
  193. Here you can change the URL of the searx-stats2 instance you like to use
  194. for fetching the instances data.
  195. .. _usage/instances:
  196. Instances
  197. #########
  198. .. image:: images/instances.png
  199. :align: right
  200. A searx instance is a server running the searx project. Since we want to
  201. preform searches to searx instance(s) we need addresses of those
  202. instance(s); those will be fetched from
  203. ``https://searx.space/data/instances.json``. The ``instances.json``
  204. from ``search.space`` also contains a lot of other data about the
  205. instances it lists; which we can use to filter instances based on our
  206. preferences.
  207. The interface to manage instances is on the right. This is used to update
  208. the instances data with a press on the 'Update' button; filter the
  209. instances and browse/use the leftover instances in the instances table.
  210. Update instances table
  211. ----------------------
  212. If searx-qt is used for the first time you will need to update the
  213. instances table. There is a 'Update' button between the Filter and the
  214. Table that can be used for this. searx-qt will not update this automatically!
  215. It maybe useful to update the instances data so now and then since public
  216. instances appear, disappear and their stats change over time.
  217. .. _usage/instances/table:
  218. Instances table
  219. ---------------
  220. The instances table can be used to browse instances with their data that
  221. remain after all filters. The table is also used to set the current
  222. instance by left-clicking on one.
  223. Right-clicking in the table opens a context-menu from where you can do
  224. the following:
  225. - Blacklist selected instance(s).
  226. - Copy selected instance(s) it's/their URL(s).
  227. - Select All instances (CTRL+A should do the same).
  228. - Hide or show columns.
  229. The currently used instance should also be visible bottom right in the
  230. application it's status-bar.
  231. Filter instances
  232. ----------------
  233. When a filter is enabled and the instance it's value that is being
  234. matched is unknown then it is excluded by default!
  235. Network
  236. =======
  237. Filter instances on network type. Only instances that match one of the
  238. checked network types remain.
  239. Require ASN privacy
  240. ===================
  241. Excludes instances that run their server at a known malicious network.
  242. Like for example CloudFlare, Google, Akamai etc..
  243. This does not give any guarantee, it only filters **known** privacy
  244. violators!
  245. For a full list of known malicious networks (technical):
  246. https://github.com/dalf/searx-stats2/blob/master/searxstats/data/asn.py
  247. Require IPv6
  248. ============
  249. Exclude instances that don't have at least one IPv6 address.
  250. Version
  251. =======
  252. Include only instances that have a searx version that has been added to
  253. this widget. Leave empty to allow all searx versions.
  254. Blacklist
  255. =========
  256. Here are the URLs of the instances that have been manually blacklisted.
  257. There is a button right to each blacklist item to remove it from the
  258. blacklist.
  259. You can manually blacklist a instance by right clicking on a instance in
  260. the instances table and click 'Add to blacklist'; multiple instances can
  261. be blacklisted at once.
  262. .. _usage/search:
  263. Search
  264. ######
  265. .. _usage/search/bar:
  266. Search bar
  267. ------------------------
  268. .. image:: images/search_bar.png
  269. .. _usage/search/bar/fallback:
  270. Fallback
  271. ========
  272. If checked it will pick a random instance from the instances table if a
  273. search request fails one way or another and re-try the same request with
  274. the freshly picked instance. There is a maximum amount of 10 tries (10
  275. different instances to try the same request on).
  276. What is fail?
  277. - Connection errors including timeout.
  278. - Wrong status code (not 200).
  279. - No or malformed results returned.
  280. .. _usage/search/random_every:
  281. Random every
  282. ============
  283. If checked it will automatically pick a random instance on a search request,
  284. it will also hide the 'Random search button' because it makes it obsolete.
  285. If not checked it will do search requests on the same instance unless the
  286. request fails somehow and 'Fallback' is checked. Exception is when the
  287. 'Random search button' is used for the search request.
  288. .. _usage/search/bar/random_search_button:
  289. Random search button
  290. ====================
  291. When pressed it will pick a random instance from the list and preform the
  292. search request.
  293. .. _usage/search/bar/reload_button:
  294. Reload button
  295. =============
  296. When pressed it basically preforms a search request without 'Fallback'
  297. whenever it is enabled or not, it also doesn't reset the page number. So
  298. it can act as a reload button thus it's name, but it does more.
  299. Note: When a search argument like the search query, instance URL,
  300. categories/engines etc. has changed by user interaction it will do the
  301. request with those changes, that isn't a real reload of the previous
  302. request.
  303. Dev-note: Probably this behavior should change or the name/icon should
  304. change to something more fitting.
  305. .. _usage/search/bar/search_button:
  306. Search button
  307. =============
  308. Preform a search request on the currently selected instance.
  309. Page number is reset, 'Fallback' and 'Random Every' options are honored.
  310. .. _usage/search/bar/search_query_input:
  311. Search query input
  312. ==================
  313. The query you like to search for.
  314. See https://asciimoo.github.io/searx/user/search_syntax.html for what is
  315. possible.
  316. It will do a search request on ``enter`` key pressed, same behavior as
  317. when the 'Search button' has been pressed.
  318. .. _usage/search/options:
  319. Search options
  320. --------------
  321. .. image:: images/search_options.png
  322. Right clicking in (on the picture above) the dark area opens a
  323. context-menu where you can manage what options you want to be visible or
  324. not.
  325. .. _usage/search/options/categories:
  326. Categories
  327. ==========
  328. These are predefined by searx but can vary by instance. Example if
  329. 'Images' is checked it will only use engines with images enabled. If
  330. 'Files' is checked it will only use engines with files enabled.
  331. searx-qt only passes this info to a searx instance with a search request,
  332. it will not automatically filter the instances table (yet).
  333. .. _usage/search/options/engines:
  334. Engines
  335. =======
  336. Here you can toggle what search engines should be enabled. It will
  337. automatically filter out all instances from the instances table that doesn't
  338. have at least one of the checked engines enabled. The checked engines will
  339. be send with a search request to a searx instance with the `enabled_engines`
  340. param. You should only get results from engines that are checked.
  341. If no engine is checked it means that it may return results of any engine
  342. in the list, unless one or more of the
  343. `categories <usage/search/options/categories_>`_ are checked.
  344. The list with engines is created with data from the
  345. `instances table <usage/instances/table_>`_, so only engines are listed that
  346. are available from the instances table.
  347. .. _usage/search/options/period:
  348. Period
  349. ======
  350. Search period you like results from. Options are ``Last day``,
  351. ``Last week``, ``Last month`` or ``Last year``.
  352. .. _usage/search/options/language:
  353. Language
  354. ========
  355. If you want results in a specific language than you can select one here.