<commit_before>tget
====

Command-line torrent downloader and HTTP streaming server

`npm install -g tget`

## Usage

`tget <path|url|magnet> [options]`

### Example

`tget "magnet:?xt=urn:btih:757fc565c56462b28b4f..." -s 9000`

### Options

|  Option    |  Description                          |  Default      |
|------------|---------------------------------------|---------------|
|  -b PATH   |  Buffer path                          |  md5(source)  |
|  -c NUM    |  Maximum connections                  |  100          |
|  -d NUM    |  Number of DHT peers to find          |  10000        |
|  -e        |  Ephemeral mode                       |               |
|  -i        |  Stay idle and don't quit when done   |               |
|  -n        |  Force a new download                 |               |
|  -p PEER   |  Explicit peer (in the form addr:ip)  |               |
|  -s PORT?  |  Enable live streaming on port N      |  8888         |
|  -t        |  Disable trackers                     |               |
|  -w        |  Wait for client before downloading   |               |

### Buffer directory / Ephemeral mode

The buffer directory is defined by the `-b` option. If not specified,
the path is automatically generated from the download source.

Two identical invocation of tget will generate the same buffer id.
This allows tget to resume a previously canceled download unless the
`-n` option is given.

This buffer is used to store downloaded data and the .torrent file
if the source was a magnet link. Buffer structure reflects torrent
pieces structure and is not representative of files contained within
it.

When download is complete (or if the `-e` option is given), tget will
delete this directory before exiting.

### Video streaming

When downloading a video torrent, tget can stream it to your favorite
media player as soon as its pieces are received.

Passing the `-s` option (with an optional port number) enables the
streaming feature.

Then, simply open `http://127.0.0.1:<port>/<file_id>` in your media player.<commit_msg>Cleaner option table<commit_after>tget
====

Command-line torrent downloader and HTTP streaming server

`npm install -g tget`

## Usage

`tget <path|url|magnet> [options]`

### Example

`tget "magnet:?xt=urn:btih:757fc565c56462b28b4f..." -s 9000`

### Options

|  Option      |  Description                          |  Default      |
|--------------|---------------------------------------|---------------|
|  `-b PATH`   |  Buffer path                          |  md5(source)  |
|  `-c NUM`    |  Maximum connections                  |  100          |
|  `-d NUM`    |  Number of DHT peers to find          |  10000        |
|  `-e`        |  Ephemeral mode                       |               |
|  `-i`        |  Stay idle and don't quit when done   |               |
|  `-n`        |  Force a new download                 |               |
|  `-p PEER`   |  Explicit peer (in the form addr:ip)  |               |
|  `-s PORT?`  |  Enable live streaming on port N      |  8888         |
|  `-t`        |  Disable trackers                     |               |
|  `-w`        |  Wait for client before downloading   |               |

### Buffer directory / Ephemeral mode

The buffer directory is defined by the `-b` option. If not specified,
the path is automatically generated from the download source.

Two identical invocation of tget will generate the same buffer id.
This allows tget to resume a previously canceled download unless the
`-n` option is given.

This buffer is used to store downloaded data and the .torrent file
if the source was a magnet link. Buffer structure reflects torrent
pieces structure and is not representative of files contained within
it.

When download is complete (or if the `-e` option is given), tget will
delete this directory before exiting.

### Video streaming

When downloading a video torrent, tget can stream it to your favorite
media player as soon as its pieces are received.

Passing the `-s` option (with an optional port number) enables the
streaming feature.

Then, simply open `http://127.0.0.1:<port>/<file_id>` in your media player.
{'fraction_non_alphanumeric': 0.11285266457680251, 'fraction_numerical': 0.017844224740776463, 'mean_word_length': 1.7932659932659933, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1901776', 'n_tokens_mistral': 1209, 'n_tokens_neox': 1114, 'n_words': 467}