Technocrank

Icon

It Done Broke.

Downloads


Bittorrent Quick Look Generator

For Mac OSX 10.6+ only, this Quick Look generator displays the contents of a metainfo “.torrent” file.  Useful if you ever have to sort through torrent files that are named by 10 year old children, but don’t feel like firing up your client just to see what’s in it.  Tested up to OSX 10.9.

Download QLTorrent-1.3.dmg (MD5: e0a4e9eca9d636f7451a859ea1a6cdf5)

Instructions:

  1. Run the package installer.  It should place the generator file inside your ~/Library/QuickLook folder.
  2. You may need to give the QuickLook server a little kick if it doesn’t pick up the change for some reason.  In Terminal, type “qlmanage -r”.  You may need to sudo or do it from an account with administrative permissions.
  3. If you have a BT client application that provides its own generator (e.g. Transmission, uTorrent), you may need to disable it if you want to use this one. Delete or rename
    /Applications/<client_app>/Contents/Library/QuickLook and do Step 2 above again.

Customization Notes:

If you want to customize the look of the output you can now!  It’s just HTML, CSS and templated using Mustache (http://mustache.github.io/).  Go to ~/Library/QuickLook/QLTorrent.qlgenerator, Show Package Contents and dig into Contents/Resources.  The *.mustache files in there are responsible for the output.

I’d start with playing with qltorrent.css.mustache first.  If you decide to alter the HTML and Mustache tags, be forewarned: my code doesn’t do much error handling right yet and crashes with little dignity.  I hope to fix that when my kids get older.

Changes:

1.3 (11 October 2013)

  • re-built for OSX 10.6 target, SDK 10.8
  • replace BEncoding library with Glass Echinda BEncoding
  • added human readable file size B/KB/MB/GB
  • introduced GRMustache library to handle HTML templating – HTML and CSS are now separated from functional code
  • refactored like crazy (QLTorrent now addresses QuickLook concerns only and Torrent class is abstracted out)

1.2 (2 December 2009)

  • re-built as Universal binary

1.1 (1 November 2009)

  • fixed 32-bit limit on total length calculation

1.0 (17 June 2009)

This code owes many thanks to:


For more Quick Look generators, see www.quicklookplugins.com and www.qlplugins.com.