HTTPS SSH

Multi-get

A small command-line program to download a number of chunks from an online file using the HTTP Range Header.

Usage

To download a file using defaults:

src/index.js -u http://6f57d476.bwtest-aws.pravala.com/384MB.jar

To download a file using all available options:

src/index.js -u http://6f57d476.bwtest-aws.pravala.com/384MB.jar -c 4 -o foo.jar -s 1048576 -l 2

To see help options:

src/index.js --help

To run in debug mode:

DEBUG=get* src/index.js -u http://6f57d476.bwtest-aws.pravala.com/384MB.jar

To run linting and tests:

yarn run lint && yarn run test

Or:

yarn run watch

Linting and tests also run in the git pre-commit hook.


Improvements:

  • Use pkg to create executable(s)
  • Add ability to set a folder in output option
  • Implement a different chunk download rate limiter to have proper final promise resolution (the Async promise lib resolves after the first limit group of requests have finished, i.e. not when all have finally finished)
  • Add a retry option to do additional request attempts for select download errors (up to a set number of attempts)
  • Add more tests to test actual command line usage instead of just functions