Simple torrent creator
Project description
Torrent Creator Version 1.3.0
Torrent Creator is a Python-based CLI tool that allows users to easily create torrent files. It supports both single-file and multi-file torrents, customizable torrent piece sizes, and platform detection (Windows/Linux). This tool also generates magnet URIs based on user preferences and allows users to customize the tracker type for private or public trackers.
Features
- Create Single-File or Multi-File Torrents: Supports creating torrents from individual files or entire directories.
- Platform Detection: Automatically detects the operating system (Windows or Linux) and saves configuration (
.env) in the appropriate location.- Windows:
.envis saved inC:/torrent-creator/.env - Linux:
.envis saved in/home/<username>/torrent-creator/.env
- Windows:
- Customizable Piece Size: Allows selecting a piece size from 256 KB to 16 MB.
- Magnet URL Generation: Optionally generates and displays a magnet URL after the torrent is created.
- Override Configuration via CLI: Allows overriding the default
.envvalues (such as output path, announce URL, piece size, etc.) directly from the command line. - Private or Public Tracker Types: Customizable tracker type with an option to enable/disable DHT, PeX, and LSD based on the tracker type.
- Reconfigure
.envFile: Supports resetting and reconfiguring the.envfile with the--reset-envoption.
Installation
To install the tool, run the following command:
pip install torrent-creator
Alternatively, you can clone the repository and install it locally:
git clone https://github.com/yourusername/torrent-creator.git
cd torrent-creator
python torrent-creator.py
Setup / Configuration
Upon the first run, torrent-creator will prompt you to configure the following settings:
-
TORRENT_OUTPUT_PATH: Path where the .torrent files will be saved.
-
ANNOUNCE_URL: The announce URL for the torrent tracker.
-
PRINT_MAGNET_URL: Whether to print the magnet URI after creation (true or false).
-
PLATFORM: The platform (1 for Windows, 2 for Linux).
-
PIECE_SIZE: The size of each piece in bytes (must be one of the predefined sizes).
-
TRACKER_TYPE: The type of tracker (1 for public, 2 for private).
Usage
[--platform PLATFORM] [--magnet] [--reset-env]
[-set] [-t] [-l] [--tracker-type {1,2}]
[-current-conf] [filename]
positional arguments:
<filename>/directory The file or directory to create a torrent from.
optional arguments:
-h, --help Show this help message and exit.
-p Show current path for .torrent file output.
-a ANNOUNCE, --announce ANNOUNCE
Override announce URL.
-o OUTPUT, --output OUTPUT
Override output directory.
--ps PS, --piece-size PS
Override piece size (bytes).
--platform PLATFORM Override platform (1=Windows, 2=Linux).
--magnet Print magnet URI after creation.
--reset-env Reconfigure the .env file.
-set Set environment variables interactively.
-t, --trackers Show trackers from an existing torrent file.
-l, --list List files in the torrent directory.
--tracker-type {1,2} Set tracker type: 1=Public, 2=Private.
Last Changes
Torrent-creator Version 1.3.0
- Major fix: replaced bencodepy with torf for spec-compliant torrent generation
- Fixed corrupted torrent issues
- Improved hashing and multi-file handling
- Cleaner internal architecture
- Improved reliability and compatibility with torrent clients
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torrent_creator-1.3.0.tar.gz.
File metadata
- Download URL: torrent_creator-1.3.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dc418531d7d7b5679bd38013015712a102b0bf7b3d68a5861316b6efdb1000e
|
|
| MD5 |
80519f7291cee68c95c908818fe49443
|
|
| BLAKE2b-256 |
af4de0327a218a98b6e6fd41ad477f90aec5b80a14114ad20e3cd1aa75456f4d
|
Provenance
The following attestation bundles were made for torrent_creator-1.3.0.tar.gz:
Publisher:
publish.yml on itzrealbeluga/torrent-creator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torrent_creator-1.3.0.tar.gz -
Subject digest:
0dc418531d7d7b5679bd38013015712a102b0bf7b3d68a5861316b6efdb1000e - Sigstore transparency entry: 1331966200
- Sigstore integration time:
-
Permalink:
itzrealbeluga/torrent-creator@da69f1977971fded752ddd729e5e3705c64b5ab7 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/itzrealbeluga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@da69f1977971fded752ddd729e5e3705c64b5ab7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file torrent_creator-1.3.0-py3-none-any.whl.
File metadata
- Download URL: torrent_creator-1.3.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2e15e58f86a4305c391108eaf281ba66ad1b4514555a66a61fbae9627021434
|
|
| MD5 |
c858adf61bd52aec4bed761823b237a6
|
|
| BLAKE2b-256 |
8de983503d7f2f7ae4f8a953f260e9260d3b63af5218e7ab14350093535942c8
|
Provenance
The following attestation bundles were made for torrent_creator-1.3.0-py3-none-any.whl:
Publisher:
publish.yml on itzrealbeluga/torrent-creator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torrent_creator-1.3.0-py3-none-any.whl -
Subject digest:
a2e15e58f86a4305c391108eaf281ba66ad1b4514555a66a61fbae9627021434 - Sigstore transparency entry: 1331966324
- Sigstore integration time:
-
Permalink:
itzrealbeluga/torrent-creator@da69f1977971fded752ddd729e5e3705c64b5ab7 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/itzrealbeluga
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@da69f1977971fded752ddd729e5e3705c64b5ab7 -
Trigger Event:
workflow_dispatch
-
Statement type: