Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@etclabscore/dl-github-releases

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@etclabscore/dl-github-releases

<center> <img alt="Dependabot status" src="https://api.dependabot.com/badges/status?host=github&repo=etclabscore/dl

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
decreased by-21.43%
Maintainers
4
Weekly downloads
 
Created
Source

DL Github Releases

CircleCI branch Dependabot status npm GitHub release GitHub commits since latest release

A node module to download Github assets for Github releases. It will also uncompress zip files.

Command line

$ npm install -g @etclabscore/dl-github-releases


$ dl-github-releases --help

Usage: download-github-releases [options] <user> <repo>

Options:
  -V, --version                      output the version number
  -o, --outputDir [output]           output directory [output] (default: "/Users/zb/Code/etclabs/dl-github-releases")
  -p, --includePre                   download prerelease
  -d, --includeDraft                 download draft releases
  -a, --filterAssetsByName <rexexp>  filter assets name
  -z, --zipped                       don't extract zip files
  -h, --help                         output usage information
Usage: download-github-release [options] <user> <repo> [outputdir]

Options:

  -h, --help             output usage information
  -V, --version          output the version number
  -p, --prerelease       download prerelease
  -s, --search <regexp>  filter assets name


$ dl-github-releases -a *.md open-rpc spec

Downloading open-rpc/spec@1.0.0...
spec.md                  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 0.0s
spec.pdf                 ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇--------- 0.1s

Javascript API

Installation

npm install --save dl-github-releases

Usage

var downloadReleases = require('dl-github-releases');

var user = 'some user';
var repo = 'some repo';
var outputdir = 'some output directory';

// Define a function to filter releases.
function filterRelease(release) {
  // Filter out prereleases.
  return release.prerelease === false;
}

// Define a function to filter assets.
function filterAsset(asset) {
  // Select assets that contain the string 'windows'.
  return asset.name.indexOf('windows') >= 0;
}

downloadReleases(user, repo, outputdir, filterRelease, filterAsset)
  .then(function() {
    console.log('All done!');
  })
  .catch(function(err) {
    console.error(err.message);
  });

Keywords

FAQs

Package last updated on 30 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc