Movatterモバイル変換


[0]ホーム

URL:


binman

CRAN versionR-CMD-checkcodecov

Tools and functions for managing the download of binary files. Binaryrepositories are defined in YAML format. Defining new pre-download,download and post-download templates allow additional repositories to beadded.

Installation

You can installbinman from GitHub with:

# install.packages("remotes")remotes::install_github("ropensci/binman")

Usage Examples

GitHub Assets

The following is an example of usingbinman to get theGitHub assets from a project. The project ishttps://github.com/lightbody/browsermob-proxy/releases . When a newversion is released a zipped binary is added as an “asset”. A JSONrepresentation of the project releases is available athttps://api.github.com/repos/lightbody/browsermob-proxy/releases.binman needs a YAML file to specify how to parse thisprojects assets:

name: binman-bmproxypredlfunction:"binman::predl_github_assets":url: https://api.github.com/repos/lightbody/browsermob-proxy/releasesplatform:- generichistory:3appname:"binman_bmproxy"platformregex: browsermob-proxydlfunction:"binman::download_files":[]postdlfunction:"binman::unziptar_dlfiles":[]

The file can be accessed at:

ymlfile<-system.file("examples","yaml","bmproxy.yml",package ="binman")

Downloading the three most recent releases can the be done using:

process_yaml(ymlfile)

with resulting directory structure (We omit files for brevity):

LINUX

john@ubuntu:~$ tree-d /home/john/.local/share/binman_bmproxy/home/john/.local/share/binman_bmproxy└── generic├── browsermob-proxy-2.1.0│   └── browsermob-proxy-2.1.0│       ├── bin│       │   └── conf│       ├── lib│       └── ssl-support├── browsermob-proxy-2.1.1│   └── browsermob-proxy-2.1.1│       ├── bin│       │   └── conf│       ├── lib│       └── ssl-support└── browsermob-proxy-2.1.2└── browsermob-proxy-2.1.2├── bin│   └── conf├── lib└── ssl-support19 directories

WINDOWS

C:\Users\john>tree C:\Users\john\AppData\Local\binman\binman_bmproxyFolder PATH listingVolume serial number is 7CC8-BD03C:\USERS\JOHN\APPDATA\LOCAL\BINMAN\BINMAN_BMPROXY└───generic    ├───browsermob-proxy-2.1.0    │   └───browsermob-proxy-2.1.0    │       ├───bin    │       │   └───conf    │       ├───lib    │       └───ssl-support    ├───browsermob-proxy-2.1.1    │   └───browsermob-proxy-2.1.1    │       ├───bin    │       │   └───conf    │       ├───lib    │       └───ssl-support    └───browsermob-proxy-2.1.2        └───browsermob-proxy-2.1.2            ├───bin            │   └───conf            ├───lib            └───ssl-support

MACOSX

DE529:~ admin$ tree-d /Users/admin/Library/Application\ Support/binman_bmproxy/Users/admin/Library/Application\ Support/binman_bmproxy└── generic├── browsermob-proxy-2.1.0│   └── browsermob-proxy-2.1.0│       ├── bin│       │   └── conf│       ├── lib│       └── ssl-support├── browsermob-proxy-2.1.1│   └── browsermob-proxy-2.1.1│       ├── bin│       │   └── conf│       ├── lib│       └── ssl-support└── browsermob-proxy-2.1.2└── browsermob-proxy-2.1.2├── bin│   └── conf├── lib└── ssl-support19 directories

[8]ページ先頭

©2009-2025 Movatter.jp