Giter Site home page Giter Site logo

flashget's Introduction

FlashGet

Parallel download module & command line tool ( largesize file supported )

FlashGet use http/https module to redirect source url and split file fragment when parallel threads download. fs.writeStream was very smooth running on SolidStateDrive, but if on your iot device, u really need to set low currency.

NPM version License npm node

In other one package, continue transfering from break point was supported, see

https://www.npmjs.com/package/fetchsource

Executive file published on

https://github.com/chenxianming/flashget/releases

How to use?

Command line tool

npm i flashget -g

flashget url -c currency threads option -c parallel threads, if your server is hhd, recommended set 2 threads.

flashget -c 20 http://www.mirrorservice.org/sites/releases.ubuntu.com/18.04.3/ubuntu-18.04.3-desktop-amd64.iso

Or u can ignored c param, default is 3

flashget http://www.mirrorservice.org/sites/releases.ubuntu.com/18.04.3/ubuntu-18.04.3-desktop-amd64.iso

downloading( 3%) ⸨=-------------------⸩ 6060kb/s [1000/2000]

Node module

Import flashget to your project, very easy.

npm i flashget
const Downloader = require('flashget');

let task = new Downloader({
    url: 'http://www.mirrorservice.org/sites/releases.ubuntu.com/18.04.3/ubuntu-18.04.3-desktop-amd64.iso',
    currency: 5, // default is 3
    output: './ubuntu-18.04.3-desktop-amd64.iso'
});

task.on('error', (err) => {
    console.log(err);
});

task.on('end', (path) => {
    console.log(`your file download here ${ path }`);
});

task.on('progress', (pro, speed) => {
    console.log('progress', pro);
    console.log('speed', speed + ' kb/s');
});

task.begin();

On chain called

new Downloader({
    url: 'http://www.mirrorservice.org/sites/releases.ubuntu.com/18.04.3/ubuntu-18.04.3-desktop-amd64.iso', // url
    currency: 5, // parallel thread
    output: './ubuntu-18.04.3-desktop-amd64.iso' // save as
})
.on('error', (err) => console.log(err) )
.on('end', (exportname) => console.log(`your file download here ${ exportname }`))
.on('progress', (progress) => console.log( progress ) )
.begin();

Test

npm run test

flashget's People

Contributors

chenxianming avatar c-xm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.