Create Bittorent v1, v2 and hybrid meta files.
Project description
TorrentFile
🌐 Overview
A simple
and convenient
tool for creating, reviewing, editing, and/or
checking bittorrent meta files (aka torrent files). torrentfile
supports all versions of Bittorrent files, including hybrid meta files.
A GUI frontend for this project can be found at https://github.com/alexpdev/TorrentfileQt
🔌 Requirements
- Python 3.7+
- Tested on Linux and Windows
💻 Install
via PyPi:
pip install torrentfile
via Git:
git clone https://github.com/alexpdev/torrentfile.git
cd torrentfile
python setup.py install
Download pre-compiled binaries from the release page.
📚 Documentation
Documentation can be found here
or in the docs
directory.
torrentfile is under active development, and is subject to significant changes in
it's codebase between releases.
🚀 Usage
torrentfile [-h] [-i] [-V] [-v] ...
Sub-Commands:
create Create a new torrent file.
check Check if file/folder contents match a torrent file.
edit Edit a pre-existing torrent file.
magnet Create Magnet URI for an existing torrent meta file.
optional arguments:
-h, --help show this help message and exit
-V, --version show program version and exit
-i, --interactive select program options interactively
-v, --verbose output debug information
Usage examples can be found in the project documentation on the examples page.
📝 License
Distributed under the GNU LGPL v3. See LICENSE
for more information.
💡 Issues
If you encounter any bugs or would like to request a new feature please open a new issue.
https://github.com/alexpdev/torrentfile/issues
⚙️ CLI Usage Examples
More examples can be found in the documentation.
Creating Torrents
Using the sub-command create
or c
TorrentFile can create a new torrent
from the contents of a file or directory path. The following examples illustrate
some of the options available for creating torrents (AKA meta files).
- Create a torrent from any file or directory. example (
/path/to/content
) - by default the save path will be the content path with a ".torrent" extension. (
/path/to/content.torrent
) - by default torrents are created using bittorrent meta-version 1
torrentfile create /path/to/content
- The
-t
or--tracker
flag adds one or more urls to tracker list. - This flag will cause an error if the content path immediately follows it.
do this
torrentfile create /path/to/content --tracker http://tracker1.com
or this
torrentfile create -t http://tracker2 http://tracker3 --private /path/to/content
not this
torrentfile create --tracker http://tracker /path/to/content #ERROR
torrentfile create -t http://tracker1 http://tracker2 /path/to/content #ERROR
- the
--private
flag indicates use by a private tracker - the
--source
flag can be used to help with cross-seeding
torrentfile create --private --source /path/to/content --tracker https://tracker/url
- to turn off the progress bar shown use
--noprogress
- this can improve the performance by a very small amount
torrentfile -t http://tracker.com --noprogress
- to specify the save location use the
-o
or--out
flags
torrentfile create -o /specific/path/name.torrent ./content
- to create files using bittorrent v2 use
--meta-version 2
- likewise
--meta-version 3
creates a hybrid torrent file.
torrentfile create --meta-version 2 /path/to/content
torrentfile create --meta-version 3 /path/to/content
- to output a magnet URI for the created torrent file use
--magnet
torrentfile create --t https://tracker1/annc https://tracker2/annc --magnet /path/to/content
Check/Recheck Torrent
Using the sub-command recheck
or check
or r
you can check the percentage of a torrent
is saved to disk by comparing the the contents to a torrent metafile.
- recheck torrent file
/path/to/some.torrent
with/path/to/content
- enter the metafile path first then the content path (the order matters)
torrentfile recheck /path/to/some.torrent /path/to/content
Edit Torrent
Using the sub-command edit
or e
enables editting a pre-existing torrent file.
The edit sub-command works the same as the create
sub-command and accepts many
of the same arguments.
Create Magnet
To create a magnet URI for a pre-existing torrent meta file, use the sub-command
magnet
or m
with the path to the torrent file.
torrentfile magnet /path/to/some.torrent
Interactive Mode
Alternatively to supplying a bunch of command line arguments, interactive mode
allows users to specify program options one at a time from a series of prompts.
- to activate interactive mode use
-i
or--interactive
flag
torrentfile -i
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for torrentfile-0.6.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a9bcd2a8641b4acdce7bb59c50cfab43a3b88771a3c5fa1a4ced54299fb3668 |
|
MD5 | 76188b2fc900039203e90da51a48ec69 |
|
BLAKE2b-256 | b04e10dccf18e025c6a3aeebeb09908276a49e003d39fd22ab2017bb5424771c |