Navigation | QuickLook plug-in for zip files

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

Filed by arau at November 12th, 2007 under Simple Comic, cocoa

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!

Comment by Alec Peden — November 22, 2007 @ 1:12 am

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

Comment by arau — November 22, 2007 @ 4:43 pm

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 :-)

Comment by Stef — November 24, 2007 @ 1:10 am

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.

Comment by arau — November 24, 2007 @ 8:16 am

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!

Comment by Almir — December 10, 2007 @ 9:18 am

@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.

Comment by arau — December 10, 2007 @ 12:55 pm

@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!

Comment by Almir — December 11, 2007 @ 11:29 am

Leave a comment