torrentinfo

Languages
Python 2.3+
Version
1.0.2

TorrentInfo is a simple command-line tool that parses .torrent files and provides a summary of their contents. By default it shows:

  • The torrent's name
  • The URL of the tracker
  • The torrent's creator
  • The creation date of the torrent
  • The number of files in the torrent (if multi-file)
  • The name of the file (if single-file)
  • The size of the torrent's contents

Additionally the path and size of the files in the torrent can be listed and the .torrent's contents can simply be dumped as a hierachy.


Usage

torrentinfo [ -h -n ] filename1 [ ... filenameN ]

    -h --help      Displays this message
    -b --basic     Shows basic file information (default)
    -f --files     Shows files within the torrent
    -d --dump      Dumps the whole file hierarchy
    -n --nocolour  No ANSI colour

For example, calling TorrentInfo on a simple multi-file torrent gives the following output:

$ torrentinfo Solaris_10.torrent
Solaris_10.torrent
    name           Solaris_10_x86
    tracker url
    http://tracker.prq.to/announce
    created by     BitTorrent/6030
    created on     2008/04/04 02:46:04 GMT
    num files  
    7
    total size     4.2GB

To see more information on the individual files within the torrent the files switch should be used:

$ torrentinfo -f Solaris_10.torrent
Solaris_10.torrent
    name           Solaris_10_x86
    tracker url
    http://tracker.prq.to/announce
    created by     BitTorrent/6030
    created on     2008/04/04 02:46:04 GMT
    files
    
        0
            sol-10-u4-ga-x86-v4.iso
            639.7MB
        1

            sol-10-u4-ga-x86-v1.iso
            421.3MB
        2

            sol-10-u4-ga-x86-v2.iso
            459.7MB
        3

            sol-10-u4-ga-x86-v3.iso
            301.3MB
        4

            Solaris-10-u4-documentation-dvd.iso
            397.9MB
        5

            sol-10-u4-ga-x86-v5.iso
            578.8MB
        6

            Solaris-10-u4-companion.iso
            1.4GB


Install

TorrentInfo uses the standard Python distribution utilities. So it should just be a case of uncompressing the archive and running:

./setup.py install

Obviously the user running this must have sufficient permissions to create a file in the install directory.

Recent News

Version 1.0.2 released (2009-01-01 16:02:23 vrai)
Very simple bug fix: now the default behaviour (i.e. displaying a brief summary of the torrent's contents) is the same regardless of whether colour output has been disabled or not. Previously disabling colour output would stop the summary being displayed by default, instead only the torrent's filename would be shown.
Version 1.0.1 released (2008-09-25 18:58:31 vrai)

A minor bug fix release, primarily to allow the code to run on Windows. Prior to this change, examining a torrent on a Windows machine would result in a buffer overflow error as the file would have been treated as ASCII rather than binary. Now the torrent files are explicitly opened as binary on all platforms.

The hash/bang line at the top of the script has also been altered, such that it will now use whatever Python interpreter is in your environment; rather than insisting on one being present in /usr/bin. This was causing problems with OS X where the default Python installation is in /usr/local/bin.

Project uploaded (2005-02-20 17:20:51 vrai)
After extensive (-ish) testing TorrentInfo is now ready for use.

Project Files

Click on the file name to download the file. Some browsers may require you to right-click on the file and select "Save Link As".
Version File Description MD5
1.0.2 torrentinfo-1.0.2.tar.bz2 Fixed default behaviour bug. 023c9c3cf7586ef10310b645db2794a5
1.0.2 torrentinfo-1.0.2.tar.gz Fixed default behaviour bug. 0ab4400f43a9509cb858d07917603cda
1.0.1 torrentinfo-1.0.1.tar.bz2 Fixed Windows file loading bug. 89c49aef71e312491646209e38ee4001
1.0.1 torrentinfo-1.0.1.tar.gz Fixed Windows file loading bug. d2ef2ee9b03c179e2231c19c49cbb03e
1.0.0 torrentinfo-1.0.0.tar.bz2 Initial release. 807753a29efa41b1997a85f40a778ba1
1.0.0 torrentinfo-1.0.0.tar.gz Initial release. eff0823e47c5a3d8e8d35ef5464487d5

Navigation

Software Projects


Assorted Scripts - things that don't warrant a whole project but might be useful to someone.

Site hosted by Linode: using Apache, PHP, MySQL and Propel.

Site created using Eclipse PDT and OS X.

Site design and original content Copyright © Vrai Stacey. Unless otherwise stated, source code contained on this site is published under the GNU Public License (GPL).

Valid XHTML PHP Powered No Software Patents