Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: searcher
Title: Query Search Interfaces
Version: 0.0.7
Version: 0.0.7.2
Authors@R: c(
person("James", "Balamuta",
email = "[email protected]",
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export(ask_perplexity)
export(search_bb)
export(search_bing)
export(search_bitbucket)
export(search_brave)
export(search_ddg)
export(search_duckduckgo)
export(search_ecosia)
Expand All @@ -24,6 +25,7 @@ export(search_github)
export(search_google)
export(search_grep)
export(search_ixquick)
export(search_kagi)
export(search_qwant)
export(search_rscom)
export(search_rseek)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
- Added new vignettes:
- `search-with-ai-assistants.Rmd`: Overview of the AI Searching Techniques
- `managing-ai-prompts.Rmd`: Overview of `searcher`'s AI Prompt Management System
- Added search portals:
- `search_brave()`: Searches on Brave.
([#42](https://github.com/coatless-rpkg/searcher/pull/42))
- `search_kagi()`: Searches on Kagi.
([#42](https://github.com/coatless-rpkg/searcher/pull/42))
- Added searcher logo ([#40](https://github.com/coatless-rpkg/searcher/pull/40))


Expand Down
2 changes: 2 additions & 0 deletions R/index-sites.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ site_index =
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("brave", "https://search.brave.com/search?q="),
site_entry("kagi", "https://kagi.com/search?q="),
site_entry(
"stackoverflow",
"https://stackoverflow.com/search?q=",
Expand Down
27 changes: 26 additions & 1 deletion R/search-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#' @rdname search_site
#' @export
#' @seealso [search_google()], [search_bing()], [search_duckduckgo()],
#' [search_startpage()], [search_rseek()], [search_qwant()], [search_twitter()],
#' [search_startpage()], [search_rseek()], [search_qwant()],
#' [search_brave()], [search_kagi()], [search_twitter()],
#' [search_rstudio_community()], [search_stackoverflow()],
#' [search_github()], [search_grep()], [search_bitbucket()], and [searcher()]
#' @examples
Expand All @@ -43,6 +44,9 @@
#' # Search Qwant
#' search_qwant("Quarto")
#'
#' # Search Brave
#' search_brave("webR")
#'
#' # Search RStudio Community
#' search_rstudio_community("RStudio IDE")
#'
Expand Down Expand Up @@ -85,6 +89,8 @@ search_site = function(query,
"sp",
"qwant",
"rseek",
"brave",
"kagi",
"rstudio community",
"rscom",
"twitter",
Expand Down Expand Up @@ -119,6 +125,8 @@ search_site = function(query,
sp = search_startpage(query, rlang),
qwant = search_qwant(query, rlang),
rseek = search_rseek(query, rlang),
brave = search_brave(query, rlang),
kagi = search_kagi(query, rlang),
`rstudio community` = , # empty case carried below
rscom = search_rstudio_community(query, rlang),
twitter = search_twitter(query, rlang),
Expand Down Expand Up @@ -261,6 +269,23 @@ search_rseek = searcher("rseek")
#' Qwant using: `https://www.qwant.com/?q=<query>`
search_qwant = searcher("qwant")

#' @rdname search_site
#' @export
#' @section Brave Search:
#' The `search_brave()` function searches
#' Brave using: `https://search.brave.com/search?q=<query>&source=web`
search_brave = searcher("brave")

#' @rdname search_site
#' @export
#' @section Kagi Search:
#' The `search_kagi()` function searches
#' Kagi using: `https://kagi.com/search?q=<query>`
#'
#' This is a paid search engine, and you will need to
#' sign up for an account to use it.
search_kagi = searcher("kagi")

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


Expand Down
7 changes: 6 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ 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/), Qwant, X (formerly Twitter), [StackOverflow](https://stackoverflow.com/),
Ecosia, [rseek](https://rseek.org/), Qwant, [Brave](https://search.brave.com/),
Kagi, X (formerly Twitter), [StackOverflow](https://stackoverflow.com/),
[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 +79,8 @@ search_bing("R project")
search_ecosia("R project")
search_rseek("R project")
search_qwant("R project")
search_brave("R project")
search_kagi("R project")
search_duckduckgo("R project") # or search_ddg(...)
search_startpage("R project") # or search_sp(...)

Expand Down Expand Up @@ -178,6 +181,8 @@ search_bing()
search_ecosia()
search_rseek()
search_qwant()
search_brave()
search_kagi()
search_twitter()
search_grep()
search_duckduckgo() # or search_ddg()
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ 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/), Qwant, X (formerly Twitter),
[StackOverflow](https://stackoverflow.com/), [RStudio
Community](https://community.rstudio.com/search),
[rseek](https://rseek.org/), Qwant, [Brave](https://search.brave.com/),
Kagi, X (formerly Twitter), [StackOverflow](https://stackoverflow.com/),
[RStudio Community](https://community.rstudio.com/search),
[GitHub](https://github.com/search), [grep.app](https://grep.app/), and
[BitBucket](https://bitbucket.org/product/). By default, an appropriate
suffix for each platform that ensures relevant results to *R* is
Expand All @@ -74,6 +74,8 @@ search_bing("R project")
search_ecosia("R project")
search_rseek("R project")
search_qwant("R project")
search_brave("R project")
search_kagi("R project")
search_duckduckgo("R project") # or search_ddg(...)
search_startpage("R project") # or search_sp(...)

Expand Down Expand Up @@ -177,6 +179,8 @@ search_bing()
search_ecosia()
search_rseek()
search_qwant()
search_brave()
search_kagi()
search_twitter()
search_grep()
search_duckduckgo() # or search_ddg()
Expand Down
33 changes: 29 additions & 4 deletions man/search_site.Rd

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

29 changes: 29 additions & 0 deletions tests/testthat/test-search-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,35 @@ test_that("Check link generation - rseek", {

})


test_that("Check link generation - Brave", {

expect_identical(
search_brave("toad"),
"https://search.brave.com/search?q=toad%20r%20programming"
)

expect_identical(
search_brave("toad", rlang = FALSE),
"https://search.brave.com/search?q=toad"
)

})

test_that("Check link generation - kagi", {

expect_identical(
search_kagi("toad"),
"https://kagi.com/search?q=toad%20r%20programming"
)

expect_identical(
search_kagi("toad", rlang = FALSE),
"https://kagi.com/search?q=toad"
)

})

test_that("Check link generation - RStudio Community", {

expect_identical(
Expand Down