index.rst 28 KB

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