Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrbrmstr/wand
Use 'magic' to guess file types
https://github.com/hrbrmstr/wand
file magic-bytes r r-cyber rstats
Last synced: 27 days ago
JSON representation
Use 'magic' to guess file types
- Host: GitHub
- URL: https://github.com/hrbrmstr/wand
- Owner: hrbrmstr
- License: other
- Created: 2016-08-12T22:15:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-07T11:47:12.000Z (about 4 years ago)
- Last Synced: 2024-08-13T07:13:47.414Z (3 months ago)
- Topics: file, magic-bytes, r, r-cyber, rstats
- Language: R
- Homepage:
- Size: 1.28 MB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - hrbrmstr/wand - Use 'magic' to guess file types (R)
README
---
output: rmarkdown::github_document
---
```{r pkg-knitr-opts, include=FALSE}
hrbrpkghelpr::global_opts()
``````{r badges, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::stinking_badges()
``````{r description, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::yank_title_and_description()
```## SOME IMPORTANT DETAILS
The header checking is minimal (i.e. nowhere near as comprehensive as `libmagic`) but covers quite a bit of ground. If there are content-check types from [`magic sources`](https://github.com/threatstack/libmagic/tree/master/magic/) that you would like coded into the package, please file an issue and _include the full line(s)_ from that linked `magic.tab` that you would like mapped.
## What's Inside The Tin
The following functions are implemented:
```{r ingredients, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::describe_ingredients()
```## Installation
```{r install-ex, results='asis', echo=FALSE, cache=FALSE}
hrbrpkghelpr::install_block()
```## Usage
```{r vers, message=FALSE, warning=FALSE, error=FALSE, cache=FALSE}
library(wand)
library(tidyverse)# current verison
packageVersion("wand")
``````{r ex1}
list.files(system.file("extdat", "pass-through", package="wand"), full.names=TRUE) %>%
map_df(~{
tibble(
fil = basename(.x),
mime = list(get_content_type(.x))
)
}) %>%
unnest()
```## wand Metrics
```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```## Code of Conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.