index.rst 29 KB

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