diff --git a/QuickLookStephenProject/Info.plist b/QuickLookStephenProject/Info.plist index a09120c..3ba2479 100644 --- a/QuickLookStephenProject/Info.plist +++ b/QuickLookStephenProject/Info.plist @@ -34,7 +34,7 @@ CFBundleShortVersionString 1.4 CFBundleVersion - 1.4.1 + 1.4.2 CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration diff --git a/QuickLookStephenProject/QLStephenDirectoriesBlackList.plist b/QuickLookStephenProject/QLStephenDirectoriesBlackList.plist deleted file mode 100644 index 9221e62..0000000 --- a/QuickLookStephenProject/QLStephenDirectoriesBlackList.plist +++ /dev/null @@ -1,7 +0,0 @@ - - - - - bin - - diff --git a/QuickLookStephenProject/QLStephenExtensionsBlackList.plist b/QuickLookStephenProject/QLStephenExtensionsBlackList.plist deleted file mode 100644 index 1d46ef6..0000000 --- a/QuickLookStephenProject/QLStephenExtensionsBlackList.plist +++ /dev/null @@ -1,25 +0,0 @@ - - - - - lib - dll - a - o - dmg - zip - rar - tar - tgz - gz - tbz - bz2 - taz - z - tlz - lz - txz - xz - gzip - - diff --git a/QuickLookStephenProject/QLStephenWhiteList.plist b/QuickLookStephenProject/QLStephenWhiteList.plist deleted file mode 100644 index 900d39f..0000000 --- a/QuickLookStephenProject/QLStephenWhiteList.plist +++ /dev/null @@ -1,17 +0,0 @@ - - - - - README - CHANGELOG - INSTALL - CONFIGURE - LICENSE - THANKS - Capfile - Guardfile - Procfile - Rakefile - Gemfile - - diff --git a/QuickLookStephenProject/URLChecker.h b/QuickLookStephenProject/URLChecker.h deleted file mode 100644 index 9a52dc3..0000000 --- a/QuickLookStephenProject/URLChecker.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// URLChecker.h -// QuickLookStephen -// -// Created by Guillermo Enriquez on 5/24/12. -// Copyright (c) 2012 nacho4d. All rights reserved. -// - -#import - -bool shouldProcessItem(CFURLRef itemURL, CFBundleRef bundle); diff --git a/QuickLookStephenProject/URLChecker.m b/QuickLookStephenProject/URLChecker.m deleted file mode 100644 index d044c57..0000000 --- a/QuickLookStephenProject/URLChecker.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// URLChecker -// QuickLookStephen -// -// Created by Guillermo Enriquez on 5/24/12. -// Copyright (c) 2012 nacho4d. All rights reserved. -// - -#import "URLChecker.h" -#import - -bool shouldProcessItem(CFURLRef itemURL, CFBundleRef bundle) -{ - NSURL *url = (NSURL *)itemURL; - - // Allow these files always, no matter what - NSURL *whiteListURL = (NSURL *)CFBundleCopyResourceURL(bundle, CFSTR("QLStephenWhiteList"), CFSTR("plist"), NULL); - NSArray *whiteList = [NSArray arrayWithContentsOfURL:whiteListURL]; - [whiteListURL release]; - if ([whiteList containsObject:[url lastPathComponent]]) { - return true; - } - - NSString *extension = [url pathExtension]; - - // Filter file with certain extensions - NSURL *extBlackListURL = (NSURL *)CFBundleCopyResourceURL(bundle, CFSTR("QLStephenExtensionsBlackList"), CFSTR("plist"), NULL); - NSArray *extBlackList = [NSArray arrayWithContentsOfURL:extBlackListURL]; - [extBlackListURL release]; - if ([extBlackList containsObject:extension]) { - return false; - } - - // Filter files inside folders with certain names - NSArray *components = [[url path] pathComponents]; - if (components.count > 1) { - NSURL *dirBlackListURL = (NSURL *)CFBundleCopyResourceURL(bundle, CFSTR("QLStephenDirectoriesBlackList"), CFSTR("plist"), NULL); - NSArray *dirBlackList = [NSArray arrayWithContentsOfURL:dirBlackListURL]; - [dirBlackListURL release]; - NSString *folder = [components objectAtIndex:components.count - 2]; - if ([dirBlackList containsObject:folder]) { - return false; - } - } - - // For all other files do it! - return true; -} \ No newline at end of file diff --git a/README.md b/README.md index 3860424..84b816e 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,6 @@ QLStephen is a QuickLook plugin that lets you view plain text files without a fi CHANGELOG etc... -You can also customise the plugin to determine which files it previews. See [*Customizing white/black lists*](#customizing-whiteblack-lists---step-by-step), below. - - ## Installation @@ -28,36 +25,6 @@ Compliling the project yourself? Just copy the generated `QLStephen.qlgenerator` file into the relevant `QuickLook` folder (as above). - -## Customizing white/black lists - Step by Step - -Want to change the current behaviour? Just follow the instructions below. - -**Note:** -Plists used here are not same as user defaults, so you won’t find -them in `~/Library/Preferences`. Instead, you need to edit the plist -files inside the bundle—in this case, the plugin file: -`QLStepehen.qlgenerator`. - - -#### 1. Show the contents of the bundle. - -If you installed the plugin, it should be in `~/Library/QuickLook/`. - - - - -#### 2. Edit the appropriate plist file in your favorite text editor. - - - -Plist files: - -* **`QLStephenWhiteList.plist`** : files with these names will **always** be previewed -* **`QLStephenExtensionsBlackList.plist`** : files with these extensions will **never** be previewed -* **`QLStephenDirectoriesBlackList.plist`** : files contained by these directories will **never** be previewed - - ## Trouble? If you’ve installed the plugin, but don’t see any changes: @@ -77,7 +44,7 @@ Because I was listening to [Adam and Joe](http://www.bbc.co.uk/blogs/adamandjoe/ **Original author:** Duncan Robertson -Special thanks to the following people for submitting patches: +Special thanks to the following people for submitting patches over the years: * [Guillermo Ignacio Enriquez Gutierrez](https://github.com/nacho4d) * [Rob Lourens](https://github.com/roblourens)