mathr / blog / #

buildtorrent: a createtorrent replacement

I was looking for a simple command line torrent file making program, and createtorrent seemed just the ticket, except that it didn't work (namely, the directory support was broken completely in every version I tried). So I decided to write my own. Hence buildtorrent.

Features are somewhat limited so far, and I haven't done any testing beyond checking that the torrent files created by buildtorrent load correctly in ktorrent with the files on disk passing the piece hash checks, but it seems to work satisfactorily.

Here's what it can do:

  • Create a torrent from a directory.
  • Can choose the tracker announce url.
  • Can choose the piece size.
  • Written in ANSI C without requiring any special libraries.

Here's what still needs to be added or fixed:

  • Create a torrent from a single file.
  • Adding more metadata to the torrent (user comment, creation date, etc).
  • There are two warnings during compilation.
  • More testing.
  • Better error reporting.
  • Become valgrind-pure.
  • Add large-file (and large-torrent) support.
  • Check 64bit support, check big endian systems.
  • More thorough documentation.

Here's where you can get the current development version (no release versions yet):

  • svn checkout buildtorrent

Code based almost entirely on the BitTorrent Metainfo Specification, with some ideas from createtorrent (but not many).