Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrbrmstr/mactheknife
🦈 Various ‘macOS’-oriented Tools and Utilities in R
https://github.com/hrbrmstr/mactheknife
ds-store macos python r r-cyber reticulate rstats
Last synced: 6 days ago
JSON representation
🦈 Various ‘macOS’-oriented Tools and Utilities in R
- Host: GitHub
- URL: https://github.com/hrbrmstr/mactheknife
- Owner: hrbrmstr
- License: other
- Created: 2018-04-29T12:12:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-11T19:56:37.000Z (over 4 years ago)
- Last Synced: 2024-10-12T21:24:02.348Z (22 days ago)
- Topics: ds-store, macos, python, r, r-cyber, reticulate, rstats
- Language: R
- Homepage:
- Size: 75.2 KB
- Stars: 38
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{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()
```## NOTE
- Uses `reticulate` so a working Python *3* implementation is needed. Consider setting `RETICULATE_PYTHON` to a valid, working Python 3 installation if this package is not working for you.
## 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 use, message=FALSE, warning=FALSE, error=FALSE}
library(mactheknife)# current verison
packageVersion("mactheknife")```
### `mdls` info
```{r mdls}
res <- mdls(list.files(here::here("R"), full.names = TRUE))res
dplyr::glimpse(res)
```### Kernel state vars
```{r ks}
kernel_state()
```### `.DS_Store` example
Using built-in data
```{r ds1}
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 ds2}
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 ds-dir, cache = FALSE}
library(magrittr)list.files(
path = "~/projects", pattern = "\\.DS_Store",
all.files = TRUE, recursive = TRUE, full.names = TRUE
) %>%
lapply(read_dsstore) -> xstr(x)
```### "Software Update" History
```{r suh}
software_update_history()
```### macOS Version Info (short)
```{r swv}
sw_vers()
```### Applescript
```{r applescript}
res <- applescript('
tell application "Music"
set r_name to name of current track
set r_artist to artist of current track
end
return "artist=" & r_artist & "\ntrack=" & r_name
')print(res)
```### App info
```{r app}
check_sig("/Applications/RSwitch.app") %>%
print(n=nrow(.))check_notarization("/Applications/RSwitch.app")
```## mactheknife 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.