Various ‘macOS’-oriented Tools and Utilities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.1 KiB

6 years ago
---
output: rmarkdown::github_document
---
# mactheknife
Read 'macOS' .DS_Store' Files
## Description
A thin wrapper around the 'Python' 'dsstore' module <https://github.com/gehaxelt/Python-dsstore> by 'Sebastian Neef'.
## NOTE
- This may turn into a broader "macOS hacking" package
- Uses `reticulate` so a working Python implementation is needed
## What's Inside The Tin
- `read_dsstore`: Read a '.DS_Store' file
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")
```
## Built-in data
```{r}
read_dsstore(
path = system.file("extdat", "DS_Store.ctf", package = "mactheknife")
)
```
## 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)
```