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
4 changes: 2 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export(search_google)
export(search_grep)
export(search_ixquick)
export(search_kagi)
export(search_posit)
export(search_posit_community)
export(search_qwant)
export(search_rscom)
export(search_rseek)
export(search_rstudio_community)
export(search_site)
export(search_so)
export(search_sp)
Expand Down
9 changes: 7 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- `ask_mistral()`: Searches with Mistral AI
- `ask_copilot()`: Searches with Microsoft Bing's Copilot
- `ask_meta_ai()`: Searches with Meta AI
- Added an AI Prompt Management System with Persona Prompts
- Added an AI Prompt Management System with Persona Prompts:
- `ai_prompt()`: Set a prompt for the AI
- `ai_prompt_active()`: View the active prompt
- `ai_prompt_clear()`: Clear the active prompt
Expand All @@ -26,6 +26,11 @@
([#42](https://github.com/coatless-rpkg/searcher/pull/42))
- Added searcher logo ([#40](https://github.com/coatless-rpkg/searcher/pull/40))

## Deprecations

- Deprecated `search_rstudio_community()` and `search_rscom()` functions. ([#43](https://github.com/coatless-rpkg/searcher/pull/43))
- These functions are now replaced by `search_posit_community()`/`search_posit()`
which searches [Posit Community](https://community.posit.co/search).

# searcher 0.0.7

Expand Down Expand Up @@ -107,7 +112,7 @@
## Features

- Added search portal:
- `search_rstudio_community()` or `search_rscom()`: Searches on [RStudio Community](https://community.rstudio.com/search).
- `search_rstudio_community()` or `search_rscom()`: Searches on RStudio Community.
(#13, #17)
- Added vignette on search patterns (#18).

Expand Down
6 changes: 3 additions & 3 deletions R/index-sites.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ site_index =
keyword_entry("[r]", "[tidyverse]")
),
site_entry(
"rstudio community",
"https://community.rstudio.com/search?q=",
"rscom",
"posit community",
"https://community.posit.co/search?q=",
"posit",
NULL
),
site_entry(
Expand Down
33 changes: 17 additions & 16 deletions R/search-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#'
#' @param site Name of site to search on. Supported options:
#' `"google"` (default), `"bing"`, `"duckduckgo"`, `"startpage"`,
#' `"qwant"`,`"rstudio community"`, `"twitter"`,`"stackoverflow"`,
#' `"qwant"`,`"posit community"`, `"brave"`, `"kagi"`,
#' `"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 @@ -20,7 +21,7 @@
#' @seealso [search_google()], [search_bing()], [search_duckduckgo()],
#' [search_startpage()], [search_rseek()], [search_qwant()],
#' [search_brave()], [search_kagi()], [search_twitter()],
#' [search_rstudio_community()], [search_stackoverflow()],
#' [search_posit_community()], [search_stackoverflow()],
#' [search_github()], [search_grep()], [search_bitbucket()], and [searcher()]
#' @examples
#' # Search in a generic way
Expand All @@ -47,8 +48,8 @@
#' # Search Brave
#' search_brave("webR")
#'
#' # Search RStudio Community
#' search_rstudio_community("RStudio IDE")
#' # Search Posit Community
#' search_posit_community("RStudio IDE")
#'
#' # Search Twitter
#' search_twitter("searcher")
Expand Down Expand Up @@ -91,8 +92,8 @@ search_site = function(query,
"rseek",
"brave",
"kagi",
"rstudio community",
"rscom",
"posit community",
"posit",
"twitter",
"stackoverflow",
"so",
Expand Down Expand Up @@ -127,8 +128,8 @@ search_site = function(query,
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),
`posit community` = , # empty case carried below
posit = search_posit_community(query, rlang),
twitter = search_twitter(query, rlang),
stackoverflow = , # empty case carried below
so = search_stackoverflow(query, rlang),
Expand Down Expand Up @@ -252,7 +253,7 @@ search_sp = search_startpage
#'
#' For additional details regarding Ecosia's
#' search interface please see:
#' \url{https://ecosia.helpscoutdocs.com/article/502-ecosia-on-desktop}
#' \url{https://support.ecosia.org/article/657-installing-ecosia-on-your-desktop-device}
search_ecosia = searcher("ecosia")

#' @rdname search_site
Expand Down Expand Up @@ -294,19 +295,19 @@ search_kagi = searcher("kagi")

#' @rdname search_site
#' @export
#' @section RStudio Community Search:
#' The `search_rstudio_community()` and `search_rscom()` functions both search
#' [RStudio Community](https://community.rstudio.com/) using:
#' \code{https://community.rstudio.com/search?q=<query>}
#' @section Posit Community Search:
#' The `search_posit_community()` and `search_posit()` functions both search
#' [Posit Community](https://forum.posit.co/) using:
#' \code{https://forum.posit.co/search?q=<query>}
#'
#' For additional details regarding [RStudio Community](https://community.rstudio.com/)'s
#' For additional details regarding [Posit Community](https://forum.posit.co/)'s
#' search interface please see the [Discourse](https://discourse.org) API documentation:
#' \url{https://docs.discourse.org/#tag/Search}
search_rstudio_community = searcher("rscom")
search_posit_community = searcher("posit")

#' @rdname search_site
#' @export
search_rscom = search_rstudio_community
search_posit = search_posit_community

#' @rdname search_site
#' @export
Expand Down
10 changes: 5 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ platforms are supported: [Google](https://www.google.com), [Bing](https://www.bi
[DuckDuckGo](https://duckduckgo.com/), [Startpage](https://www.startpage.com/en/),
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),
[Posit Community](https://community.posit.co/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
Expand All @@ -92,9 +92,9 @@ search_twitter("machine learning", rlang = FALSE)
search_stackoverflow("linear regression")
search_stackoverflow("linear regression", rlang = FALSE) # or search_so(...)

# Searching RStudio Community for tips
search_rstudio_community("tips")
search_rstudio_community("tips", rlang = FALSE) # or search_rscom(...)
# Searching Posit Community for tips
search_posit_community("tips")
search_posit_community("tips", rlang = FALSE) # or search_posit(...)

# Searching GitHub code for graphs in R and other languages
search_grep("graph")
Expand Down Expand Up @@ -188,7 +188,7 @@ search_grep()
search_duckduckgo() # or search_ddg()
search_startpage() # or search_sp()
search_stackoverflow() # or search_so()
search_rstudio_community() # or search_rscom()
search_posit_community() # or search_posit()
search_github() # or search_gh()
search_bitbucket() # or search_bb()
```
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ repositories. The following search platforms are supported:
[Startpage](https://www.startpage.com/en/), 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),
[Posit Community](https://community.posit.co/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 @@ -87,9 +87,9 @@ search_twitter("machine learning", rlang = FALSE)
search_stackoverflow("linear regression")
search_stackoverflow("linear regression", rlang = FALSE) # or search_so(...)

# Searching RStudio Community for tips
search_rstudio_community("tips")
search_rstudio_community("tips", rlang = FALSE) # or search_rscom(...)
# Searching Posit Community for tips
search_posit_community("tips")
search_posit_community("tips", rlang = FALSE) # or search_posit(...)

# Searching GitHub code for graphs in R and other languages
search_grep("graph")
Expand Down Expand Up @@ -186,7 +186,7 @@ search_grep()
search_duckduckgo() # or search_ddg()
search_startpage() # or search_sp()
search_stackoverflow() # or search_so()
search_rstudio_community() # or search_rscom()
search_posit_community() # or search_posit()
search_github() # or search_gh()
search_bitbucket() # or search_bb()
```
Expand Down
31 changes: 16 additions & 15 deletions man/search_site.Rd

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

3 changes: 2 additions & 1 deletion man/searcher.Rd

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

16 changes: 8 additions & 8 deletions tests/testthat/test-search-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ test_that("Check link generation - kagi", {

})

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

expect_identical(
search_rscom("toad"),
"https://community.rstudio.com/search?q=toad"
search_posit("toad"),
"https://community.posit.co/search?q=toad"
)

expect_identical(
search_rscom("toad", rlang = FALSE),
"https://community.rstudio.com/search?q=toad"
search_posit("toad", rlang = FALSE),
"https://community.posit.co/search?q=toad"
)

})
Expand Down Expand Up @@ -219,8 +219,8 @@ test_that("Validate selection short name - search_site", {
)

expect_identical(
search_site("toad", "rscom", rlang = FALSE),
"https://community.rstudio.com/search?q=toad"
search_site("toad", "posit", rlang = FALSE),
"https://community.posit.co/search?q=toad"
)

expect_identical(
Expand Down Expand Up @@ -288,7 +288,7 @@ test_that("Malformed search query validation", {


expect_identical(
search_rscom(""),
search_posit(""),
"",
"Empty string check if no error messages"
)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/search-patterns.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _R_-specific results. If `rlang = FALSE`, then the results are generalized.
- Community Sites
- [StackOverflow](https://stackoverflow.com/): ` <query> + [r]`
- Twitter: `<query> + #rstats`
- [RStudio Community](https://community.rstudio.com/search): `<query>`
- [Posit Community](https://forum.posit.co/search) (formerly RStudio Community): `<query>`
- [Rseek](https://rseek.org/): `<query>`
- Code Repositories
- [GitHub Search](https://github.com/search): `<query> language:r type:issue`
Expand Down