~hrbrmstr/wand

8b75a1c783e09116ffa2905a511d288012b7cf91 — boB Rudis 10 months ago 9f075c0
README
2 files changed, 8 insertions(+), 12 deletions(-)

M README.Rmd
M README.md
M README.Rmd => README.Rmd +3 -5
@@ 20,17 20,15 @@ determined from "magic" bytes in file headers, file contents or intuited from
file extensions. Tools are provided to perform curated "magic" tests as well
as mapping 'MIME' types from a database of over 1,500 extension mappings.

Provides a more portable/ligtweight alternative to the `wand` package.

## 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

- `get_content_type`:	Discover MIME type of a file based on contents
- `guess_content_type`:	Guess MIME type from filename (extension)
- `simplemagic_mime_db`:	File extension-to-MIME mapping data frame
```{r ingredients, results='asis', echo=FALSE}
hrbrpkghelpr::describe_ingredients()
```

The following functions are implemented:


M README.md => README.md +5 -7
@@ 21,8 21,6 @@ from file extensions. Tools are provided to perform curated “magic”
tests as well as mapping ‘MIME’ types from a database of over 1,500
extension mappings.

Provides a more portable/ligtweight alternative to the `wand` package.

## SOME IMPORTANT DETAILS

The header checking is minimal (i.e. nowhere near as comprehensive as


@@ 171,11 169,11 @@ list.files(system.file("extdat", package="wand"), full.names=TRUE) %>%
cloc::cloc_pkg_md()
```

| Lang | \# Files |  (%) | LoC |  (%) | Blank lines |  (%) | \# Lines |  (%) |
| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: |
| R    |        7 | 0.78 | 949 | 0.91 |          52 | 0.69 |       62 | 0.61 |
| JSON |        1 | 0.11 |  80 | 0.08 |           0 | 0.00 |        0 | 0.00 |
| Rmd  |        1 | 0.11 |  14 | 0.01 |          23 | 0.31 |       40 | 0.39 |
| Lang | \# Files |  (%) | LoC |  (%) | Blank lines | (%) | \# Lines |  (%) |
| :--- | -------: | ---: | --: | ---: | ----------: | --: | -------: | ---: |
| R    |        7 | 0.78 | 949 | 0.91 |          52 | 0.7 |       62 | 0.62 |
| JSON |        1 | 0.11 |  80 | 0.08 |           0 | 0.0 |        0 | 0.00 |
| Rmd  |        1 | 0.11 |  15 | 0.01 |          22 | 0.3 |       38 | 0.38 |

## Code of Conduct