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.
1.6 KiB
1.6 KiB
---
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
- `kernel_state`: Retrieve kernel state information
- `read_dsstore`: Read a '.DS_Store' from a file/URL
- `software_update_history`: Retrieve Software Update history
- `sw_vers`: Retrieve macOS Operating System Version Information
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")
```
### Kernel state vars
```{r}
kernel_state()
```
### `.DS_Store` example
Using built-in data
```{r}
read_dsstore(
path = system.file("extdat", "DS_Store.ctf", package = "mactheknife")
)
```
### From a URL
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")
```
### A Directory of`.DS_Store`s
A 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)
```
### "Software Update" History
```{r}
software_update_history()
```
### macOS Version Info (short)
```{r}
sw_vers()
```