diff --git a/Cartfile.resolved b/Cartfile.resolved index 73ce176..96d4789 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "onekiloparsec/AstroCocoaKit" "0.1.2" -github "onekiloparsec/ObjCFITSIO" "0.2.10" +github "onekiloparsec/AstroCocoaKit" "23ef7a53c3acdcfbd891d25cf1149dc0949845c9" +github "onekiloparsec/ObjCFITSIO" "136bb7ff26e74ebfc3ec09f85216f4562b7b6619" diff --git a/QLFits3.xcodeproj/project.pbxproj b/QLFits3.xcodeproj/project.pbxproj index 8a7d836..486964d 100644 --- a/QLFits3.xcodeproj/project.pbxproj +++ b/QLFits3.xcodeproj/project.pbxproj @@ -42,8 +42,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 3BD8111F1BC2E0AA1CBD7C6A /* Pods-QLFits3.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QLFits3.release.xcconfig"; path = "Pods/Target Support Files/Pods-QLFits3/Pods-QLFits3.release.xcconfig"; sourceTree = ""; }; - 5B7E8491F608D40287A1B3AB /* Pods-QLFits3.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QLFits3.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QLFits3/Pods-QLFits3.debug.xcconfig"; sourceTree = ""; }; 9F087E641AAB5513001497A2 /* ObjCFITSIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjCFITSIO.framework; path = Carthage/Build/Mac/ObjCFITSIO.framework; sourceTree = ""; }; 9F276CC51AA7BD1500038036 /* template_error.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = template_error.html; sourceTree = ""; }; 9FF55C3A1A067BF4005AA2BD /* QLFits3.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLFits3.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -80,15 +78,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0FB0C020AB7F0F6C6997F8DC /* Pods */ = { - isa = PBXGroup; - children = ( - 5B7E8491F608D40287A1B3AB /* Pods-QLFits3.debug.xcconfig */, - 3BD8111F1BC2E0AA1CBD7C6A /* Pods-QLFits3.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; 5F80857175C128FA0C69EF83 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -106,7 +95,6 @@ 9FF55C3C1A067BF4005AA2BD /* QLFits3 */, 9FF55C3D1A067BF4005AA2BD /* Supporting Files */, 9FF55C3B1A067BF4005AA2BD /* Products */, - 0FB0C020AB7F0F6C6997F8DC /* Pods */, 5F80857175C128FA0C69EF83 /* Frameworks */, ); sourceTree = ""; diff --git a/QLFits3/GeneratePreviewForURL.m b/QLFits3/GeneratePreviewForURL.m index 458280a..14a2875 100644 --- a/QLFits3/GeneratePreviewForURL.m +++ b/QLFits3/GeneratePreviewForURL.m @@ -57,8 +57,10 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, NSMutableString *HDULinesString = [NSMutableString string]; for (NSUInteger i = 0; i < MIN(MAX_HDU_COUNT, [fits countOfHDUs]); i++) { +#if ATTACH_IMAGES NSString *rawFileName = [[(__bridge NSURL *)url lastPathComponent] stringByReplacingOccurrencesOfString:@"." withString:@"_"]; NSString *HDUImageFileName = [NSString stringWithFormat:@"QLFits3___%@___HDU%lu.tiff", rawFileName, i+1]; +#endif NSString *HDUImageString = nil; // Table anchor is declared in template.html diff --git a/QLFits3/template.html b/QLFits3/template.html index a60ce3b..a22adbf 100644 --- a/QLFits3/template.html +++ b/QLFits3/template.html @@ -167,9 +167,13 @@
QLFits: Flexible Image Transport System (FITS) OSX Quick Look Generator • Version __BundleVersion__
-
This software is brought to you by onekilopars.ec, far-reaching solutions for ground-based astronomers. We also develop iObserve for Mac and for iPad, the best app for preparing your observations.
-
This FITS QuickLook plugin is based on the open source project ObjCFITSIO, the Objective-C wrapper around cfitsio.
+
This software is brought to you by onekilopars.ec, far-reaching solutions for ground-based astronomers. We are known for developing iObserve for Mac and for iPad, the best app for preparing your observations!
+
This FITS QuickLook plugin is based on the open source project ObjCFITSIO, the Objective-C wrapper around the excellent cfitsio library (thanks!).
+
You might also be interested by the FITSImporter plugin, a Spotlight plugin allowing to look for FITS file attributes with OSX' Spotlight.
+
+
Want to be able to copy-paste text from this Quick Look preview? Follow these instructions.
+
diff --git a/README.md b/README.md index 37ce370..462d9ab 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ QLFits 3 ======== _Note: QLFits2 was broken on OX 10.9 Mavericks! This is the new QLFits3. It works for Mavericks (10.9) and up._ +_Update (March 2015): QLFits3 had some troubles displaying images. It was due to a bug in OSX 10.10 Yosemite (and 10.9 Mavericks). It has been worked around._ QLFits is a OSX Quicklook plugin for FITS (Flexible Image transport System) files (used by astronomers worldwide to store and share their data.) @@ -20,12 +21,9 @@ It is released open source under the [GNU General Public Licence](http://en.wiki Installation ------------ -*[Download the latest binary.](http://onekilopars.ec/softwares/QLFits3.qlgenerator.zip)* +*[Download the latest binary (3.0.2)](http://onekilopars.ec/softwares/QLFits3.qlgenerator.zip)* -Put the QLFits3.qlgenerator bundle in _/Library/QuickLook_ or _~/Library/QuickLook_ and run the (safe and instantenous) command: `/bin/sh qlmanage -r` to reset the quicklook daemon. Then, enjoy seeing the content of your FITS files in the Finder: - - - +Put the QLFits3.qlgenerator bundle in _/Library/QuickLook_ (not in _~/Library/QuickLook_) and run the (safe and instantenous) command: `/bin/sh qlmanage -r` to reset the quicklook daemon. Contribute! @@ -34,21 +32,25 @@ Contribute! If you want to contibute, you need: * A recent Mac * A copy of [Xcode](https://itunes.apple.com/fr/app/xcode/id497799835?l=en&mt=12) (Xcode 6, as of now, March 2015, but Xcode 5 should also work) -* A working installation of [Carthage](https://github.com/Carthage/Carthage) (Install it with Homebrew: `brew install carthage`) +* A working installation of [Carthage](https://github.com/Carthage/Carthage) (Install it with [Homebrew](http://brew.sh): `brew install carthage`) * Some knowledge of Objective-C and C... and FITS! Then, 1. simply fork this project on GitHub, 2. Go to the project directory, and run `carthage update` -3. make your modifications (I can help), -4. test (I can also help, if time permits, business as usual), -5. and submit a pull request. +3. Open QLFits3.xcproj and make your modifications (I can help), +4. Test – see Debugt below (I can also help, if time permits, business as usual), +5. Submit a pull request (via GitHub)! How to debug ------------ +* Build your (modified) QLFits3. Now, a new version is being put in /Library/QuickLook +* Navigate in the Finder to look for a FITS file, and press . + +Alternate method. _Note: What follows is supposed to work, but a bug in Yosemite prevents it._ In Xcode, you should locate the `qlmanage` binary file, and include it as the "Executable" in the "Run" section of the "QLFits3" scheme. To do so: * Edit the "QLFits3" scheme in Xcode, select the "Run section" @@ -68,16 +70,9 @@ Use `-t` to create thrumbnails instead of previews. You can put multiple entries Project Notes For Developers ---------------------------- - -The following command line is run at the end of the Xcode build phase to ensure the QuickLook daemon is restarted: `/bin/sh qlmanage -r` - -Once done, you can enjoy seeing the content of your FITS files directly in the Finder! - Note that you can use [FITSImporter](https://github.com/onekiloparsec/FITSImporter), the OSX Spotlight plugin for FITS file as good companion. -* The plug-in code must be signed. The "Code Signing Identity" build setting is to the "Developer ID: *" automatic setting. If you don't have a Developer ID, get creative. - -* There is a Copy Files build phase that puts the Debug build of Provisioning.qlgenerator in your ~/Library/QuickLook folder. +* There is a Copy Files build phase that puts the Debug build of Provisioning.qlgenerator in your /Library/QuickLook folder. * QuickLook plug-ins sometimes don't like to install. Learn to use "qlmanage -r" to reset the daemon. Using "qlmanage -m plugins" will tell you if the plug-in has been recognized. Sometimes you have to login and out before the plug-in is recognized.