Browse Source

pkg rename

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

2
NAMESPACE

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

2
R/RcppExports.R

@ -15,6 +15,6 @@
#' incant() %>%
#' glimpse()
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
#' @author Bob Rudis (@@hrbrmstr)
#' @import purrr
#' @useDynLib filemagic
#' @useDynLib wand
#' @importFrom Rcpp sourceCpp
NULL

16
README.Rmd

@ -2,13 +2,13 @@
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:
- `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:
@ -17,7 +17,7 @@ The following data sets are included:
### Installation
```{r eval=FALSE}
devtools::install_github("hrbrmstr/filemagic")
devtools::install_github("hrbrmstr/wand")
```
```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
@ -27,24 +27,24 @@ options(width=120)
### Usage
```{r message=FALSE}
library(filemagic)
library(wand)
library(magrittr)
library(dplyr)
system.file("img", package="filemagic") %>%
system.file("img", package="wand") %>%
list.files(full.names=TRUE) %>%
incant() %>%
glimpse()
# current verison
packageVersion("filemagic")
packageVersion("wand")
```
### Test Results
```{r message=FALSE}
library(filemagic)
library(wand)
library(testthat)
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:
- `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:
@ -14,17 +14,17 @@ The following data sets are included:
### Installation
``` r
devtools::install_github("hrbrmstr/filemagic")
devtools::install_github("hrbrmstr/wand")
```
### Usage
``` r
library(filemagic)
library(wand)
library(magrittr)
library(dplyr)
system.file("img", package="filemagic") %>%
system.file("img", package="wand") %>%
list.files(full.names=TRUE) %>%
incant() %>%
glimpse()
@ -32,7 +32,7 @@ system.file("img", package="filemagic") %>%
## Observations: 10
## 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...
## $ encoding <chr> "binary", "us-ascii", "us-ascii", "us-ascii", "us-ascii", "binary", "binary", "binary", "us-asc...
## $ extensions <chr> NA, "???", "???", "???", "???", "jpeg/jpg/jpe/jfif", "???", "???", "???", "???"
@ -40,7 +40,7 @@ system.file("img", package="filemagic") %>%
``` r
# current verison
packageVersion("filemagic")
packageVersion("wand")
```
## [1] '0.1.0'
@ -48,13 +48,13 @@ packageVersion("filemagic")
### Test Results
``` r
library(filemagic)
library(wand)
library(testthat)
date()
```
## [1] "Fri Aug 12 19:47:32 2016"
## [1] "Fri Aug 12 21:41:40 2016"
``` r
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
DataFrame incant(CharacterVector path);
RcppExport SEXP filemagic_incant(SEXP pathSEXP) {
RcppExport SEXP wand_incant(SEXP pathSEXP) {
BEGIN_RCPP
Rcpp::RObject __result;
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