Skip to content

Commit

Permalink
Add search_qwant()
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Feb 4, 2024
1 parent 7578e23 commit a3bf53f
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 12 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export(search_github)
export(search_google)
export(search_grep)
export(search_ixquick)
export(search_qwant)
export(search_rscom)
export(search_rseek)
export(search_rstudio_community)
Expand Down
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

## Features

- Added search portal:
- Added search portals:
- `search_grep()`: Searches on grep.app.
([#35](https://github.com/r-assist/searcher/issues/35),
[#37](https://github.com/r-assist/searcher/pull/37))

- `search_qwant()`: Searches on Qwant.
([#36](https://github.com/r-assist/searcher/issues/36),
[#38](https://github.com/r-assist/searcher/pull/38))

# searcher 0.0.6

Expand Down
1 change: 1 addition & 0 deletions R/index-sites.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ site_index =
site_entry("duckduckgo", "https://duckduckgo.com/?q=", "ddg"),
site_entry("startpage", "https://startpage.com/do/dsearch?query=", "sp"),
site_entry("ecosia", "https://www.ecosia.org/search?q="),
site_entry("qwant", "https://www.qwant.com/?q="),
site_entry(
"stackoverflow",
"https://stackoverflow.com/search?q=",
Expand Down
18 changes: 15 additions & 3 deletions R/search-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#'
#' @param site Name of site to search on. Supported options:
#' `"google"` (default), `"bing"`, `"duckduckgo"`, `"startpage"`,
#' `"rstudio community"`, `"twitter"`,`"stackoverflow"`,
#' `"github"`, and `"bitbucket"`.
#' `"qwant"`,`"rstudio community"`, `"twitter"`,`"stackoverflow"`,
#' `"github"`, `"grep"`, and `"bitbucket"`.
#' @param query Contents of string to search. Default is the error message.
#' @param rlang Search for results written in R. Default is `TRUE`
#'
Expand All @@ -15,7 +15,7 @@
#' @rdname search_site
#' @export
#' @seealso [search_google()], [search_bing()], [search_duckduckgo()],
#' [search_startpage()], [search_rseek()], [search_twitter()],
#' [search_startpage()], [search_rseek()], [search_qwant()], [search_twitter()],
#' [search_rstudio_community()], [search_stackoverflow()],
#' [search_github()], [search_grep()], [search_bitbucket()], and [searcher()]
#' @examples
Expand All @@ -37,6 +37,9 @@
#' # Search Rseek
#' search_rseek("searcher")
#'
#' # Search Qwant
#' search_qwant("Quarto")
#'
#' # Search RStudio Community
#' search_rstudio_community("RStudio IDE")
#'
Expand Down Expand Up @@ -77,6 +80,7 @@ search_site = function(query,
"ddg",
"startpage",
"sp",
"qwant",
"rseek",
"rstudio community",
"rscom",
Expand All @@ -101,6 +105,7 @@ search_site = function(query,
ddg = search_duckduckgo(query, rlang),
startpage = , # empty case carried below
sp = search_startpage(query, rlang),
qwant = search_qwant(query, rlang),
rseek = search_rseek(query, rlang),
`rstudio community` = , # empty case carried below
rscom = search_rstudio_community(query, rlang),
Expand Down Expand Up @@ -232,6 +237,13 @@ search_ecosia = searcher("ecosia")
#' `https://rseek.org/?q=<query>`
search_rseek = searcher("rseek")

#' @rdname search_site
#' @export
#' @section Qwant Search:
#' The `search_qwant()` function searches
#' [Qwant](https://qwant.com) using: `https://www.qwant.com/?q=<query>`
search_qwant = searcher("qwant")

########################### End Search Engines


Expand Down
4 changes: 3 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The `search_*()` functions can be used to search a query directly from _R_ on
major search engines, programming help websites, and code repositories. The following search
platforms are supported: [Google](https://www.google.com), [Bing](https://www.bing.com/),
[DuckDuckGo](https://duckduckgo.com/), [Startpage](https://www.startpage.com/en/),
Ecosia, [rseek](https://rseek.org/), [Twitter](https://twitter.com/search), [StackOverflow](https://stackoverflow.com/search),
Ecosia, [rseek](https://rseek.org/), [Qwant](https://qwant.com/), [Twitter](https://twitter.com/search), [StackOverflow](https://stackoverflow.com/search),
[RStudio Community](https://community.rstudio.com/search),
[GitHub](https://github.com/search), [grep.app](https://grep.app/),
and [BitBucket](https://bitbucket.org/product/).
Expand All @@ -78,6 +78,7 @@ search_google("R project")
search_bing("R project")
search_ecosia("R project")
search_rseek("R project")
search_qwant("R project")
search_duckduckgo("R project") # or search_ddg(...)
search_startpage("R project") # or search_sp(...)

Expand Down Expand Up @@ -141,6 +142,7 @@ search_google()
search_bing()
search_ecosia()
search_rseek()
search_qwant()
search_twitter()
search_grep()
search_duckduckgo() # or search_ddg()
Expand Down
20 changes: 16 additions & 4 deletions man/search_site.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/searcher.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a3bf53f

Please sign in to comment.