ashish makani
ashish makani

Reputation: 153

Creating a torrent file & associated tracker through a django web app

Following is a description of what i am trying to achieve :

The user should log into a web app, select a file & the web app should generate a .torrent file & a private tracker(http://IP_ADDRESS:PORT_NUMBER/announce) for that .torrent file.

Basically, I want to programmatically create a .torrent file, on the server side.

I found two libraries mktorrent & py3createtorrent, but I need help with how to create a torrent from a Django web app.

Any suggestions for Django modules or libraries which can do this ?

Any suggestions/pointers/ideas/links will be greatly appreciated

Upvotes: 1

Views: 1737

Answers (1)

jpic
jpic

Reputation: 33410

Install mktorrent with and run mktorrent -h:

mktorrent 1.0 (c) 2007, 2009 Emil Renner Berthing

Usage: mktorrent [OPTIONS] <target directory or filename>

Options:
-a, --announce=<url>[,<url>]* : specify the full announce URLs
                                at least one is required
                                additional -a adds backup trackers
-c, --comment=<comment>       : add a comment to the metainfo
-d, --no-date                 : don't write the creation date
-h, --help                    : show this help screen
-l, --piece-length=<n>        : set the piece length to 2^n bytes,
                                default is 18, that is 2^18 = 256kb
-n, --name=<name>             : set the name of the torrent
                                default is the basename of the target
-o, --output=<filename>       : set the path and filename of the created file
                                default is <name>.torrent
-p, --private                 : set the private flag
-t, --threads=<n>             : use <n> threads for calculating hashes
                                default is 2
-v, --verbose                 : be verbose
-w, --web-seed=<url>[,<url>]* : add web seed URLs
                                additional -w adds more URLs

Please send bug reports, patches, feature requests, praise and
general gossip about the program to: [email protected]

Upvotes: 0

Related Questions