CLI¶
The CLI can be called as torrent-models, torrent, or tm :’).
Note
You must install the optional cli dependencies with torrent-models[cli]
tm¶
torrent-models CLI
tm [OPTIONS] COMMAND [ARGS]...
make¶
tm make [OPTIONS]
Options
- -p, --path <path>¶
Required Path to a directory or file to create .torrent from
- -t, --tracker <tracker>¶
Trackers to add to the torrent. can be used multiple times for multiple trackers.
- -s, --piece-size <piece_size>¶
Piece size, in bytes
- Default:
524288
- --comment <comment>¶
Optional comment field for torrent
- --creator <creator>¶
Optional creator field for torrent
- Default:
'torrent-models (0.3.4.dev10+gf0da03c)'
- -w, --webseed <webseed>¶
Add HTTP webseeds as additional sources for torrent. Can be used multiple times. See https://www.bittorrent.org/beps/bep_0019.html
- --similar <similar>¶
Add infohash of a similar torrent. Similar torrents are torrents who have files in common with this torrent, clients are able to reuse files from the other torrents if they already have them downloaded.
- --version <version>¶
What kind of torrent to create, default is hybrid
- Options:
v1 | v2 | hybrid
- --progress, --no-progress¶
Enable progress bar (default True)
- -o, --output <output>¶
.torrent file to write to. Otherwise to stdout
- -n, --n-cpus <n_cpus>¶
Number of CPUs to use for parallel processing.
- Default:
1
print¶
Print the contents of a torrent file.
By default, prints only the top-level metadata in a way that should always be smaller than one screen.
Increase verbosity to show more of the torrent.
Hashes are printed as hexadecimal numbers and split into individual pieces, but they are properly encoded in the torrent.
tm print [OPTIONS] TORRENT
Options
- -v, --verbose¶
Verbose output, repeat for increasing verbosity
-v show files in separate table -vv show truncated v1 piece hashes -vvv show everything as-is
Arguments
- TORRENT¶
Required argument