Skip to content

Commit

Permalink
Merge branch 'cran_release'
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlincoln committed Sep 2, 2015
2 parents 54e7886 + 63b98f0 commit ac899b1
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 5 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
cran-comments.md
7 changes: 5 additions & 2 deletions DESCRIPTION
@@ -1,11 +1,14 @@
Package: clipr
Type: Package
Title: Read and Write from the System Clipboard
Version: 0.0.0.9000
Version: 0.1.0
Date: 2015-08-27
Authors@R: person("Matthew", "Lincoln", email = "mlincol1@umd.edu", role = c("aut", "cre"))
Authors@R: c(
person("Matthew", "Lincoln", email = "matthew.d.lincoln@gmail.com", role = c("aut", "cre")),
person("Louis", "Maddox", role = "ctb"))
Description: Simple utility functions to read from and write to the system
clipboards of Windows, OS X, and Linux.
Imports: utils
License: GPL-3
LazyData: TRUE
URL: https://github.com/mdlincoln/clipr
Expand Down
10 changes: 10 additions & 0 deletions R/clipboard.R
Expand Up @@ -5,6 +5,9 @@
#' @return A character vector with the contents of the clipboard. If the system
#' clipboard is empty, returns NULL
#'
#' @examples
#' clip_text <- read_clip()
#'
#' @export
read_clip <- function() {
# Determine system type
Expand Down Expand Up @@ -40,6 +43,13 @@ read_clip <- function() {
#' Defaults to no terminator character, indicated by \code{NULL}.
#' @return On successfully writing the input to the clipboard, this function
#' returns the same input for use in piped operations.
#'
#' @examples
#' text <- "Write to clipboard"
#' write_clip(text)
#'
#' multiline <- c("Write", "to", "clipboard")
#' write_clip(multiline, sep = "\n")
#' @export
write_clip <- function(content, sep = NULL, eos = NULL) invisible({
# Determine system type
Expand Down
7 changes: 4 additions & 3 deletions README.md
@@ -1,7 +1,9 @@
clipr
=====

[![Project Status: Wip - Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](http://www.repostatus.org/badges/0.1.0/wip.svg)](http://www.repostatus.org/#wip)
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/0.1.0/active.svg)](http://www.repostatus.org/#active)

[![CRAN status.](http://www.r-pkg.org/badges/version/clipr)]((http://www.r-pkg.org/pkg/clipr))

Simple utility functions to read and write from the system clipboards of Windows, OS X, and Linux.

Expand All @@ -11,8 +13,7 @@ library("clipr")

var <- read_clip()

write_clip("Text")
> [1] "Text"
write_clip(c("Text", "for", "clipboard"), sep = "\n")
```

---
Expand Down
9 changes: 9 additions & 0 deletions cran-comments.md
@@ -0,0 +1,9 @@
This is my first submission.

## Test environments
* local OS X install, R 3.2.2
* local ubuntu 14.04, R 3.2.2
* win-builder (devel and release)

## R CMD check results
There were no ERRORs or WARNINGs.
3 changes: 3 additions & 0 deletions man/read_clip.Rd
Expand Up @@ -13,4 +13,7 @@ A character vector with the contents of the clipboard. If the system
\description{
Read the contents of the system clipboard into a character vector.
}
\examples{
clip_text <- read_clip()
}

7 changes: 7 additions & 0 deletions man/write_clip.Rd
Expand Up @@ -23,4 +23,11 @@ On successfully writing the input to the clipboard, this function
\description{
Write a character vector to the system clipboard
}
\examples{
text <- "Write to clipboard"
write_clip(text)
multiline <- c("Write", "to", "clipboard")
write_clip(multiline, sep = "\\n")
}

0 comments on commit ac899b1

Please sign in to comment.