Quick Look Enscript
I decided to write my first Quick Look generator called QLEnscript. It’s a replacement generator for source code files that produces colorized output for the following languages:
- Objective-C/C++
- C/C++
- Perl
- Python
- Java
- Shell scripts
- Assembly language
Version 1.0.b1 binary and source are up on my Google Code project. To install the binary, place QLEnscript.qlgenerator
in one of the following directories:
~/Library/QuickLook
/Library/QuickLook
It’s based on enscript
which comes bundled with OS X and can generate colorized HTML for these languages. It doesn’t have support for Ruby, unfortunately. The source code is under the GPL because I used some of the enscript
source, which is GPL.
The only downside, thus far, is that no thumbnail is generated. You only see thumbnails if you select multiple items and then click the Thumbnail icon to see multiple previews at once. Unlike Quick Look previews, which support HTML, the only output formats supported by Quick Look thumbnails are images. It’s too much of a PITA to generate an image from the HTML, so I decided to punt on it. Also, it’s not very well tested, so I’m sure there’s bugs. Let me know if you find any issues.