From 0423777f8d565147a5d20b2932bb3fa588f31c23 Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Sat, 24 Jul 2021 14:14:07 -0500 Subject: [PATCH] Clean up help documentation URLs to address a CRAN check --- NEWS.md | 13 +++++++++---- R/search-functions.R | 18 +++++++++--------- R/utilities.R | 6 +++--- README.Rmd | 14 +++++++------- README.md | 18 +++++++++--------- man/search_site.Rd | 18 +++++++++--------- vignettes/search-patterns.Rmd | 5 +++-- 7 files changed, 49 insertions(+), 43 deletions(-) diff --git a/NEWS.md b/NEWS.md index c36b795..ae6a99e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 @@ -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 @@ -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. diff --git a/R/search-functions.R b/R/search-functions.R index 4318899..8394bf8 100644 --- a/R/search-functions.R +++ b/R/search-functions.R @@ -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=` +#' The `search_google` function searches [Google](https://www.google.com/) using: +#' `https://www.google.com/search?q=` #' #' See \url{https://moz.com/blog/the-ultimate-guide-to-the-google-search-parameters} #' for details. @@ -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=` +#' The `search_bing()` function searches [Bing](https://www.bing.com/) using: +#' `https://www.bing.com/search?q=` search_bing = searcher("bing") #' @rdname search_site @@ -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=} #' -#' 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") @@ -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+} +#' [BitBucket](https://bitbucket.org) using: +#' \code{https://bitbucket.org/search?q=lang\%3Ar+} #' -#' 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") diff --git a/R/utilities.R b/R/utilities.R index 6b7ad7e..2cda026 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -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, diff --git a/README.Rmd b/README.Rmd index f0d44e2..b418310 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,8 +16,8 @@ knitr::opts_chunk$set( [![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) @@ -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`. @@ -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, diff --git a/README.md b/README.md index b5a98d4..d4ba549 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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`. @@ -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 :) … \#r +> those who learn R :) … \#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, diff --git a/man/search_site.Rd b/man/search_site.Rd index 8f38b5b..c30e63a 100644 --- a/man/search_site.Rd +++ b/man/search_site.Rd @@ -85,8 +85,8 @@ up the resulting page in a web browser. } \section{Google Search}{ -The \code{search_google} function searches \href{https://google.com}{Google} using: -\verb{https://google.com/search?q=} +The \code{search_google} function searches \href{https://www.google.com/}{Google} using: +\verb{https://www.google.com/search?q=} See \url{https://moz.com/blog/the-ultimate-guide-to-the-google-search-parameters} for details. @@ -94,8 +94,8 @@ for details. \section{Bing Search}{ -The \code{search_bing()} function searches \href{https://bing.com}{Bing} using: -\verb{https://bing.com/search?q=} +The \code{search_bing()} function searches \href{https://www.bing.com/}{Bing} using: +\verb{https://www.bing.com/search?q=} } \section{DuckDuckGo Search}{ @@ -118,10 +118,10 @@ search interface please see: \section{Ecosia Search}{ The \code{search_ecosia()} function searches -\href{https://www.ecosia.org/}{Ecosia} using: +Ecosia using: \code{https://www.ecosia.org/search?q=} -For additional details regarding \href{https://www.ecosia.org}{Ecosia}'s +For additional details regarding Ecosia's search interface please see: \url{https://ecosia.zendesk.com/hc/en-us} } @@ -180,10 +180,10 @@ and \url{https://help.github.com/articles/searching-code/} \section{BitBucket Search}{ The \code{search_bitbucket()} and \code{search_bb()} functions both search -\href{https://bitbucket.com}{BitBucket} using: -\code{https://bitbucket.com/search?q=lang\%3Ar+} +\href{https://bitbucket.org}{BitBucket} using: +\code{https://bitbucket.org/search?q=lang\%3Ar+} -For additional details regarding \href{https://bitbucket.com}{BitBucket}'s +For additional details regarding \href{https://bitbucket.org}{BitBucket}'s search interface please see: \url{https://confluence.atlassian.com/bitbucket/code-search-in-bitbucket-873876782.html} } diff --git a/vignettes/search-patterns.Rmd b/vignettes/search-patterns.Rmd index d9a85f7..919da29 100644 --- a/vignettes/search-patterns.Rmd +++ b/vignettes/search-patterns.Rmd @@ -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): ` + [r]` - [Twitter](https://twitter.com/search): ` + #rstats` - [RStudio Community](https://community.rstudio.com/search): `` + - [Rseek](https://rseek.org/): `` - Code Repositories - [GitHub Search](https://github.com/search): ` language:r type:issue` - - [Bitbucket Search](https://bitbucket.com/search): ` lang:r` + - [Bitbucket Search](https://bitbucket.org/search): ` lang:r` # General Search Tips