Skip to content

Commit a3bf53f

Browse files
committed
Add search_qwant()
1 parent 7578e23 commit a3bf53f

File tree

7 files changed

+42
-12
lines changed

7 files changed

+42
-12
lines changed

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export(search_github)
1111
export(search_google)
1212
export(search_grep)
1313
export(search_ixquick)
14+
export(search_qwant)
1415
export(search_rscom)
1516
export(search_rseek)
1617
export(search_rstudio_community)

NEWS.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
## Features
44

5-
- Added search portal:
5+
- Added search portals:
66
- `search_grep()`: Searches on grep.app.
77
([#35](https://github.com/r-assist/searcher/issues/35),
88
[#37](https://github.com/r-assist/searcher/pull/37))
9-
9+
- `search_qwant()`: Searches on Qwant.
10+
([#36](https://github.com/r-assist/searcher/issues/36),
11+
[#38](https://github.com/r-assist/searcher/pull/38))
1012

1113
# searcher 0.0.6
1214

R/index-sites.R

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ site_index =
5050
site_entry("duckduckgo", "https://duckduckgo.com/?q=", "ddg"),
5151
site_entry("startpage", "https://startpage.com/do/dsearch?query=", "sp"),
5252
site_entry("ecosia", "https://www.ecosia.org/search?q="),
53+
site_entry("qwant", "https://www.qwant.com/?q="),
5354
site_entry(
5455
"stackoverflow",
5556
"https://stackoverflow.com/search?q=",

R/search-functions.R

+15-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#'
66
#' @param site Name of site to search on. Supported options:
77
#' `"google"` (default), `"bing"`, `"duckduckgo"`, `"startpage"`,
8-
#' `"rstudio community"`, `"twitter"`,`"stackoverflow"`,
9-
#' `"github"`, and `"bitbucket"`.
8+
#' `"qwant"`,`"rstudio community"`, `"twitter"`,`"stackoverflow"`,
9+
#' `"github"`, `"grep"`, and `"bitbucket"`.
1010
#' @param query Contents of string to search. Default is the error message.
1111
#' @param rlang Search for results written in R. Default is `TRUE`
1212
#'
@@ -15,7 +15,7 @@
1515
#' @rdname search_site
1616
#' @export
1717
#' @seealso [search_google()], [search_bing()], [search_duckduckgo()],
18-
#' [search_startpage()], [search_rseek()], [search_twitter()],
18+
#' [search_startpage()], [search_rseek()], [search_qwant()], [search_twitter()],
1919
#' [search_rstudio_community()], [search_stackoverflow()],
2020
#' [search_github()], [search_grep()], [search_bitbucket()], and [searcher()]
2121
#' @examples
@@ -37,6 +37,9 @@
3737
#' # Search Rseek
3838
#' search_rseek("searcher")
3939
#'
40+
#' # Search Qwant
41+
#' search_qwant("Quarto")
42+
#'
4043
#' # Search RStudio Community
4144
#' search_rstudio_community("RStudio IDE")
4245
#'
@@ -77,6 +80,7 @@ search_site = function(query,
7780
"ddg",
7881
"startpage",
7982
"sp",
83+
"qwant",
8084
"rseek",
8185
"rstudio community",
8286
"rscom",
@@ -101,6 +105,7 @@ search_site = function(query,
101105
ddg = search_duckduckgo(query, rlang),
102106
startpage = , # empty case carried below
103107
sp = search_startpage(query, rlang),
108+
qwant = search_qwant(query, rlang),
104109
rseek = search_rseek(query, rlang),
105110
`rstudio community` = , # empty case carried below
106111
rscom = search_rstudio_community(query, rlang),
@@ -232,6 +237,13 @@ search_ecosia = searcher("ecosia")
232237
#' `https://rseek.org/?q=<query>`
233238
search_rseek = searcher("rseek")
234239

240+
#' @rdname search_site
241+
#' @export
242+
#' @section Qwant Search:
243+
#' The `search_qwant()` function searches
244+
#' [Qwant](https://qwant.com) using: `https://www.qwant.com/?q=<query>`
245+
search_qwant = searcher("qwant")
246+
235247
########################### End Search Engines
236248

237249

README.Rmd

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The `search_*()` functions can be used to search a query directly from _R_ on
6464
major search engines, programming help websites, and code repositories. The following search
6565
platforms are supported: [Google](https://www.google.com), [Bing](https://www.bing.com/),
6666
[DuckDuckGo](https://duckduckgo.com/), [Startpage](https://www.startpage.com/en/),
67-
Ecosia, [rseek](https://rseek.org/), [Twitter](https://twitter.com/search), [StackOverflow](https://stackoverflow.com/search),
67+
Ecosia, [rseek](https://rseek.org/), [Qwant](https://qwant.com/), [Twitter](https://twitter.com/search), [StackOverflow](https://stackoverflow.com/search),
6868
[RStudio Community](https://community.rstudio.com/search),
6969
[GitHub](https://github.com/search), [grep.app](https://grep.app/),
7070
and [BitBucket](https://bitbucket.org/product/).
@@ -78,6 +78,7 @@ search_google("R project")
7878
search_bing("R project")
7979
search_ecosia("R project")
8080
search_rseek("R project")
81+
search_qwant("R project")
8182
search_duckduckgo("R project") # or search_ddg(...)
8283
search_startpage("R project") # or search_sp(...)
8384

@@ -141,6 +142,7 @@ search_google()
141142
search_bing()
142143
search_ecosia()
143144
search_rseek()
145+
search_qwant()
144146
search_twitter()
145147
search_grep()
146148
search_duckduckgo() # or search_ddg()

man/search_site.Rd

+16-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/searcher.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)