* fixed spelling errors * tweaked grammar * tweaked phrasing (for clarity) * improved formatting (for readability)
According to the (awful) documentation in the QuickLook header files, for this to work the QLNeedsToBeRunInMainThread Info.plist key has to be set to true. Thumbnails are badged according to the following heuristic: - If the file has an extension of < 10 characters, use that. - If the file has a well-known MIME type (determined by file(1)), look up its corresponding badge string and use that. - If the file has no extension, but a well-known filename (e.g. "Makefile"), look up its corresponding badge string and use that. - Is the file executable? If so, assume it's a script, and badge it with "SCRIPT". - Otherwise, badge it with "TEXT". This heuristic could probably be improved. Currently the mappings of well-known filenames and MIME-types to badge strings are hard-coded in GenerateThumbnailForURL.m. Perhaps these should be moved into an external plist.
* Check candidate files with file(1) to decide whether they are text or binary, and to determine their encoding. * Upgrade to ARC (note this drops support for 10.6 32-bit and below) * Use QLPreviewSetURLRepresentation() instead of reading the entire file (!) with -[stringWithContentsOfURL]. * Add extra compiler warning flags Note that the inclusion of BSD licensed RegexKitLite will require a credit.
List are customizable, just edit the plist files: QLStephenWhiteList.plist : files with these names will be ALWAYS previewed QLStephenExtensionsBlackList.plist : files with these extensions will NOT be previewed QLStephenDirectoriesBlackList.plist : files contained in directories with these names will NOT be previewed
Change data display type from HTML to PlainText
Clean up installation instructions
I like the way it looks better. Also, fixes UTF8 display issue.