index.rst 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099
  1. ********
  2. Searx-Qt
  3. ********
  4. Desktop client application for Searx/SearXNG/searx-space
  5. ########################################################
  6. This is documentation for Searx-Qt version 0.5.0-alpha1
  7. .. image:: images/screenshot_0_4a1.png
  8. :alt: Searx-Qt v0.4 screenshot.
  9. :class: header
  10. .. _index:
  11. ******
  12. Index
  13. ******
  14. - `Index <index_>`_
  15. - `About <about_>`_
  16. - - `Summary <about/summary_>`_
  17. - - `Source <about/source_>`_
  18. - - `License <about/license_>`_
  19. - - `Dependencies <about/dependencies_>`_
  20. - - `Translations <about/translations_>`_
  21. - - `Contact <about/contact_>`_
  22. - `Getting started <getting_started_>`_
  23. - - `Install dependencies <getting_started/install_dependencies_>`_
  24. - - `Installation <getting_started/installation_>`_
  25. - `Usage <usage_>`_
  26. - - `Profiles <usage/profiles_>`_
  27. - - `Settings <usage/settings_>`_
  28. - - - `General <usage/settings/general_>`_
  29. - - - `Connection <usage/settings/connection_>`_
  30. - - - `SearXNG <usage/settings/searxng_>`_
  31. - - - `Searx-Space <usage/settings/searxspace_>`_
  32. - - - `Guard <usage/settings/guard_>`_
  33. - - `Instances <usage/instances_>`_
  34. - - `Search <usage/search_>`_
  35. - `Troubleshooting <troubleshooting_>`_
  36. - - `Searx-Qt won't start <troubleshooting/wontstart_>`_
  37. - `Development <development_>`_
  38. - - `Themes <development/themes_>`_
  39. - - `Translations <development/translations_>`_
  40. .. _about:
  41. *****************
  42. `About <about_>`_
  43. *****************
  44. .. _about/summary:
  45. `Summary <about/summary_>`_
  46. ###########################
  47. Search with ``Searx``/``SearXNG`` instances without the need for a complex
  48. web-browser.
  49. Searx-Qt is a desktop application that lets you search on
  50. public ``SearXNG`` instances listed on ``https://searx.space`` (or you
  51. can add ``Searx`` or ``SearXNG`` instance urls manually).
  52. The aim of the project is to preform search operations on ``Searx``/
  53. ``SearXNG`` instances with the use of their API and without the need for a
  54. complex web-browser. ``Searx-Qt`` will do the bare minimum of what is
  55. required to search, no cookies and no javascript. Just render a
  56. ``Searx``/``SearXNG`` API request to something usefull.
  57. Unfortunately most public ``SearXNG`` instances actively block requests to
  58. their ``JSON-API``. *But don't worry!* Thats why there is a option in the
  59. `SearXNG settings <usage/settings/searxng_>`_ (which is on by default) to
  60. parse ``HTML`` instead, and still no javascript and no cookies.
  61. Since version ``0.2`` it is also possible to manage your own (private?)
  62. instances with the use of a 'user' profile.
  63. Searx
  64. -----
  65. The ``Searx`` project is no longer maintained but for now ``Searx-Qt``
  66. will still support it.
  67. - API Docs: https://searx.github.io/searx/dev/search_api.html
  68. - Source: https://github.com/searx/searx
  69. - License: AGPL3
  70. - Status: Inactive
  71. SearXNG
  72. -------
  73. - API Docs: https://docs.searxng.org/dev/search_api.html
  74. - Source: https://github.com/searxng/searxng
  75. - License: AGPL3
  76. - Status: Active
  77. searx-space
  78. -----------
  79. The ``searx-space`` project lists public ``SearXNG`` instances with
  80. statistics. The official instance is running at ``https://searx.space/``.
  81. This is where ``Searx-Qt`` will request a list with instances when the update
  82. button is pressed by default (the ``searx-space`` url can be changed in the
  83. settings).
  84. - Source: https://github.com/searxng/searx-space
  85. - License: AGPL3
  86. .. _about/source:
  87. `Source <about/source_>`_
  88. #########################
  89. https://notabug.org/CYBERDEViL/searx-qt
  90. .. _about/license:
  91. `License <about/license_>`_
  92. ###########################
  93. - GPL3 https://www.gnu.org/licenses/gpl-3.0.en.html
  94. .. _about/dependencies:
  95. `Dependencies <about/dependencies_>`_
  96. #####################################
  97. ============== ========= ========= =====
  98. name version license URL
  99. ============== ========= ========= =====
  100. python 3 PSFL https://docs.python.org/3/license.html
  101. requests - Apache 2 http://docs.python-requests.org/en/master/
  102. jsonschema >= 4.10 MIT https://github.com/python-jsonschema/jsonschema
  103. PyQt5 - GPL3 https://www.riverbankcomputing.com/software/pyqt/intro
  104. urllib3 - MIT https://urllib3.readthedocs.io/
  105. beautifulsoup4 - MIT https://www.crummy.com/software/BeautifulSoup/
  106. ============== ========= ========= =====
  107. **Optional for socks proxy support**:
  108. ======== ========= ========= =====
  109. name version license URL
  110. ======== ========= ========= =====
  111. pysocks - BSD https://github.com/Anorov/PySocks
  112. ======== ========= ========= =====
  113. **Building**:
  114. ========= ========= ========= =====
  115. name version license URL
  116. ========= ========= ========= =====
  117. gettext - GPL https://www.gnu.org/software/gettext/
  118. PyQt5-dev Qt5 GPL3 https://www.riverbankcomputing.com/software/pyqt/intro
  119. ========= ========= ========= =====
  120. .. _about/translations:
  121. `Translations <about/translations_>`_
  122. #####################################
  123. The default language is English.
  124. Since version ``0.2`` Searx-Qt is able (application-wise, not search results)
  125. to be fully translated with the use of gettext and `.po .pot` files. However
  126. the only translation available currently is for the Dutch language. If you
  127. like to translate Searx-Qt in your language then you can find a example of how
  128. to do that in the `development section <development_>`_. Please consider
  129. opening a PR on ``https://notabug.org/CYBERDEViL/searx-qt`` after your
  130. translation has finished.
  131. .. _about/contact:
  132. `Contact <about/contact_>`_
  133. ###########################
  134. Please open an issue on ``https://notabug.org/cyberdevil/searx-qt``.
  135. You may also want to see if anyone is online on IRC at ``#searx-qt`` at
  136. ``irc.libera.chat:6697``.
  137. .. _getting_started:
  138. **************************************
  139. `Getting started <getting_started_>`_
  140. **************************************
  141. .. _getting_started/install_dependencies:
  142. `Install dependencies <getting_started/install_dependencies_>`_
  143. ###############################################################
  144. **Note:** ``python-requests`` is also dependent on ``python-urllib3`` ;
  145. so ``python-urllib3`` will be installed with ``python-requests``
  146. (No need to do a explicit install).
  147. Debian / Ubuntu based
  148. ---------------------
  149. Install required dependencies::
  150. # apt update
  151. # apt upgrade
  152. # apt install python3 python3-requests python3-pyqt5 gettext \
  153. pyqt5-dev-tools python3-jsonschema python3-bs4
  154. **Optional** for socks proxy support::
  155. # apt install python3-socks
  156. Arch based
  157. ----------
  158. Install required dependencies::
  159. # pacman -Syu python python-requests python-jsonschema python-pyqt5 \
  160. python-beautifulsoup4 gettext qt5-tools
  161. **Optional** for socks proxy support::
  162. # pacman -S python-pysocks
  163. .. _getting_started/installation:
  164. `Installation <getting_started/installation_>`_
  165. ###############################################
  166. It is always recommended to let the package-manager of your system
  167. do the installing of software, so your package-manager will keep
  168. track of files installed. Only use ``setup.py`` directly if you
  169. know what you are doing.
  170. Since Searx-Qt isn't available in any GNU/Linux distribution (yet?); the
  171. best option is to create a package for your distribution yourself from the
  172. latest release. This will also mean that you have to manually update
  173. Searx-Qt if there is a new version available.
  174. **Note:** https://notabug.org/CYBERDEViL/searx-qt/releases
  175. **Note:** noticed the ``#`` or ``$`` before every command? When there is a
  176. ``$`` before the command, it should be run as a regular user. ``#`` as root.
  177. Debian based
  178. ------------
  179. The steps below describes how to get a specific version of ``Searx-Qt``; then
  180. package and install it. This method is available from version
  181. ``0.1-beta2`` and up.
  182. 1) Make sure you have ``python3-stdeb`` and ``git`` installed::
  183. # apt install python3-stdeb git
  184. 2) Creating a working directory and ``cd`` in to it, you may
  185. change this to your own preference::
  186. $ mkdir ~/git
  187. $ cd ~/git
  188. 3) Cloning the repository and ``cd`` in to it::
  189. $ git clone "https://notabug.org/CYBERDEViL/searx-qt.git" "searx-qt"
  190. $ cd searx-qt
  191. 4) Checkout a specific version:
  192. **Note:** get a list with available tags (versions) with the
  193. ``git tag`` command.
  194. Below is a example to checkout version ``0.5-alpha1``::
  195. $ git checkout 0.5-alpha1
  196. 5) Create .deb::
  197. $ ./utils/gen_deb.sh
  198. 6) Install the created package::
  199. # dpkg -i ./deb_dist/python3-searx-qt_0.5-alpha1-1_all.deb
  200. Arch based
  201. ----------
  202. For Arch based distributions there is a package available in the AUR;
  203. https://aur.archlinux.org/packages/searx-qt/
  204. 1) Make sure you have ``git`` installed::
  205. # pacman -S git
  206. 2) Creating a working directory and ``cd`` in to it, you may change this
  207. to your own preference::
  208. $ mkdir ~/pkg
  209. $ cd ~/pkg
  210. 3) Getting the ``PKGBUILD`` from Arch AUR::
  211. $ git clone https://aur.archlinux.org/searx-qt.git
  212. $ cd searx-qt
  213. 4) Build and install Searx-Qt package::
  214. $ makepkg -si
  215. .. _usage:
  216. ******************
  217. `Usage <usage_>`_
  218. ******************
  219. .. _usage/profiles:
  220. `Profiles <usage/profiles_>`_
  221. #############################
  222. .. image:: images/profiles_window.png
  223. :alt: Profiles window
  224. :align: right
  225. Profiles are useful when you want to have different settings and/or data without
  226. to having to set it manually every-time. For example you can create a profile
  227. named `Tor` which has different proxy and stats2 settings then you normal
  228. profile.
  229. There are two types of profiles:
  230. - `Stats2` profile
  231. - `User` profile
  232. The profile type names maybe changed to something better, suggestions are
  233. welcome.
  234. Create a `Stats2` profile if you wish to get/update a list of Searx-instances
  235. from a `Searx-Stats2` instance. For example the default `https://searx.space`.
  236. Create a `User` profile if you wish to add/remove/update your own list with
  237. Searx-instances.
  238. | **NOTE**: Profile types cannot be changed after the creation of the profile,
  239. | but you can add multiple profiles of both types.
  240. Creating new profile
  241. --------------------
  242. On first usage of `Searx-Qt` you will need to create a new profile. The `Add`
  243. button (of the "Profile select" window) will open a dialog to do so.
  244. There are profile settings presets (Web, Tor, i2p) which you can choose from.
  245. The Tor preset sets the proxy to ``127.0.0.1:9050`` and
  246. changes the Searx-Stats2 instance url to the onion address. The i2p preset
  247. sets the proxy to ``127.0.0.1:4444``, it also adds some known
  248. i2p instances of Searx.
  249. .. image:: images/profiles_new.png
  250. :alt: Create new profile dialog
  251. Deleting a profile
  252. ------------------
  253. I hope that it is self explanatory that the `Delete` button of the
  254. "Profile select" window deletes the currently selected profile, it will ask
  255. for confirmation before doing so.
  256. It is not possible to delete a active profile (at-least it shouldn't ;-)).
  257. .. _usage/settings:
  258. `Settings <usage/settings_>`_
  259. #############################
  260. .. _usage/settings/general:
  261. `General <usage/settings/general_>`_
  262. ------------------------------------
  263. .. image:: images/settings_general.png
  264. :align: right
  265. Theme
  266. =====
  267. A ``Theme`` is a Searx-Qt specific ``stylesheet`` and the ``Base style`` is a
  268. Qt theme/style.
  269. The Searx-Qt specific ``Theme`` does override the ``Base style``.
  270. CLI output level
  271. ================
  272. The amount of CLI spam can be set here.
  273. - ``Info`` does print to ``stdout``.
  274. - ``Warning`` does print to ``stderr``.
  275. - ``Debug`` does print to ``stderr``.
  276. - ``Errror`` does print to ``stderr``.
  277. .. _usage/settings/connection:
  278. `Connection <usage/settings/connection_>`_
  279. ------------------------------------------
  280. .. image:: images/settings_connection.png
  281. :align: center
  282. Verify (SSL)
  283. ============
  284. Request will fail on a invalid SSL/TLS certificate.
  285. Leave checked if unsure.
  286. See
  287. https://requests.readthedocs.io/en/master/user/advanced/#ssl-cert-verification
  288. for a more technical description.
  289. Timeout
  290. =======
  291. Timeout in seconds for a single request.
  292. Leave it at the default value of 10 seconds if unsure.
  293. See https://requests.readthedocs.io/en/master/user/advanced/#timeouts for a
  294. more technical description.
  295. Proxy
  296. =====
  297. Here you can set a proxy that will be used for every connection Searx-Qt
  298. makes.
  299. The set proxy will apply to both ``HTTP`` and ``HTTPS`` requests.
  300. If you use a ``socks4`` or ``socks5`` proxy you probably want to make sure the
  301. 'Proxy DNS' checkbox is checked so DNS requests will also go through the
  302. proxy. DNS proxy is not available for a http proxy type.
  303. User-agents
  304. ===========
  305. What user-agent string should Searx-Qt send?
  306. After pressing the `Edit` button it will change to a `Save` button, you will
  307. be able to edit the user-agent ?string(s) Searx-Qt will send. Some notes:
  308. - One user-agent string per line.
  309. - Set total blank to not send any user-agent string.
  310. When the `Random` checkbox is checked and there are multiple user-agent
  311. strings set then Searx-Qt will pick a random user-agent string from the list
  312. for every request.
  313. Extra headers
  314. =============
  315. Excluding the ``User-Agent`` string, these are the headers ``Searx-Qt`` will
  316. send. As well the header key as the value should between double quotes ("),
  317. the key and the value should be separated by at least one space. **Edit these
  318. only when you know what you are doing!**
  319. .. _usage/settings/searxng:
  320. `SearXNG <usage/settings/searxng_>`_
  321. ------------------------------------
  322. .. image:: images/settings_searxng.png
  323. :align: right
  324. Parse HTML
  325. ==========
  326. When this is enabled ``Searx-Qt`` will request ``HTML`` on search request and
  327. not make use of the ``SearXNG`` ``JSON-API``. The ``HTML`` will be parsed and
  328. turned into a ``JSON`` object, what will be processed as usual.
  329. This is enabled by default.
  330. Safe Search
  331. ===========
  332. When this option is enabled it will simply send ``safesearch: "1"`` with a
  333. search requests. It is whatever ``SearXNG`` and the search engines it relies
  334. upon will do with it.
  335. It is assumed that NSFW results are left out (filtered-out). So when left
  336. unchecked NSFW content may be returned, and when checked there should be none
  337. (BUT NO GUARANTEE).
  338. This is disabled by default.
  339. .. _usage/settings/searxspace:
  340. `Searx-Space <usage/settings/searxspace_>`_
  341. -------------------------------------------
  342. Here you can change the URL of the Searx-Stats2 instance you like to use
  343. for fetching the instances data.
  344. | **NOTE**: This is only available for a `Stats2` profile type.
  345. .. _usage/instances:
  346. .. _usage/settings/guard:
  347. `Guard <usage/settings/guard_>`_
  348. --------------------------------
  349. Guard can put instances on a timeout or the blacklist when they are failing
  350. and is enabled by default.
  351. When the Guard rules are set properly, searches will be quicker over time
  352. since failing instances are not used anymore. This reduces the chance of
  353. requesting a search query to a instance that probably will fail again. Also
  354. some instances block our request for whatever reason they have, and there is
  355. no standard response so they all may (and many will) respond differently (Thus
  356. we can not properly detect when we may use the API and when not).
  357. - It should be obvious that when ``Enable guard`` is checked \
  358. that Guard is enabled, when not checked Guard is disabled.
  359. - When Guard is enabled it is advised to also enable the ``Store log`` \
  360. option so that old failures can be evaluated against new failures after \
  361. Searx-Qt has been restarted.
  362. - Below the ``Store log`` option is a spinbox that defines for how long log \
  363. entries will be stored (in days).
  364. - A rule defines what a fail is and what should happen with the failing \
  365. instance.
  366. .. image:: images/settings_guard.png
  367. :align: right
  368. Rules
  369. =====
  370. A rule has the following variables:
  371. - ``Error Type``, the type of error.
  372. - ``Amount`` of fails.
  373. - ``Timeframe`` in which the ``Amount`` of fails have to occur.
  374. - ``Status``, the HTTP response code. (Only used for the ``WrongStatus`` \
  375. ``Error type``).
  376. - ``Destination``, what should happen to the instance? Should Guard put it on
  377. the blacklist or on a timeout?
  378. - ``Duration`` in minutes of the timeout. (Only used when ``Destionation`` \
  379. is set to ``Timeout``). When ``Timeout`` is used as ``Destination`` and \
  380. this is set to ``0`` minutes the instance will be on timeout until Searx-Qt
  381. has been restarted.
  382. When ``Error type``, ``Amount``, ``Timeframe`` and ``Status`` are met the rule
  383. will be triggered and the instance will be put on the ``Destination`` for
  384. ``Duration`` amount of time in minutes.
  385. Log
  386. ===
  387. Here you can see failed search requests. Failed search requests will only
  388. be logged when Guard is enabled.
  389. It logs as little as possible. The following is logged:
  390. - Date and time.
  391. - Instance url.
  392. - Error Type.
  393. - HTTP status code.
  394. - HTTP content/Error message (for debugging, may contain error message which
  395. is handy for debugging but also may contain SENSITIVE stuff!)
  396. `Instances <usage/instances_>`_
  397. ###############################
  398. .. image:: images/instances.png
  399. :align: right
  400. A Searx instance is a server running the Searx project. Since we want to
  401. preform searches to Searx instance(s) we need addresses of those
  402. instance(s).
  403. The interface to manage instances is on the right.
  404. With `Stats2` profile type
  405. --------------------------
  406. When your profile is a `Stats2` type, the Searx-instances will be fetched
  407. from ``https://searx.space/data/instances.json`` (or any other set in the
  408. settings by your preference). The ``instances.json`` from ``search.space``
  409. also contains a lot of other data about the instances it lists (which we can
  410. use to filter instances based on our preferences).
  411. When Searx-Qt is used for the first time you will need to update the
  412. instances table. There is a 'Update' button between the Filter and the
  413. Table that can be used for this. Searx-Qt will not update this automatically!
  414. It maybe useful to update the instances data so now and then since public
  415. instances appear, disappear and their stats change over time.
  416. With `User` profile type
  417. ------------------------
  418. If your profile is a `User` type you will have to add addresses of instances
  419. manually.
  420. This can be done by pressing the `Add instance` button right above
  421. the instances table, a dialog will pop-up asking for the address to add
  422. (without scheme).
  423. The scheme (http:// or https://) can be selected from the combobox.
  424. There is also a "Update data on add" checkbox, when this is checked
  425. and `Add` is pressed it will automatically download data from
  426. `http(s)://your-address/config`. Downloading/updating this data may also be
  427. done later by right clicking on a (or multiple) Searx-instances in the table
  428. and pressing `Update selected` from the context-menu that has popped-up.
  429. .. _usage/instances/table:
  430. Instances table
  431. ---------------
  432. The instances table can be used to browse instances with their data that
  433. remain after all filters. The table is also used to set the current
  434. instance by left-clicking on one.
  435. The currently used instance should also be visible bottom right in the
  436. application it's status-bar.
  437. Right-clicking in the table opens a context-menu from where you can do
  438. the following:
  439. - Whitelist/blacklist selected instance(s).
  440. - Temporary blacklist.
  441. - Copy any column(s) of the selected instance(s) to the clipboard.
  442. - Copy JSON data of the selected instance(s) to the clipboard.
  443. - Select All instances (CTRL+A should do the same).
  444. - Hide or show columns.
  445. If your profile is a `User` profile the context-menu will have the
  446. following extra actions:
  447. - Remove selected instance(s).
  448. - Update selected instance(s).
  449. Filter instances
  450. ----------------
  451. When a filter is enabled and the instance it's value that is being
  452. matched is unknown then it is excluded by default!
  453. Network
  454. =======
  455. Filter instances on network type. Only instances that match one of the
  456. checked network types remain.
  457. Require ASN privacy
  458. ===================
  459. Excludes instances that run their server at a known malicious network.
  460. Like for example CloudFlare, Google, Akamai etc..
  461. This does not give any guarantee, it only filters **known** privacy
  462. violators!
  463. For a full list of known malicious networks (technical):
  464. https://github.com/dalf/searx-stats2/blob/master/searxstats/data/asn.py
  465. Require IPv6
  466. ============
  467. Exclude instances that don't have at least one IPv6 address.
  468. Version
  469. =======
  470. This has multiple options to filter on Searx/SearXNG versions strings. Both
  471. semantic versions and date versions are supported.
  472. - [``Minimum``]
  473. Include only instances with versions of the set minimum version or higher.
  474. - [``Invalid``]
  475. Include instances with a invalid version string.
  476. - [``Development``]
  477. Include development versions (git versions).
  478. - - [``Dirty``]
  479. Include SearXNG development versions with uncommited changes.
  480. - - [``Extra``]
  481. Include versions with the 'extra' addition, I don't know what this is; so
  482. TODO.
  483. - - [``Unknown``]
  484. Include Searx development versions with unknown changes.
  485. Blacklist
  486. =========
  487. Here are the URLs of the instances that have been blacklisted, either manually
  488. or automatically by Guard (when enabled).
  489. There is a button right to each blacklist item to remove it from the
  490. blacklist.
  491. Hovering the remove button or the url of a blacklist item will show a tooltip
  492. with some more info.
  493. You can manually blacklist a instance by right clicking on a instance in
  494. the instances table and click 'Add to blacklist'; multiple instances can
  495. be blacklisted at once.
  496. Blacklisted instances will be excluded from the table by default.
  497. Whitelist
  498. =========
  499. Here are the URLs of the instances that have been manually whitelisted.
  500. There is a button right to each whitelist item to remove it from the
  501. whitelist.
  502. You can manually whitelist a instance by right clicking on a instance in
  503. the instances table and click 'Add to whitelist'; multiple instances can
  504. be whitelisted at once.
  505. Whitelisted instances will be in the table by default except when they are on
  506. the timeout list.
  507. Timeout
  508. =======
  509. This is a temporary blacklist. Instances manually put on a timeout will stay
  510. here until Searx-Qt is restarted. When Guard is enabled it also may put
  511. instances here depending on the set rules, those may persist after Searx-Qt is
  512. restarted depending on the rule(s).
  513. Hovering the remove button or the url of a timeout item will show a tooltip
  514. with some more info.
  515. .. _usage/search:
  516. `Search <usage/search_>`_
  517. #########################
  518. .. _usage/search/bar:
  519. Search bar
  520. ------------------------
  521. .. image:: images/search_bar.png
  522. .. _usage/search/bar/fallback:
  523. Fallback
  524. ========
  525. When checked it will pick a random instance from the instances table if a
  526. search request fails one way or another and re-try the same request with
  527. the freshly picked instance. There is a maximum amount of 10 tries (10
  528. different instances to try the same request on).
  529. What is fail?
  530. - Connection errors including timeout.
  531. - Wrong status code (not 200).
  532. - No (usefull) or malformed results returned.
  533. .. _usage/search/random_every:
  534. Random every
  535. ============
  536. When checked it will automatically pick a random instance on a search request,
  537. it will also hide the 'Random search button' because it makes it obsolete.
  538. When not checked it will do search requests on the same instance unless the
  539. request fails somehow and 'Fallback' is checked. Exception is when the
  540. 'Random search button' is used for the search request.
  541. .. _usage/search/bar/random_search_button:
  542. Random search button
  543. ====================
  544. When pressed it will pick a random instance from the list and preform the
  545. search request.
  546. .. _usage/search/bar/reload_button:
  547. Reload button
  548. =============
  549. When pressed it basically preforms a search request without 'Fallback'
  550. whenever it is enabled or not, it also doesn't reset the page number. So
  551. it can act as a reload button thus it's name, but it does more.
  552. Note: When a search argument like the search query, instance URL,
  553. categories/engines etc. has changed by user interaction it will do the
  554. request with those changes, that isn't a real reload of the previous
  555. request.
  556. Dev-note: Probably this behavior should change or the name/icon should
  557. change to something more fitting.
  558. .. _usage/search/bar/search_button:
  559. Search button
  560. =============
  561. Preform a search request on the currently selected instance.
  562. Page number is reset, 'Fallback' and 'Random Every' options are honored.
  563. .. _usage/search/bar/search_query_input:
  564. Search query input
  565. ==================
  566. The query you like to search for.
  567. See https://searx.github.io/searx/user/search_syntax.html for what is
  568. possible.
  569. It will do a search request on ``enter`` key pressed, same behavior as
  570. when the 'Search button' has been pressed.
  571. .. _usage/search/options:
  572. Search options
  573. --------------
  574. .. image:: images/search_options.png
  575. :alt: Search options bar
  576. **NOTE**: Right clicking in (on the picture above) the dark area opens a
  577. context-menu where you can manage what options you want to be visible or
  578. not as shown in the image below.
  579. .. image:: images/search_options_rmb.png
  580. :alt: Search options context menu
  581. :align: right
  582. **NOTE**: Left-click (mouse) on the ``Categories`` or ``Engines`` label will
  583. toggle the label collapsed/expanded state, to be able to reduce the height
  584. when multiple options are selected.
  585. **NOTE**: Right-click (mouse) on ``Categories`` or ``Engines`` label will open
  586. a context menu with a option to uncheck all for convenience.
  587. .. _usage/search/options/categories:
  588. Categories
  589. ==========
  590. .. image:: images/categories_menu.png
  591. :alt: Categories menu
  592. :align: right
  593. A category is basically a collection of engines. When a category gets checked
  594. then all the engines it represents will also be checked which in turn will
  595. filter out all Searx-instances that don't have at least one of the checked
  596. engines enabled.
  597. Multiple categories may be selected.
  598. The default (non-editable) categories will be compiled from categories listed
  599. in engines. Besides default categories there is also a option to create custom
  600. categories.
  601. .. image:: images/custom_categories.png
  602. :alt: Custom categories window
  603. .. _usage/search/options/engines:
  604. Engines
  605. =======
  606. Here you can toggle what search engines should be enabled. It will
  607. automatically filter out all instances from the instances table that doesn't
  608. have at least one of the checked engines enabled. The checked engines will
  609. be send with a search request to a Searx instance with the `enabled_engines`
  610. param. You should only get results from engines that are checked.
  611. If no engine is checked it means that it may return results of any engine
  612. in the list.
  613. The list with engines is created with data from the
  614. `instances table <usage/instances/table_>`_, so only engines are listed that
  615. are available from the instances table.
  616. .. _usage/search/options/period:
  617. Period
  618. ======
  619. Search period you like results from. Options are ``Last day``,
  620. ``Last week``, ``Last month`` or ``Last year``.
  621. .. _usage/search/options/language:
  622. Language
  623. ========
  624. If you want results in a specific language than you can select one here. The
  625. set language will persist on restart.
  626. Since Searx-Qt 0.3 there is a option to mark languages a favorites. Favorites
  627. will appear on the top of the combobox list so you won't have to scroll.
  628. Adding a language to favorite can be done by hovering the language and
  629. pressing the spacebar on your keyboard. Removing a favorite works the same,
  630. hover the favorite language and press the spacebar on your keyboard.
  631. | **NOTE**: Not all engines have language support and not all engines \
  632. | honor the requested language. Searx-qt does not (yet?) act on \
  633. | this.
  634. | **NOTE**: When ``Default language`` is set that means the default language
  635. | of the instance.
  636. Search results
  637. --------------
  638. Find text in results
  639. ====================
  640. The find widget to search text inside the results can be opened/focused by the
  641. keyboard shortcut ``Ctrl + F``.
  642. Shortcuts that may be used while the find text input is activated:
  643. - ``Return`` to find the next match.
  644. - ``Shift + Return`` to find the previous match.
  645. - ``Escape`` to close.
  646. .. _troubleshooting:
  647. *************************************
  648. `Troubleshooting <troubleshooting_>`_
  649. *************************************
  650. .. _troubleshooting/wontstart:
  651. `Searx-Qt won't start <troubleshooting/wontstart_>`_
  652. ####################################################
  653. When ``Searx-Qt`` fails to start the first thing you should try is to run it on
  654. the ``CLI`` and see if there are any error messages.
  655. When you just updated to a newer version of ``Searx-Qt`` it can happen that the
  656. stored profile data is not compatible. ``Searx-Qt`` should be aware of this and
  657. notify you when this happend but this is NOT the case yet. So one thing you can
  658. try is to delete the local ``Searx-Qt`` config (usually in
  659. ``~/.config/CYBERDEViL/searx-qt/``). Sorry for losing your previous config,
  660. this is still ``TODO``, patches are welcome.
  661. .. _development:
  662. *****************************
  663. `Development <development_>`_
  664. *****************************
  665. **NOTE**: Make sure you are in the Searx-Qt source root (where utils/,
  666. locales/, searxqt/ etc.. are).
  667. **NOTE**: To run Searx-Qt without need to install::
  668. # Copy the executable from ./bin to cwd (searx-qt source root)
  669. cp bin/searx-qt ./
  670. # Start
  671. ./searx-qt
  672. .. _development/themes:
  673. `Themes <development/themes_>`_
  674. ###############################
  675. Create new theme
  676. ----------------
  677. A theme consists of icons, application css and search result/fail css.
  678. Simple example to create a new theme from the default theme:
  679. **NOTE**: Replace ``your_theme`` with the name of your new theme.
  680. **NOTE**: For this example you should know basic CSS.
  681. 1. Setup structure for new theme.
  682. .. code-block::
  683. cp -r ./themes/default/ ./themes/your_theme/
  684. 2. Edit the application style ``./themes/your_theme/style.css``.
  685. 3. Edit the css used for failed search result message \
  686. ``./themes/your_theme/html_fail.css``.
  687. 4. Edit the css used for search results \
  688. ``./themes/your_theme/html_results.css``
  689. 5. Edit the icons (don't change their size) ``./themes/your_theme/icons/*.png``
  690. 6. Open ``./themes/your_theme/manifest.json`` and change the ``name`` \
  691. variable to the pretty name of your new theme.
  692. 7. See if your theme is listed, when not there is a error::
  693. python ./utils/themes_tool.py list
  694. 8. Compile the theme::
  695. python ./utils/themes_tool.py make your_theme
  696. 9. Open Searx-Qt, go to settings, change to your new theme (it should be \
  697. listed, else there is an error) and test it::
  698. ./searx-qt
  699. 10. Done? :-)
  700. .. _development/translations:
  701. `Translations <development/translations_>`_
  702. ###########################################
  703. Searx-Qt will try to find a translation for your system locale and use that
  704. when found.
  705. To test translations the system locale should be installed for that language,
  706. it doesn't have to be set for testing since we can easly override the ``LANG``
  707. environment variable before executing Searx-Qt.
  708. **NOTE**: The examples below are for a Dutch language translation, you
  709. should replace ``nl_NL`` with the i18n locale ID of the language you whish to
  710. translate.
  711. Create new translation
  712. ----------------------
  713. 1. Setup structure for new language::
  714. # Update the searx-qt.pot template file.
  715. ./utils/locale_tool.sh -c
  716. # Create directory structure.
  717. mkdir -p ./locales/nl_NL/LC_MESSAGES/
  718. # Copy the template file to our new directory.
  719. cp ./locales/searx-qt.pot ./locales/nl_NL/LC_MESSAGES/searx-qt.po
  720. # Check if our new language is found. It should be listed.
  721. ./utils/locale_tool.sh --list
  722. 2. Start working on the translation.
  723. You can edit the ``./locales/nl_NL/LC_MESSAGES/searx-qt.po`` file with a
  724. text editor or a special editor for translations (that can handle ``.po``
  725. files like for example Poedit).
  726. 3. Compile the translation::
  727. ./utils/locale_tool.sh -m nl_NL
  728. 4. Test the translation::
  729. # Note: overriding XDG_DATA_HOME only for debugging translations! Themes
  730. # will not work.
  731. XDG_DATA_HOME="$(pwd -P)/" LC_ALL=nl_NL.UTF-8 ./searx-qt
  732. Update existing translation
  733. ---------------------------
  734. 1. Update files::
  735. # Update the .pot template file.
  736. ./utils/locale_tool.sh -c
  737. # Update the translation it's .po file
  738. ./utils/locale_tool.sh -u nl_NL
  739. 2. Edit the translation:
  740. You can edit the ``./locales/nl_NL/LC_MESSAGES/searx-qt.po`` file with a
  741. text editor or a special editor for translations (that can handle ``.po``
  742. files like for example Poedit).
  743. 3. Compile the translation::
  744. ./utils/locale_tool.sh -m nl_NL
  745. 4. Test the translation::
  746. # Note: overriding XDG_DATA_HOME only for debugging translations! Themes
  747. # will not work.
  748. XDG_DATA_HOME="$(pwd -P)/" LC_ALL=nl_NL.UTF-8 ./searx-qt