| @@ -1,13 +1,16 @@ | |||
| Package: regexplain | |||
| Title: Rstudio addin to help you with your regexes (in progress) | |||
| Version: 0.1.1 | |||
| Title: Rstudio Addin to Explain, Test and Build Regular Expressions | |||
| Version: 0.1.1.9000 | |||
| Date: 2018-03-07 | |||
| Authors@R: c( | |||
| person("Garrick", "Aden-Buie", email = "g.adenbuie@gmail.com", role = c("aut", "cre")), | |||
| person("Winston", "Chang", role = c("ctb"), comment = "Author of textInput and textAreaInput fragments from shiny"), | |||
| person(family = "RStudio", role = "cph", comment = "Copyright holder of included shiny fragments") | |||
| ) | |||
| Description: Test and view regexes. | |||
| Description: A set of RStudio Addins to help interactively test and build | |||
| regular expressions. Provides a Shiny gadget interface for interactively | |||
| constructing the regexp and viewing the results from common string-searching | |||
| functions. Also provides a helpful reference sheet as an RStudio addin. | |||
| Depends: R (>= 3.4.3) | |||
| License: GPL-3 | |||
| Encoding: UTF-8 | |||
| @@ -26,6 +29,7 @@ Imports: | |||
| shiny, | |||
| miniUI | |||
| RoxygenNote: 6.0.1 | |||
| Roxygen: list(markdown = TRUE) | |||
| URL: https://github.com/gadenbuie/regexplain | |||
| BugReports: https://github.com/gadenbuie/regexplain/issues | |||
| Suggests: | |||
| @@ -0,0 +1,4 @@ | |||
| #' @importFrom dplyr "%>%" mutate filter group_by summarize select | |||
| #' @importFrom utils getFromNamespace | |||
| #' @keywords internal | |||
| "_PACKAGE" | |||
| @@ -110,9 +110,9 @@ wrap_regex <- function(pattern, escape = TRUE, exact = TRUE) { | |||
| #' @param knitr Print into knitr doc? If `TRUE`, marks text as `asis_output` and | |||
| #' sets `render = FALSE` and `escape = TRUE`. | |||
| #' @param exact Should regex be displayed as entered by the user into R console | |||
| #' or source (default)? When `TRUE`, regex is displayed with the double `\\` | |||
| #' or source (default)? When `TRUE`, regex is displayed with the double `\\\\` | |||
| #' required for escaping backslashes in R. When `FALSE`, regex is displayed | |||
| #' as interpreted by the regex engine (i.e. double `\\` as a single `\`). | |||
| #' as interpreted by the regex engine (i.e. double `\\\\` as a single `\\`). | |||
| #' @param ... Passed to [run_regex] | |||
| #' @export | |||
| view_regex <- function( | |||
| @@ -1,7 +1,3 @@ | |||
| #' @importFrom dplyr "%>%" mutate filter group_by summarize select | |||
| #' @importFrom utils getFromNamespace | |||
| NULL | |||
| escape_html <- function(x) { | |||
| x = gsub("&", "&", x) | |||
| x = gsub("<", "<", x) | |||
| @@ -2,7 +2,7 @@ | |||
| title: "regexplain" | |||
| output: github_document | |||
| --- | |||
| [](commits/master) | |||
| [](commits/master) | |||
|  | |||
| [](http://www.repostatus.org/#active) | |||
| [](https://cran.r-project.org/package=regexplain) | |||
| @@ -1,13 +1,13 @@ | |||
| regexplain | |||
| ================ | |||
| [](commits/master) | |||
| [](commits/master) | |||
|  | |||
| [](http://www.repostatus.org/#active) | |||
| [](https://cran.r-project.org/package=regexplain) | |||
| [](/commits/master) | |||
| [](/commits/master) | |||
| <!-- Links --> | |||
| @@ -10,8 +10,8 @@ regex_gadget(text = NULL, start_page = if (is.null(text)) "Text" else | |||
| \arguments{ | |||
| \item{text}{Text to explore in gadget (editable using interface)} | |||
| \item{start_page}{Open gadget to this tab, one of `"Text"`, `"Regex"`, | |||
| `"Output"`, or `"Help"`} | |||
| \item{start_page}{Open gadget to this tab, one of \code{"Text"}, \code{"Regex"}, | |||
| \code{"Output"}, or \code{"Help"}} | |||
| } | |||
| \description{ | |||
| regexplain gadget | |||
| @@ -0,0 +1,32 @@ | |||
| % Generated by roxygen2: do not edit by hand | |||
| % Please edit documentation in R/regexplain-package.R | |||
| \docType{package} | |||
| \name{regexplain-package} | |||
| \alias{regexplain} | |||
| \alias{regexplain-package} | |||
| \title{regexplain: Rstudio Addin to Explain, Test and Build Regular Expressions} | |||
| \description{ | |||
| A set of RStudio Addins to help interactively test and build | |||
| regular expressions. Provides a Shiny gadget interface for interactively | |||
| constructing the regexp and viewing the results from common string-searching | |||
| functions. Also provides a helpful reference sheet as an RStudio addin. | |||
| } | |||
| \seealso{ | |||
| Useful links: | |||
| \itemize{ | |||
| \item \url{https://github.com/gadenbuie/regexplain} | |||
| \item Report bugs at \url{https://github.com/gadenbuie/regexplain/issues} | |||
| } | |||
| } | |||
| \author{ | |||
| \strong{Maintainer}: Garrick Aden-Buie \email{g.adenbuie@gmail.com} | |||
| Other contributors: | |||
| \itemize{ | |||
| \item Winston Chang (Author of textInput and textAreaInput fragments from shiny) [contributor] | |||
| \item RStudio (Copyright holder of included shiny fragments) [copyright holder] | |||
| } | |||
| } | |||
| \keyword{internal} | |||
| @@ -41,7 +41,7 @@ resizing textareas.} | |||
| \item{is_code}{Should the text input be considered verbatim code input?} | |||
| } | |||
| \description{ | |||
| Standard [shiny::textAreaInput()] with additional `is_code` parameter, added | |||
| code font style for the input text and with `autocomplete`, `autocorrect`, | |||
| `autocapitalize` and `spellcheck` set to `off` or `false`. | |||
| Standard \code{\link[shiny:textAreaInput]{shiny::textAreaInput()}} with additional \code{is_code} parameter, added | |||
| code font style for the input text and with \code{autocomplete}, \code{autocorrect}, | |||
| \code{autocapitalize} and \code{spellcheck} set to \code{off} or \code{false}. | |||
| } | |||
| @@ -14,14 +14,14 @@ textInputCode(inputId, label, value = "", width = NULL, | |||
| \item{value}{Initial value.} | |||
| \item{width}{Width of `shiny-input-container` div.} | |||
| \item{width}{Width of \code{shiny-input-container} div.} | |||
| \item{placeholder}{A character string giving the user a hint as to what can | |||
| be entered into the control. Internet Explorer 8 and 9 do not support this | |||
| option.} | |||
| } | |||
| \description{ | |||
| Standard [shiny::textInput()] with additional `width` parameter, added code | |||
| font style for the input text and with `autocomplete`, `autocorrect`, | |||
| `autocapitalize` and `spellcheck` set to `off` or `false`. | |||
| Standard \code{\link[shiny:textInput]{shiny::textInput()}} with additional \code{width} parameter, added code | |||
| font style for the input text and with \code{autocomplete}, \code{autocorrect}, | |||
| \code{autocapitalize} and \code{spellcheck} set to \code{off} or \code{false}. | |||
| } | |||
| @@ -12,19 +12,19 @@ view_regex(text, pattern, ..., render = TRUE, escape = render, | |||
| \item{pattern}{Regex pattern to look for} | |||
| \item{...}{Passed to [run_regex]} | |||
| \item{...}{Passed to \link{run_regex}} | |||
| \item{render}{Render results to an HTML doc and open in RStudio viewer?} | |||
| \item{escape}{Escape HTML-related characters in `text`?} | |||
| \item{escape}{Escape HTML-related characters in \code{text}?} | |||
| \item{knitr}{Print into knitr doc? If `TRUE`, marks text as `asis_output` and | |||
| sets `render = FALSE` and `escape = TRUE`.} | |||
| \item{knitr}{Print into knitr doc? If \code{TRUE}, marks text as \code{asis_output} and | |||
| sets \code{render = FALSE} and \code{escape = TRUE}.} | |||
| \item{exact}{Should regex be displayed as entered by the user into R console | |||
| or source (default)? When `TRUE`, regex is displayed with the double `\\` | |||
| required for escaping backslashes in R. When `FALSE`, regex is displayed | |||
| as interpreted by the regex engine (i.e. double `\\` as a single `\`).} | |||
| or source (default)? When \code{TRUE}, regex is displayed with the double \code{\\\\} | |||
| required for escaping backslashes in R. When \code{FALSE}, regex is displayed | |||
| as interpreted by the regex engine (i.e. double \code{\\\\} as a single \code{\\}).} | |||
| } | |||
| \description{ | |||
| View grouped regex results | |||