1 | # nugget
|
2 |
|
3 | minimalist wget clone written in node. HTTP GETs a file and streams it into a file in the current working directory
|
4 |
|
5 | [![NPM](https://nodei.co/npm/nugget.png?global=true)](https://nodei.co/npm/nugget/)
|
6 | ![dat](http://img.shields.io/badge/Development%20sponsored%20by-dat-green.svg?style=flat)
|
7 | [![Travis](http://img.shields.io/travis/maxogden/nugget.svg?style=flat)](https://travis-ci.org/maxogden/nugget)
|
8 |
|
9 | ## installation
|
10 |
|
11 | ```
|
12 | npm install nugget -g
|
13 | ```
|
14 |
|
15 | ## usage
|
16 |
|
17 | ```
|
18 | nugget http://foo.com/bar.jpg
|
19 | # downloads bar.jpg and stores it in the current directory
|
20 | ```
|
21 |
|
22 | or
|
23 |
|
24 | ```
|
25 | nugget http://foo.com/bar.jpg -O baz.jpg
|
26 | # saves it as baz.jpg. you can also do lowercase -o
|
27 | ```
|
28 |
|
29 | if you get a statusCode of 300 or greater nugget will stop. you can force it to stream the response into a file anyway by doing `nugget http://404link.com/file.html -f` or `--force` works too
|
30 |
|
31 | ## options
|
32 |
|
33 | The following options are recognized by nugget:
|
34 |
|
35 | * `-o|-O|--out` - specify the filename to write to.
|
36 | * `-d|--dir` - save files in a directory other than the current one.
|
37 | * `-c|--continue` - resume downloads if a partially complete target file already exists. If the target file exists and is the same size as the remote file, nothing will be done.
|
38 | * `-f|--force` - force the server response to be saved to the target file, even if it's a non-successful status code.
|