|
|
|
---
|
|
|
|
output: rmarkdown::github_document
|
|
|
|
---
|
|
|
|
|
|
|
|
# mactheknife
|
|
|
|
|
|
|
|
Various 'macOS'-oriented Tools and Utilities
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
A set of tools/methods and data that are geared towards the 'macOS' ecosystem.
|
|
|
|
|
|
|
|
## NOTE
|
|
|
|
|
|
|
|
- Uses `reticulate` so a working Python implementation is needed
|
|
|
|
|
|
|
|
## What's Inside The Tin
|
|
|
|
|
|
|
|
- `read_dsstore`: Read a '.DS_Store' from a file/URL
|
|
|
|
|
|
|
|
The following functions are implemented:
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
```{r eval=FALSE}
|
|
|
|
devtools::install_github("hrbrmstr/mactheknife")
|
|
|
|
```
|
|
|
|
|
|
|
|
```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
|
|
|
|
options(width=120)
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```{r message=FALSE, warning=FALSE, error=FALSE}
|
|
|
|
library(mactheknife)
|
|
|
|
|
|
|
|
# current verison
|
|
|
|
packageVersion("mactheknife")
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## `.DS_Store` example using built-in data
|
|
|
|
|
|
|
|
```{r}
|
|
|
|
read_dsstore(
|
|
|
|
path = system.file("extdat", "DS_Store.ctf", package = "mactheknife")
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
## A URL I should not have let a `.DS_Store` file lying around in
|
|
|
|
|
|
|
|
```{r}
|
|
|
|
read_dsstore("https://rud.is/books/21-recipes/.DS_Store")
|
|
|
|
```
|
|
|
|
|
|
|
|
## `.DS_Store` larger example using my "~/projects" folder (use your own dir as an example)
|
|
|
|
|
|
|
|
```{r}
|
|
|
|
library(magrittr)
|
|
|
|
|
|
|
|
list.files(
|
|
|
|
path = "~/projects", pattern = "\\.DS_Store",
|
|
|
|
all.files=TRUE, recursive = TRUE, full.names = TRUE
|
|
|
|
) %>%
|
|
|
|
lapply(read_dsstore) -> x
|
|
|
|
|
|
|
|
str(x)
|
|
|
|
```
|