index.rst 35 KB

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