Browse Source

pkg rename

master
Bob Rudis 8 years ago
parent
commit
453eb1722a
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 13
      DESCRIPTION
  2. 2
      NAMESPACE
  3. 2
      R/RcppExports.R
  4. 6
      R/wand-package.R
  5. 16
      README.Rmd
  6. 20
      README.md
  7. 14
      man/filemagic.Rd
  8. 14
      man/wand.Rd
  9. 2
      src/RcppExports.cpp
  10. 0
      src/wand.cpp
  11. 0
      tests/testthat/test-wand.R
  12. 0
      wand.Rproj

13
DESCRIPTION

@ -1,13 +1,16 @@
Package: filemagic Package: wand
Type: Package Type: Package
Title: filemagic title goes here Title: Retrieve 'Magic' Attributes from Files and Directories
Version: 0.1.0 Version: 0.1.0
Date: 2016-08-12 Date: 2016-08-12
Author: Bob Rudis (@hrbrmstr), Christos Zoulas [libmagic] Author: Bob Rudis (@hrbrmstr), Christos Zoulas [libmagic]
Maintainer: Bob Rudis <bob@rudis.net> Maintainer: Bob Rudis <bob@rudis.net>
Description: filemagic description goes here Description: The 'libmagic' library provides functions to determine
URL: http://github.com/hrbrmstr/filemagic mime type and other metadata from files through their "magic"
BugReports: https://github.com/hrbrmstr/filemagic/issues attributes.
URL: http://github.com/hrbrmstr/wand
BugReports: https://github.com/hrbrmstr/wand/issues
SystemRequirements: libmagic
License: AGPL License: AGPL
Suggests: Suggests:
testthat, testthat,

2
NAMESPACE

@ -3,4 +3,4 @@
export(incant) export(incant)
import(purrr) import(purrr)
importFrom(Rcpp,sourceCpp) importFrom(Rcpp,sourceCpp)
useDynLib(filemagic) useDynLib(wand)

2
R/RcppExports.R

@ -15,6 +15,6 @@
#' incant() %>% #' incant() %>%
#' glimpse() #' glimpse()
incant <- function(path) { incant <- function(path) {
.Call('filemagic_incant', PACKAGE = 'filemagic', path) .Call('wand_incant', PACKAGE = 'wand', path)
} }

6
R/filemagic-package.R → R/wand-package.R

@ -1,9 +1,9 @@
#' A package to ... #' Retrieve 'Magic' Attributes from Files and Directories
#' #'
#' @name filemagic #' @name wand
#' @docType package #' @docType package
#' @author Bob Rudis (@@hrbrmstr) #' @author Bob Rudis (@@hrbrmstr)
#' @import purrr #' @import purrr
#' @useDynLib filemagic #' @useDynLib wand
#' @importFrom Rcpp sourceCpp #' @importFrom Rcpp sourceCpp
NULL NULL

16
README.Rmd

@ -2,13 +2,13 @@
output: rmarkdown::github_document output: rmarkdown::github_document
--- ---
`filemagic` : R interface to `libmagic` `wand` : Retrieve 'Magic' Attributes from Files and Directories
So you do need to install `libmagic` to use this. This should also be pretty straightforward to get working on Windows. Assistance to do that is welcome. The `libmagic` library must be installed and available to use this. The package should also be pretty straightforward to get working on Windows. Assistance to do that is welcome.
The following functions are implemented: The following functions are implemented:
- `incant` : returns the mimetype of the files in the input vector (as a data frame) - `incant` : returns the "magic" metadata of the files in the input vector (as a data frame)
The following data sets are included: The following data sets are included:
@ -17,7 +17,7 @@ The following data sets are included:
### Installation ### Installation
```{r eval=FALSE} ```{r eval=FALSE}
devtools::install_github("hrbrmstr/filemagic") devtools::install_github("hrbrmstr/wand")
``` ```
```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE} ```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
@ -27,24 +27,24 @@ options(width=120)
### Usage ### Usage
```{r message=FALSE} ```{r message=FALSE}
library(filemagic) library(wand)
library(magrittr) library(magrittr)
library(dplyr) library(dplyr)
system.file("img", package="filemagic") %>% system.file("img", package="wand") %>%
list.files(full.names=TRUE) %>% list.files(full.names=TRUE) %>%
incant() %>% incant() %>%
glimpse() glimpse()
# current verison # current verison
packageVersion("filemagic") packageVersion("wand")
``` ```
### Test Results ### Test Results
```{r message=FALSE} ```{r message=FALSE}
library(filemagic) library(wand)
library(testthat) library(testthat)
date() date()

20
README.md

@ -1,11 +1,11 @@
`filemagic` : R interface to `libmagic` `wand` : Retrieve 'Magic' Attributes from Files and Directories
So you do need to install `libmagic` to use this. This should also be pretty straightforward to get working on Windows. Assistance to do that is welcome. The `libmagic` library must be installed and available to use this. The package should also be pretty straightforward to get working on Windows. Assistance to do that is welcome.
The following functions are implemented: The following functions are implemented:
- `incant` : returns the mimetype of the files in the input vector (as a data frame) - `incant` : returns the "magic" metadata of the files in the input vector (as a data frame)
The following data sets are included: The following data sets are included:
@ -14,17 +14,17 @@ The following data sets are included:
### Installation ### Installation
``` r ``` r
devtools::install_github("hrbrmstr/filemagic") devtools::install_github("hrbrmstr/wand")
``` ```
### Usage ### Usage
``` r ``` r
library(filemagic) library(wand)
library(magrittr) library(magrittr)
library(dplyr) library(dplyr)
system.file("img", package="filemagic") %>% system.file("img", package="wand") %>%
list.files(full.names=TRUE) %>% list.files(full.names=TRUE) %>%
incant() %>% incant() %>%
glimpse() glimpse()
@ -32,7 +32,7 @@ system.file("img", package="filemagic") %>%
## Observations: 10 ## Observations: 10
## Variables: 5 ## Variables: 5
## $ file <chr> "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/filemagic/img/example_dir", "/L... ## $ file <chr> "/Library/Frameworks/R.framework/Versions/3.3/Resources/library/wand/img/example_dir", "/Librar...
## $ mime_type <chr> "inode/directory", "text/x-c", "text/html", "text/plain", "text/rtf", "image/jpeg", "applicatio... ## $ mime_type <chr> "inode/directory", "text/x-c", "text/html", "text/plain", "text/rtf", "image/jpeg", "applicatio...
## $ encoding <chr> "binary", "us-ascii", "us-ascii", "us-ascii", "us-ascii", "binary", "binary", "binary", "us-asc... ## $ encoding <chr> "binary", "us-ascii", "us-ascii", "us-ascii", "us-ascii", "binary", "binary", "binary", "us-asc...
## $ extensions <chr> NA, "???", "???", "???", "???", "jpeg/jpg/jpe/jfif", "???", "???", "???", "???" ## $ extensions <chr> NA, "???", "???", "???", "???", "jpeg/jpg/jpe/jfif", "???", "???", "???", "???"
@ -40,7 +40,7 @@ system.file("img", package="filemagic") %>%
``` r ``` r
# current verison # current verison
packageVersion("filemagic") packageVersion("wand")
``` ```
## [1] '0.1.0' ## [1] '0.1.0'
@ -48,13 +48,13 @@ packageVersion("filemagic")
### Test Results ### Test Results
``` r ``` r
library(filemagic) library(wand)
library(testthat) library(testthat)
date() date()
``` ```
## [1] "Fri Aug 12 19:47:32 2016" ## [1] "Fri Aug 12 21:41:40 2016"
``` r ``` r
test_dir("tests/") test_dir("tests/")

14
man/filemagic.Rd

@ -1,14 +0,0 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filemagic-package.R
\docType{package}
\name{filemagic}
\alias{filemagic}
\alias{filemagic-package}
\title{A package to ...}
\description{
A package to ...
}
\author{
Bob Rudis (@hrbrmstr)
}

14
man/wand.Rd

@ -0,0 +1,14 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wand-package.R
\docType{package}
\name{wand}
\alias{wand}
\alias{wand-package}
\title{Retrieve 'Magic' Attributes from Files and Directories}
\description{
Retrieve 'Magic' Attributes from Files and Directories
}
\author{
Bob Rudis (@hrbrmstr)
}

2
src/RcppExports.cpp

@ -7,7 +7,7 @@ using namespace Rcpp;
// incant // incant
DataFrame incant(CharacterVector path); DataFrame incant(CharacterVector path);
RcppExport SEXP filemagic_incant(SEXP pathSEXP) { RcppExport SEXP wand_incant(SEXP pathSEXP) {
BEGIN_RCPP BEGIN_RCPP
Rcpp::RObject __result; Rcpp::RObject __result;
Rcpp::RNGScope __rngScope; Rcpp::RNGScope __rngScope;

0
src/filemagic.cpp → src/wand.cpp

0
tests/testthat/test-filemagic.R → tests/testthat/test-wand.R

0
filemagic.Rproj → wand.Rproj

Loading…
Cancel
Save