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
3 changes: 3 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_bluesky)
export(search_brave)
export(search_ddg)
export(search_duckduckgo)
Expand All @@ -25,6 +26,7 @@ export(search_github)
export(search_google)
export(search_grep)
export(search_kagi)
export(search_mastodon)
export(search_posit)
export(search_posit_community)
export(search_qwant)
Expand All @@ -35,4 +37,5 @@ export(search_sp)
export(search_stackoverflow)
export(search_startpage)
export(search_twitter)
export(search_x)
export(searcher)
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
([#42](https://github.com/coatless-rpkg/searcher/pull/42))
- `search_kagi()`: Searches on Kagi.
([#42](https://github.com/coatless-rpkg/searcher/pull/42))
- `search_mastodon()`: Searches on Mastodon.
([#45](https://github.com/coatless-rpkg/searcher/pull/45))
- `search_bluesky()`: Searches on BlueSky.
([#45](https://github.com/coatless-rpkg/searcher/pull/45))
- Added searcher logo ([#40](https://github.com/coatless-rpkg/searcher/pull/40))

## Documentation
Expand All @@ -49,7 +53,7 @@

- 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).
which searches [Posit Community](https://forum.posit.co/search).

# searcher 0.0.7

Expand Down
13 changes: 12 additions & 1 deletion R/index-sites.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ site_index =
),
site_entry(
"posit community",
"https://community.posit.co/search?q=",
"https://forum.posit.co/search?q=",
"posit",
NULL
),
Expand All @@ -81,6 +81,17 @@ site_index =
site_entry(
"twitter",
"https://twitter.com/search?q=",
"x",
keywords = keyword_entry("%23rstats", "%23rstats %23tidyverse") # %23 is #
),
site_entry(
"mastodon",
"https://mastodon.social/search?q=",
keywords = keyword_entry("%23rstats", "%23rstats %23tidyverse") # %23 is #
),
site_entry(
"bluesky",
"https://bsky.app/search?q=",
keywords = keyword_entry("%23rstats", "%23rstats %23tidyverse") # %23 is #
),
site_entry(
Expand Down
52 changes: 47 additions & 5 deletions R/search-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' `"startpage"` (formerly `"ixquick"`) or `"sp"`,
#' `"qwant"`, `"rseek"`, `"brave"`, `"kagi"`,
#' `"posit community"` (formerly `"rstudio community"`) or `"posit"`,
#' `"twitter"`, `"stackoverflow"`,
#' `"twitter"` or `"x"`, `"bluesky"`, `"mastodon"`, `"stackoverflow"`,
#' `"github"`, `"grep"`, `"bitbucket"`,
#' `"chatgpt"`, `"claude"`, `"perplexity"`,
#' `"mistral"`, `"bing copilot"` or `"copilot"`, and
Expand Down Expand Up @@ -40,6 +40,9 @@ search_site = function(query,
"posit community",
"posit",
"twitter",
"x",
"bluesky",
"mastodon",
"stackoverflow",
"so",
"github",
Expand Down Expand Up @@ -75,7 +78,10 @@ search_site = function(query,
kagi = search_kagi(query, rlang),
`posit community` = , # empty case carried below
posit = search_posit_community(query, rlang),
twitter = search_twitter(query, rlang),
twitter = , # empty case carried below
x = search_twitter(query, rlang),
bluesky = search_bluesky(query, rlang),
mastodon = search_mastodon(query, rlang),
stackoverflow = , # empty case carried below
so = search_stackoverflow(query, rlang),
github = , # empty case carried below
Expand Down Expand Up @@ -320,14 +326,14 @@ search_posit_community = searcher("posit")
#' @export
search_posit = search_posit_community

#' Search Twitter
#' Search Twitter/X
#'
#' The `search_twitter()` functions search
#' Twitter using: `https://twitter.com/search?q=<query>`
#'
#' For additional details regarding Twitter's
#' search interface please see:
#' <https://help.twitter.com/en/using-x/x-advanced-search>
#' <https://help.x.com/en/using-x/x-advanced-search>
#'
#' @inheritParams search_site
#' @return The generated search URL or an empty string.
Expand All @@ -338,6 +344,39 @@ search_posit = search_posit_community
#' search_twitter("searcher")
search_twitter = searcher("twitter")

#' @rdname search_twitter
#' @export
search_x = search_twitter

#' Search Mastodon
#'
#' The `search_mastodon()` functions search
#' Mastodon using: `https://mastodon.social/search?q=%23rstats+<query>`
#'
#' @inheritParams search_site
#' @return The generated search URL or an empty string.
#' @export
#' @family community sites
#' @examples
#' # Search Mastodon
#' search_mastodon("searcher")
search_mastodon = searcher("mastodon")


#' Search BlueSky
#'
#' The `search_bluesky()` functions search
#' BlueSky using: `https://bsky.app/search?q=%23rstats+<query>`
#'
#' @inheritParams search_site
#' @return The generated search URL or an empty string.
#' @export
#' @family community sites
#' @examples
#' # Search BlueSky
#' search_bluesky("searcher")
search_bluesky = searcher("bluesky")

#' Search StackOverflow
#'
#' The `search_stackoverflow()` and `search_so()` functions both search
Expand All @@ -346,7 +385,10 @@ search_twitter = searcher("twitter")
#'
#' For additional details regarding [StackOverflow](https://stackoverflow.com)'s
#' search interface please see:
#' <https://stackoverflow.com/help/searching>
#'
#' ```
#' https://stackoverflow.com/help/searching
#' ```
#'
#' @inheritParams search_site
#' @return The generated search URL or an empty string.
Expand Down
27 changes: 21 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ knitr::opts_chunk$set(
)
```

# searcher <img src="man/figures/searcher-animated-logo.svg" width="170" align="right" alt="A hexagonal logo for searcher"/>
# searcher <a href="https://r-pkg.thecoatlessprofessor.com/searcher/" alt="searcher"><img src="man/figures/searcher-animated-logo.svg" width="170" align="right" alt="A hexagonal logo for searcher"/></a>

<!-- badges: start -->
[![R-CMD-check](https://github.com/coatless-rpkg/searcher/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coatless-rpkg/searcher/actions/workflows/R-CMD-check.yaml)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/searcher)](https://www.r-pkg.org/pkg/searcher)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/searcher)](https://cran.r-project.org/package=searcher)
<!-- badges: end -->

## Overview


The goal of `searcher` is to provide a search interface directly inside of _R_.
For example, to look up `rcpp example numeric vector`
or `ggplot2 fix axis labels` call one of the `search_*()` functions to
Expand Down Expand Up @@ -65,8 +69,9 @@ major search engines, programming help websites, and code repositories. The foll
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, [Brave](https://search.brave.com/),
Kagi, X (formerly Twitter), [StackOverflow](https://stackoverflow.com/),
[Posit Community](https://community.posit.co/search),
Kagi, X (formerly Twitter), [BlueSky](https://bsky.app), [Mastodon](https://mastodon.social),
[StackOverflow](https://stackoverflow.com/),
[Posit Community](https://forum.posit.co/),
[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 @@ -85,11 +90,19 @@ search_kagi("R project")
search_duckduckgo("R project") # or search_ddg(...)
search_startpage("R project") # or search_sp(...)

# Searching Twitter to find out about machine learning for R and in general
# Searching X/Twitter to find out about machine learning for R and in general
search_twitter("machine learning")
search_twitter("machine learning", rlang = FALSE)

# Searching for linear regression questions for R and in general
# Searching BlueSky to find out about deep learning for R and in general
search_bluesky("deep learning")
search_bluesky("deep learning", rlang = FALSE)

# Searching Mastodon to find out about data visualization for R and in general
search_mastodon("data vis")
search_mastodon("data vis", rlang = FALSE)

# Searching SO for linear regression questions for R and in general
search_stackoverflow("linear regression")
search_stackoverflow("linear regression", rlang = FALSE) # or search_so(...)

Expand Down Expand Up @@ -184,8 +197,10 @@ search_rseek()
search_qwant()
search_brave()
search_kagi()
search_twitter()
search_grep()
search_mastodon()
search_bluesky()
search_twitter() # or search_x()
search_duckduckgo() # or search_ddg()
search_startpage() # or search_sp()
search_stackoverflow() # or search_so()
Expand Down
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# searcher <img src="man/figures/searcher-animated-logo.svg" width="170" align="right" alt="A hexagonal logo for searcher"/>
# searcher <a href="https://r-pkg.thecoatlessprofessor.com/searcher/" alt="searcher"><img src="man/figures/searcher-animated-logo.svg" width="170" align="right" alt="A hexagonal logo for searcher"/></a>

<!-- badges: start -->

Expand All @@ -11,6 +11,8 @@ downloads](https://cranlogs.r-pkg.org/badges/searcher)](https://www.r-pkg.org/pk
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/searcher)](https://cran.r-project.org/package=searcher)
<!-- badges: end -->

## Overview

The goal of `searcher` is to provide a search interface directly inside
of *R*. For example, to look up `rcpp example numeric vector` or
`ggplot2 fix axis labels` call one of the `search_*()` functions to
Expand Down Expand Up @@ -65,8 +67,10 @@ repositories. The following search platforms are supported:
[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/),
[Posit Community](https://community.posit.co/search),
Kagi, X (formerly Twitter), [BlueSky](https://bsky.app),
[Mastodon](https://mastodon.social),
[StackOverflow](https://stackoverflow.com/), [Posit
Community](https://forum.posit.co/),
[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 @@ -85,11 +89,19 @@ search_kagi("R project")
search_duckduckgo("R project") # or search_ddg(...)
search_startpage("R project") # or search_sp(...)

# Searching Twitter to find out about machine learning for R and in general
# Searching X/Twitter to find out about machine learning for R and in general
search_twitter("machine learning")
search_twitter("machine learning", rlang = FALSE)

# Searching for linear regression questions for R and in general
# Searching BlueSky to find out about deep learning for R and in general
search_bluesky("deep learning")
search_bluesky("deep learning", rlang = FALSE)

# Searching Mastodon to find out about data visualization for R and in general
search_mastodon("data vis")
search_mastodon("data vis", rlang = FALSE)

# Searching SO for linear regression questions for R and in general
search_stackoverflow("linear regression")
search_stackoverflow("linear regression", rlang = FALSE) # or search_so(...)

Expand Down Expand Up @@ -187,8 +199,10 @@ search_rseek()
search_qwant()
search_brave()
search_kagi()
search_twitter()
search_grep()
search_mastodon()
search_bluesky()
search_twitter() # or search_x()
search_duckduckgo() # or search_ddg()
search_startpage() # or search_sp()
search_stackoverflow() # or search_so()
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ reference:
- search_posit_community
- search_posit
- search_twitter
- search_bluesky
- search_mastodon

- title: "Code Repositories"
desc: >
Expand Down
32 changes: 32 additions & 0 deletions man/search_bluesky.Rd

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

32 changes: 32 additions & 0 deletions man/search_mastodon.Rd

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

2 changes: 2 additions & 0 deletions man/search_posit_community.Rd

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

Loading