rsnitsch / py3createtorrent Goto Github PK
View Code? Open in Web Editor NEWCreate torrents via command line!
License: Other
Create torrents via command line!
License: Other
How do I create one?
It’s a requirement of some site which modifies created .torrent later by own means.
Your tool is great but it's really lacking this
This filename causes a crash, I renamed the file but still wanted to report:
'Chemie (1983)(Gerd K'$'\366''nig).sna'
Traceback (most recent call last):
File "/usr/local/bin/py3createtorrent", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/py3createtorrent.py", line 913, in main
info = create_multi_file_info(input_path, torrent_files, piece_length, args.include_md5, threads=args.threads)
File "/usr/local/lib/python3.9/dist-packages/py3createtorrent.py", line 255, in create_multi_file_info
printv("Processing file '%s'... " % os.path.relpath(path, directory), end="")
File "/usr/local/lib/python3.9/dist-packages/py3createtorrent.py", line 125, in printv
print(*args, **kwargs)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf6' in position 106: surrogates not allowed
The docs (https://github.com/rsnitsch/py3createtorrent) say there is a small config "at the top" but it doesn't say where to find this file.
Installed via pip on linux.
I cannot create some torrent that have too long path in directory. Is it about with MAX_PATH?
I tried to enable long path registry with this link but it can't solved.
PS: I'm currently using it in Windows 10, I don't know about this problem in Linux.
Running py3createtorrent
results in immediate SyntaxError
.
‣ py3createtorrent
Traceback (most recent call last):
File "/usr/local/bin/py3createtorrent", line 5, in <module>
from py3createtorrent import main
File "/usr/local/lib/python3.5/dist-packages/py3createtorrent.py", line 339
parts: List[str] = []
^
SyntaxError: invalid syntax
Using python 3.5.3, py3createtorrent
version 1.0.0.dev2. Installed using python -m pip install py3createtorrent
.
I am trying to get the program to use the name of the file as the name it will show in the torrent but the torrent is not created.
using a bat file
the torrent is not created if the name contains parentheses
-n "%~nx1" %*
I have reviewed the usage documentation and it seems that there is no mention of support for this feature.
Could u plz support this feature (Based on BEP-47) when creating v1 torrent?
cuz torrents containing multi files often get stuck at 99.x% when download, if not piece-aligned when creating.
thanks.
Padding files and extended file attributes.
https://www.bittorrent.org/beps/bep_0047.html
Padding files are synthetic files inserted into the file list to let the following file start at a piece boundary. That means their length should fill up the remainder of the piece length of the file that is supposed to be padded.
Related Information:
See: https://blog.libtorrent.org/2020/09/bittorrent-v2/
v2 moves to SHA-256 hashes. It is possible to create hybrid torrents that support v1 and v2 swarms at the same time.
SHA-1 chosen-prefix attacks are now in the USD 10k-100k range.
Reference: pobrn/mktorrent#29 (comment)
Given all of the above, I think there'd be a great benefit to supporting v2-only
, and hybrid
torrent file generation (in addition to the current v1-only
support).
when i execute the command it say
IOError: [Errno 13] Permission denied: 'Flirting (1988) NTSC DVD5.mkv.torrent'
Could not write the torrent file. Check torrent name and your privileges.
on debian.
thanks
Hi, in the code I see there is a reference to no_created_by
but I don't see any CLI option. Are there any plans to add this? Thank you!
py3createtorrent can as of now only be used as a CLI tool but it'd be super useful if it exposed methods to use from other python modules.
Hi author,
Thanks for sharing the great tools! I am using your implementation to prototype torrent seeding for large language models in huggingface. Those files (usually >10GB) will lead to many chunks thus make .torrent file itself very large.
I am considering whether we should increase the piece_length in calculate_piece_length()
, but noticing there is one comment saying
Proceeding:
1. Start with 256 KIB.
2. While piece count > 2000: double piece length.
3. While piece count < 8: use half the piece length.
However, enforce these bounds:
- minimum piece length = 16 KiB.
- maximum piece length = 16 MiB.
I checked the specification and documents for torrent protocal but didn't find the source of 16MiB
. I wonder is this a hard limit?
The software crashes on Python 3.7 and older with the error
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
Documentation and setup.py
should be updated to reflect the actual version requirement.
When I want to use the -e option to exclude specific file types like rar, r00, r01, r02,... r99, etc.
-exclude-pattern '^.*\.r.*$'
But this RegEx is OK with the following command,
ls |grep -E '^.*\.r.*$'
So I am wondering if py3createtorrent only support RegEx formats in your examples, like "(jpg|JPG)$" only?
IDK why you made the "develop" branch the default, but that's not really good.
It's confusing to have a "master" branch, but it not being the master branch.
I suggest you make a PR to merge all the stuff from develop into master, and then change the default back to master. For the sake of following the standard and not confusing people.
I would do it myself, but to make a PR for two branches of your repo, I would need to be a collaborator.
@SMooxx reported in #10 that creating a torrent for a directory referenced via "." results in faulty torrent names.
Original report:
Another issue here. I used to use mktorrent which can support ‘relative path'.
But it seems py3createtorrent can't support 'relative path' here. For example, If I use it like this,
py3createtorrent -v -p 8192 -P -s FL -o ~/example.torrent -d -1 -t https://tracker/announce.php --exclude-pattern "(^.*\.r.*|sfv)$" ./
It will create a torrent with a wierd name [. ] in its name field, and I can't add this torrent to my torrent client anyway.
If I change the path to full path, the torrent created will be OK.
Link: #10 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.