Skip to content

Commit

Permalink
Clean up help documentation URLs to address a CRAN check
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Jul 24, 2021
1 parent fbc55b2 commit 0423777
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 43 deletions.
13 changes: 9 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
## Features

- Added search portals:
- `search_ecosia()`: Searches on [Ecosia](https://www.ecosia.org/).
- `search_ecosia()`: Searches on Ecosia.
([#31](https://github.com/r-assist/searcher/issues/31),
[#32](https://github.com/r-assist/searcher/pull/32))
- `search_rseek()`: Searches on [rseek](https://rseek.org/).
([#32](https://github.com/r-assist/searcher/pull/33), thanks [@rossellhayes](https://github.com/rossellhayes)!)

## Bug Fixes

- Modified URLs to search engines to pass CRAN checks.
- Removed documentation URLs to Ecosia search engine as they return `404: Not Found`.

## Deployment

- Updated [GitHub Actions for R](https://github.com/r-lib/actions) workflows
Expand Down Expand Up @@ -84,7 +89,7 @@
## Features

- Added search portal:
- `search_ixquick()`: Searches with [ixquick](https://www.ixquick.com/). (#8, #6)
- `search_ixquick()`: Searches with ixquick. (#8, #6)

## Changes

Expand All @@ -98,11 +103,11 @@

- Added search portal functions
- `search_site()`: Looks up search portal and _then_ searches with it.
- `search_google()`: Searches with [Google](https://google.com/)
- `search_google()`: Searches with [Google](https://www.google.com)
- `search_bing()`: Searches with [Bing](https://www.bing.com)
- `search_duckduckgo()` or `search_ddg()`: Searches with [DuckDuckGo](https://duckduckgo.com/)
- `search_github()` or `search_gh()`: Searches issues on [GitHub](https://github.com/)
- `search_bitbucket()` or `search_bb()`: Searches issues on [BitBucket](https://bitbucket.com/)
- `search_bitbucket()` or `search_bb()`: Searches issues on [BitBucket](https://bitbucket.org/)
- `search_stackoverflow()` or `search_so()`: Searches questions on [StackOverflow](https://stackoverflow.com/)
- Add function generator `searcher()` to create function objects that can be
used as error handlers in `option(error = )` and task call-backs.
Expand Down
18 changes: 9 additions & 9 deletions R/search-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ searcher = function(site, keyword = getOption("searcher.default_keyword")) {
#' @rdname search_site
#' @export
#' @section Google Search:
#' The `search_google` function searches [Google](https://google.com) using:
#' `https://google.com/search?q=<query>`
#' The `search_google` function searches [Google](https://www.google.com/) using:
#' `https://www.google.com/search?q=<query>`
#'
#' See \url{https://moz.com/blog/the-ultimate-guide-to-the-google-search-parameters}
#' for details.
Expand All @@ -167,8 +167,8 @@ search_google = searcher("google")
#' @rdname search_site
#' @export
#' @section Bing Search:
#' The `search_bing()` function searches [Bing](https://bing.com) using:
#' `https://bing.com/search?q=<query>`
#' The `search_bing()` function searches [Bing](https://www.bing.com/) using:
#' `https://www.bing.com/search?q=<query>`
search_bing = searcher("bing")

#' @rdname search_site
Expand Down Expand Up @@ -209,10 +209,10 @@ search_sp = search_startpage
#' @export
#' @section Ecosia Search:
#' The `search_ecosia()` function searches
#' [Ecosia](https://www.ecosia.org/) using:
#' Ecosia using:
#' \code{https://www.ecosia.org/search?q=<query>}
#'
#' For additional details regarding [Ecosia](https://www.ecosia.org)'s
#' For additional details regarding Ecosia's
#' search interface please see:
#' \url{https://ecosia.zendesk.com/hc/en-us}
search_ecosia = searcher("ecosia")
Expand Down Expand Up @@ -299,10 +299,10 @@ search_gh = search_github
#' @export
#' @section BitBucket Search:
#' The `search_bitbucket()` and `search_bb()` functions both search
#' [BitBucket](https://bitbucket.com) using:
#' \code{https://bitbucket.com/search?q=lang\%3Ar+<query>}
#' [BitBucket](https://bitbucket.org) using:
#' \code{https://bitbucket.org/search?q=lang\%3Ar+<query>}
#'
#' For additional details regarding [BitBucket](https://bitbucket.com)'s
#' For additional details regarding [BitBucket](https://bitbucket.org)'s
#' search interface please see:
#' \url{https://confluence.atlassian.com/bitbucket/code-search-in-bitbucket-873876782.html}
search_bitbucket = searcher("bb")
Expand Down
6 changes: 3 additions & 3 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
#'
#' @examples
#' # Query Google
#' browse_url("https://google.com/search?q=", "rstats is great")
#' browse_url("https://www.google.com/search?q=", "rstats is great")
#'
#' # Generate URL for Google (do not open in a web browser)
#' browse_url("https://google.com/search?q=", "rstats is great",
#' browse_url("https://www.google.com/search?q=", "rstats is great",
#' open_browser = FALSE)
#'
#' # Print out the hidden url
#' print(browse_url("https://google.com/search?q=", "rstats is great",
#' print(browse_url("https://www.google.com/search?q=", "rstats is great",
#' open_browser = FALSE))
#' @noRd
browse_url = function(base,
Expand Down
14 changes: 7 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![R build status](https://github.com/r-assist/searcher/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/searcher/actions)
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/searcher)](http://www.r-pkg.org/pkg/searcher)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/searcher)](https://cran.r-project.org/package=searcher)
[![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)
[![Codecov test coverage](https://codecov.io/gh/r-assist/searcher/branch/master/graph/badge.svg)](https://codecov.io/gh/r-assist/searcher?branch=master)
<!-- badges: end -->

Expand Down Expand Up @@ -62,12 +62,12 @@ library(searcher)

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://google.com), [Bing](https://www.bing.com/),
platforms are supported: [Google](https://www.google.com), [Bing](https://www.bing.com/),
[DuckDuckGo](https://duckduckgo.com/), [Startpage](https://www.startpage.com/en/),
[Ecosia](https://www.ecosia.org/), [rseek](https://www.rseek.org/),
Ecosia, [rseek](https://rseek.org/),
[Twitter](https://twitter.com/search), [StackOverflow](https://stackoverflow.com/search),
[RStudio Community](https://community.rstudio.com/search),
[GitHub](https://github.com/search), and [BitBucket](https://bitbucket.com/search).
[GitHub](https://github.com/search), and [BitBucket](https://bitbucket.org/product/).
By default, an appropriate suffix for each platform that ensures relevant
results to _R_ is appended to all queries. This behavior can be disabled by
using `rlang = FALSE`.
Expand Down Expand Up @@ -208,10 +208,10 @@ community members.

> R package "searcher" that automatically searches Stackoverflow for error that
> you just saw in the console. Cool package, especially for those who learn R :)
> https://github.com/coatless/searcher ... #r #rlang #rstats #rstudio
> https://github.com/r-assist/searcher ... #r #rlang #rstats #rstudio
>
> --- [Paweł Przytuła](https://twitter.com/pawel_appsilon/status/1109545516264841216)
> March 23th, 2019. ~292 Retweets and 876 likes
> March 23th, 2019. ~292 Retweets and 876 likes (Note, URL updated to new repository location.)
> Did you know, using "searcher" package, you could automatically to
> search stackoverflow, google, GitHub and many more sites for errors,
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[![R build
status](https://github.com/r-assist/searcher/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/searcher/actions)
[![CRAN RStudio mirror
downloads](http://cranlogs.r-pkg.org/badges/searcher)](http://www.r-pkg.org/pkg/searcher)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/searcher)](https://cran.r-project.org/package=searcher)
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)
[![Codecov test
coverage](https://codecov.io/gh/r-assist/searcher/branch/master/graph/badge.svg)](https://codecov.io/gh/r-assist/searcher?branch=master)
<!-- badges: end -->
Expand Down Expand Up @@ -57,15 +57,14 @@ library(searcher)
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://google.com), [Bing](https://www.bing.com/),
[Google](https://www.google.com), [Bing](https://www.bing.com/),
[DuckDuckGo](https://duckduckgo.com/),
[Startpage](https://www.startpage.com/en/),
[Ecosia](https://www.ecosia.org/), [rseek](https://www.rseek.org/),
[Twitter](https://twitter.com/search),
[Startpage](https://www.startpage.com/en/), Ecosia,
[rseek](https://rseek.org/), [Twitter](https://twitter.com/search),
[StackOverflow](https://stackoverflow.com/search), [RStudio
Community](https://community.rstudio.com/search),
[GitHub](https://github.com/search), and
[BitBucket](https://bitbucket.com/search). By default, an appropriate
[BitBucket](https://bitbucket.org/product/). By default, an appropriate
suffix for each platform that ensures relevant results to *R* is
appended to all queries. This behavior can be disabled by using
`rlang = FALSE`.
Expand Down Expand Up @@ -217,12 +216,13 @@ positively received by community members.

> R package “searcher” that automatically searches Stackoverflow for
> error that you just saw in the console. Cool package, especially for
> those who learn R :) <https://github.com/coatless/searcher>\#r
> those who learn R :) <https://github.com/r-assist/searcher>\#r
> \#rlang \#rstats \#rstudio
>
> [Paweł
> Przytuła](https://twitter.com/pawel_appsilon/status/1109545516264841216)
> March 23th, 2019. \~292 Retweets and 876 likes
> March 23th, 2019. \~292 Retweets and 876 likes (Note, URL updated to
> new repository location.)
> Did you know, using “searcher” package, you could automatically to
> search stackoverflow, google, GitHub and many more sites for errors,
Expand Down
18 changes: 9 additions & 9 deletions man/search_site.Rd

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

5 changes: 3 additions & 2 deletions vignettes/search-patterns.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ _R_-specific results. If `rlang = FALSE`, then the results are generalized.
- All search engines affix `"r programming"` to the end of the query to
constrain the results to be _R_-specific.
- `"r programming"` was selected because it performed best when compared
to `"rlang"`, `"rstats"`, and `"r language"` on [Google Trends](https://trends.google.com).
to `"rlang"`, `"rstats"`, and `"r language"` on [Google Trends](https://trends.google.com/trends/).
- Community Sites
- [StackOverflow Search](https://stackoverflow.com/search): ` <query> + [r]`
- [Twitter](https://twitter.com/search): `<query> + #rstats`
- [RStudio Community](https://community.rstudio.com/search): `<query>`
- [Rseek](https://rseek.org/): `<query>`
- Code Repositories
- [GitHub Search](https://github.com/search): `<query> language:r type:issue`
- [Bitbucket Search](https://bitbucket.com/search): `<query> lang:r`
- [Bitbucket Search](https://bitbucket.org/search): `<query> lang:r`

# General Search Tips

Expand Down

0 comments on commit 0423777

Please sign in to comment.