From 8e9ad1ccc296c220d61f12926c94d98baa83e3ca Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 22 Dec 2021 15:51:26 +0100 Subject: [enh] introduce categories_as_tabs Previously all categories were displayed as search engine tabs. This commit changes that so that only the categories listed under categories_as_tabs in settings.yml are displayed. This lets us introduce more categories without cluttering up the UI. Categories not displayed as tabs can still be searched with !bangs. --- searx/settings.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index 3227a5a55..18d047535 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -81,12 +81,6 @@ ui: simple_style: auto # Open result links in a new tab by default # results_on_new_tab: false - # categories_order : - # - general - # - files - # - map - # - it - # - science # Lock arbitrary settings on the preferences page. To find the ID of the user # setting you want to lock, check the ID of the form on the page "preferences". @@ -233,6 +227,18 @@ checker: result_container: - has_infobox +categories_as_tabs: + - general + - images + - videos + - news + - map + - music + - it + - science + - files + - social media + engines: - name: apk mirror engine: apkmirror -- cgit v1.2.3 From b02f762687c117baba523cefdcd16d0f94ae886a Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 22 Dec 2021 16:58:52 +0100 Subject: [enh] add more categories --- searx/settings.yml | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index 18d047535..0f1369328 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -325,7 +325,7 @@ engines: url_xpath: //article[@class="repo-summary"]//a[@class="repo-link"]/@href title_xpath: //article[@class="repo-summary"]//a[@class="repo-link"] content_xpath: //article[@class="repo-summary"]/p - categories: it + categories: [it, repos] timeout: 4.0 disabled: true shortcut: bb @@ -424,7 +424,7 @@ engines: - name: docker hub engine: docker_hub shortcut: dh - categories: it + categories: [it, packages] - name: erowid engine: xpath @@ -494,6 +494,7 @@ engines: content_xpath: //section[contains(@class, "word__defination")] first_page_num: 1 shortcut: et + categories: [general, dictionaries] disabled: true about: website: https://www.etymonline.com/ @@ -533,7 +534,7 @@ engines: - name: free software directory engine: mediawiki shortcut: fsd - categories: it + categories: [it, software wikis] base_url: https://directory.fsf.org/ number_of_results: 5 # what part of a page matches the query string: title, text, nearmatch @@ -584,7 +585,7 @@ engines: title_query: name_with_namespace content_query: description page_size: 20 - categories: it + categories: [it, repos] shortcut: gl timeout: 10.0 disabled: true @@ -610,7 +611,7 @@ engines: url_query: html_url title_query: name content_query: description - categories: it + categories: [it, repos] shortcut: cb disabled: true about: @@ -676,7 +677,7 @@ engines: url_xpath: './/div[@class="RZEgze"]//div[@class="kCSSQe"]//a/@href' content_xpath: './/div[@class="RZEgze"]//a[@class="mnKHRc"]' thumbnail_xpath: './/div[@class="uzcko"]/div/span[1]//img/@data-src' - categories: files + categories: [files, apps] shortcut: gpa disabled: true about: @@ -754,7 +755,7 @@ engines: url_xpath: './/div[@class="ans"]//a/@href' content_xpath: './/div[@class="from"]' page_size: 20 - categories: it + categories: [it, packages] shortcut: ho about: website: https://hoogle.haskell.org/ @@ -849,7 +850,7 @@ engines: engine: xpath timeout: 4.0 disabled: true - categories: music + categories: [music, lyrics] paging: true search_url: https://search.azlyrics.com/search.php?q={query}&w=lyrics&p={pageno} url_xpath: //td[@class="text-left visitedlyr"]/a/@href @@ -904,7 +905,7 @@ engines: title_query: package/name content_query: package/description page_size: 25 - categories: it + categories: [it, packages] disabled: true timeout: 5.0 shortcut: npm @@ -1013,7 +1014,7 @@ engines: url_query: url title_query: name content_query: description - categories: it + categories: [it, packages] disabled: true timeout: 5.0 shortcut: pack @@ -1070,7 +1071,7 @@ engines: content_xpath: ./p suggestion_xpath: /html/body/main/div/div/div/form/div/div[@class="callout-block"]/p/span/a[@class="link"] first_page_num: 1 - categories: it + categories: [it, packages] about: website: https://pypi.org wikidata_id: Q2984686 @@ -1082,7 +1083,7 @@ engines: - name: qwant engine: qwant shortcut: qw - categories: general + categories: [general, web] disabled: false additional_tests: rosebud: *test_rosebud @@ -1097,14 +1098,14 @@ engines: - name: qwant images engine: qwant shortcut: qwi - categories: images + categories: [images, web] disabled: false network: qwant - name: qwant videos engine: qwant shortcut: qwv - categories: videos + categories: [videos, web] disabled: false network: qwant @@ -1164,19 +1165,19 @@ engines: engine: stackexchange shortcut: st api_site: 'stackoverflow' - categories: it + categories: [it, q&a] - name: askubuntu engine: stackexchange shortcut: ubuntu api_site: 'askubuntu' - categories: it + categories: [it, q&a] - name: superuser engine: stackexchange shortcut: su api_site: 'superuser' - categories: it + categories: [it, q&a] - name: searchcode code engine: searchcode_code @@ -1359,7 +1360,7 @@ engines: url_query: URL title_query: Title content_query: Snippet - categories: general + categories: [general, web] shortcut: wib disabled: true about: @@ -1418,7 +1419,7 @@ engines: - name: wiktionary engine: mediawiki shortcut: wt - categories: general + categories: [general, dictionaries] base_url: "https://{language}.wiktionary.org/" number_of_results: 5 search_type: text @@ -1506,6 +1507,7 @@ engines: shortcut: mjk engine: xpath paging: true + categories: [general, web] search_url: https://www.mojeek.com/search?q={query}&s={pageno} results_xpath: /html/body//div[@class="results"]/ul[@class="results-standard"]/li url_xpath: ./h2/a/@href @@ -1525,6 +1527,7 @@ engines: - name: naver shortcut: nvr + categories: [general, web] engine: xpath paging: true search_url: https://search.naver.com/search.naver?where=webkr&sm=osp_hty&ie=UTF-8&query={query}&start={pageno} @@ -1554,7 +1557,7 @@ engines: content_xpath: ./span/p suggestion_xpath: /html/body/main/div/div[@class="search__suggestions"]/p/a first_page_num: 1 - categories: it + categories: [it, packages] disabled: true about: website: https://rubygems.org/ @@ -1598,14 +1601,14 @@ engines: engine: wordnik shortcut: def base_url: https://www.wordnik.com/ - categories: general + categories: [general, dictionaries] timeout: 5.0 disabled: true - name: woxikon.de synonyme engine: xpath shortcut: woxi - categories: general + categories: [general, dictionaries] timeout: 5.0 disabled: true search_url: https://synonyme.woxikon.de/synonyme/{query}.php @@ -1624,7 +1627,6 @@ engines: engine: sjp shortcut: sjp base_url: https://sjp.pwn.pl/ - categories: general timeout: 5.0 disabled: true @@ -1657,7 +1659,7 @@ engines: title_xpath: //span[@class="snippet-title"] content_xpath: //p[1][@class="snippet-description"] suggestion_xpath: //div[@class="text-gray h6"]/a - categories: general + categories: [general, web] about: website: https://brave.com/search/ wikidata_id: Q107355971 -- cgit v1.2.3 From 5d74bf382012c73c701e1a4969e0f420b099db9f Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Tue, 28 Dec 2021 16:26:38 +0100 Subject: [enh] move dictionaries, Erowid & IMDb out of general category The general category is the category that is searched by default. From a privacy standpoint it doesn't make sense to send all general queries to specialized search engines that cannot deal with those queries anyway. --- searx/settings.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index 0f1369328..765b33a3e 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -435,7 +435,7 @@ engines: url_xpath: //dl[@class="results-list"]/dt[@class="result-title"]/a/@href title_xpath: //dl[@class="results-list"]/dt[@class="result-title"]/a/text() content_xpath: //dl[@class="results-list"]/dd[@class="result-details"] - categories: general + categories: [] shortcut: ew disabled: true about: @@ -494,7 +494,7 @@ engines: content_xpath: //section[contains(@class, "word__defination")] first_page_num: 1 shortcut: et - categories: [general, dictionaries] + categories: [dictionaries] disabled: true about: website: https://www.etymonline.com/ @@ -1419,7 +1419,7 @@ engines: - name: wiktionary engine: mediawiki shortcut: wt - categories: [general, dictionaries] + categories: [dictionaries] base_url: "https://{language}.wiktionary.org/" number_of_results: 5 search_type: text @@ -1601,14 +1601,14 @@ engines: engine: wordnik shortcut: def base_url: https://www.wordnik.com/ - categories: [general, dictionaries] + categories: [dictionaries] timeout: 5.0 disabled: true - name: woxikon.de synonyme engine: xpath shortcut: woxi - categories: [general, dictionaries] + categories: [dictionaries] timeout: 5.0 disabled: true search_url: https://synonyme.woxikon.de/synonyme/{query}.php -- cgit v1.2.3 From 3f76c9c96c46503f68d8a18380c7ccb812895cf9 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Mon, 3 Jan 2022 22:47:19 +0100 Subject: [enh] enable English dictionaries by default These dictionaries are no longer part of the general category, so they're no longer queried by default -> we can enable them by default without degrading general query performance. --- searx/settings.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index 765b33a3e..ee39b7b29 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -495,7 +495,7 @@ engines: first_page_num: 1 shortcut: et categories: [dictionaries] - disabled: true + disabled: false about: website: https://www.etymonline.com/ wikidata_id: Q1188617 @@ -1423,7 +1423,7 @@ engines: base_url: "https://{language}.wiktionary.org/" number_of_results: 5 search_type: text - disabled: true + disabled: false about: website: https://www.wiktionary.org/ wikidata_id: Q151 @@ -1473,7 +1473,7 @@ engines: engine: translated shortcut: tl timeout: 5.0 - disabled: true + disabled: false # You can use without an API key, but you are limited to 1000 words/day # See: https://mymemory.translated.net/doc/usagelimits.php # api_key: '' @@ -1603,7 +1603,7 @@ engines: base_url: https://www.wordnik.com/ categories: [dictionaries] timeout: 5.0 - disabled: true + disabled: false - name: woxikon.de synonyme engine: xpath -- cgit v1.2.3 From a4c2cfb837a3f92e2c0f0b8a0bac7a6e03499640 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Tue, 4 Jan 2022 18:00:45 +0100 Subject: [enh] change categories_as_tabs from a list to a dict The tab icon names are currently hard coded in the templates. This commit lets us introduce an icon property in the future, e.g: categories_as_tabs: general: icon: search-outline --- searx/settings.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index ee39b7b29..0aa7b99b0 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -228,16 +228,16 @@ checker: - has_infobox categories_as_tabs: - - general - - images - - videos - - news - - map - - music - - it - - science - - files - - social media + general: + images: + videos: + news: + map: + music: + it: + science: + files: + social media: engines: - name: apk mirror -- cgit v1.2.3