QuickLook plug-in for zip files

To get used to the QuickLook plug-in architecture I did what everyone seems to be doing. Namely write a zip inspection module. The mysterious and prolific Hetima has already created one which is available here.

So anyway my plugin uses Hetima’s unzip framework to inspect the contents of any given zip/cbz, ignoring everything but images, sorts those images by name and draws the first to the thumbnail context. Nice and simple. The preview code is almost as simple except it iterates through up to 20 image and creates a multi page preview.

One caveat with this implementation is that the image name sorting slows down thumbnail generation noticeably. If that annoys you feel free to tweak it. I might even add some prefs that can be changed via the command line in the next version.

Download the source code.

Edit:I did a quick edit to my QuickLook plug-in to make it work with cbz files exclusively.  This should prevent conflicts with other zip QuickLook plug-ins.Download

Comments (7)

  1. Alec Peden wrote::

    I would love to see this plugin actively developed and add support for CBR files. This is one of those dream pieces of software I know I won’t be able to live without. Thanks!

    Thursday, November 22, 2007 at 1:12 am #
  2. arau wrote::

    Simple Comic is going Leopard only for 1.7. With that release I will also be bundling a rar and zip quick look plugin.

    Thursday, November 22, 2007 at 4:43 pm #
  3. Stef wrote::

    Would it be possible to make the quick look plugin work with cbz/cbr files only or add this option?

    I just moved to osx and I really like your tool :-)

    Saturday, November 24, 2007 at 1:10 am #
  4. arau wrote::

    I think that I will make it work with cbz/cbr files by default, I agree that having it generate thumbnails for ordinary zips is annoying.

    Saturday, November 24, 2007 at 8:16 am #
  5. Almir wrote::

    Well, just to enter the discussion: Why *not* generate a preview of image files in zips? I think most people tuck lots of images in archives, being capable quicklooking just hitting space bar is a bless! I came from the PC universe and still remember Picaview in the early days of win98 that just did that. The original implementation of Quickcomic (0.1) even generates a preview icon in the Finder, amazing!

    Monday, December 10, 2007 at 9:18 am #
  6. arau wrote::

    @almir
    The reason I am making the plug-in cbz/cbr only is mainly due to the fact that there are other better Quick Look plug-ins out there supporting zip/rar archives. I do not want my module to conflict with others.

    Monday, December 10, 2007 at 12:55 pm #
  7. Almir wrote::

    @arau
    You´re right man, I´s just wishing for the whole shebang, i.e.: cbz/cbr/zip/rar etc quicklook + image preview… greedy, isn´t it? ;)
    For now I´m using Betterzip´s archive plugin and yours excellent Simple Comic 1.7 under Leopard for previewing image contents in zip files, it rocks!

    Tuesday, December 11, 2007 at 11:29 am #