A Binary Download Manager
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Update docs Jan 13, 2017
docs Fix appveyor badge Jul 18, 2018
inst Update vignette Dec 10, 2016
man Update roxygen to 6.0.1 Jul 17, 2018
tests Remove mocking in tests Jul 17, 2018
vignettes Update vignette Dec 10, 2016
.Rbuildignore Fix tests Nov 22, 2016
.gitignore Update NEWS bump VERSION Dec 10, 2016
.travis.yml Remove github pkg install Jul 17, 2018
DESCRIPTION Update roxygen to 6.0.1 Jul 17, 2018
LICENSE Update LICENSE, bump version Dec 11, 2016
NAMESPACE Add functions from semver Jan 13, 2017
NEWS.md Fixed tests for CRAN re-submission Jul 17, 2018
README.md Fix appveyor badge Jul 18, 2018
appveyor.yml Add appveyor CI Nov 22, 2016
binman.Rproj Rename Rproj Jul 17, 2018

README.md

binman

CRAN version Travis build status Appveyor build status Coverage
CRAN version Build Status AppVeyor Build Status codecov

Tools and functions for managing the download of binary files. Binary repositories are defined in YAML format. Defining new pre-download, download and post-download templates allow additonal repositories to be added.

Installation

You can install binman from github with:

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

Usage Examples

Github Assets

The following is an example of using binman to get the github assets from a project. The project is https://github.com/lightbody/browsermob-proxy/releases . When a new version is released a zipped binary is added as an "asset". A JSON representation of the project releases is available at https://api.github.com/repos/lightbody/browsermob-proxy/releases. binman needs a YAML file to specify how to parse this projects assets:

name: binman-bmproxy
predlfunction:
  "binman::predl_github_assets":
    url: https://api.github.com/repos/lightbody/browsermob-proxy/releases
    platform:
    - generic
    history: 3
    appname: "binman_bmproxy"
    platformregex: browsermob-proxy
dlfunction:
  "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-support

19 directories

WINDOWS

C:\Users\john>tree C:\Users\john\AppData\Local\binman\binman_bmproxy
Folder PATH listing
Volume serial number is 7CC8-BD03
C:\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-support
19 directories