New plugin: ZoteroQuickLook

This plugin integrates Mac OS X Quick Look functionality with Zotero. This currently works for my needs on OS X 10.6.2 and FF 3.6 and Zotero 2.0

http://www.tkk.fi/u/mronkko/zoteroquicklook.xpi

Quick Look is launched by choosing an attachment in the item pane and then choosing "Quick Look" from the context meny or pressing space key.

Feedback and reporting bugs would be nice.
«13456789
  • I did some experimenting and found that it would be quite easy to include also images of the attachments to the item pane using Quick Look.
  • Great Plug-in. Works with most of my pdfs and my html-webshots. (Haven't found out what stops it from functioning with all of them - annotations? ). Is there a way this could work with more than one pdf? I.e. quick-search for ".pdf" open up the results with "+" – and rifle through the resulting list of pdfs with your plug-in?
  • edited February 27, 2010
    Wow! This is fantastic. Any chance we can adjust the activation key to Command-Y? That's the standard Quick Look keystroke sequence, at least in en-US OS X.

    It also might make sense to have Quick Look open the primary attachment even if only the parent item is selected. That way users could preview a PDF without having to drill down inside the parent item. For example, Zotero already allows users to open the primary attachment by double-clicking the parent item.

    Thanks for this awesome plugin!
  • Any chance we can adjust the activation key to Command-Y? That's the standard Quick Look keystroke sequence, at least in en-US OS X.
    It's the spacebar too.
  • This is great. Maybe use non-blocking execution of the process and keep the nsIProcess around in the ZoteroQuickLook object? Then a second press of the spacebar can kill the process if isRunning is true or open a new process if not.
  • tried with OS 10.5.8, firefox 3.6., zotero 2.0, doesn't work. Does it only work with OSX 10.6?

  • Is there a way this could work with more than one pdf? I.e. quick-search for ".pdf" open up the results with "+" – and rifle through the resulting list of pdfs with your plug-in?
    Yes. This will be included in the next version.

    Any chance we can adjust the activation key to Command-Y? That's the standard Quick Look keystroke sequence, at least in en-US OS X.
    I will add this to the next version.

    It also might make sense to have Quick Look open the primary attachment even if only the parent item is selected.
    Good idea. Will be implemented.

    Maybe use non-blocking execution of the process and keep the nsIProcess around in the ZoteroQuickLook object? Then a second press of the spacebar can kill the process if isRunning is true or open a new process if not.
    I already did this, but did not think about the non-blocking and hence it did not work. In the next version this will work.

    Does it only work with OSX 10.6?
    The plugin should work on 10.5 also, but I have not tested it. If you can tell me how to launch quick look from command line on 10.5, I can implement support in the plugin.

    On 10.6 the command is 'qlmanage -p ' If you run this in 10.5, does it work?
  • It also might make sense to have Quick Look open the primary attachment even if only the parent item is selected.
    That's (itemID) item.getBestAttachment(), FYI.
  • On 10.6 the command is 'qlmanage -p ' If you run this in 10.5, does it work?
    I just tried, and this command works in 10.5 as well. That computer doesn't have Zotero, so I didn't try the plugin.
  • There is now a new version (0.1.3) with most of the suggestions implemented.

    What works:
    -Opens multiple files
    -Closes with space
    -If an item is chosen, all attachments are shown in quick look

    What does not work:
    -CMD+Y shortcut is not implemented. I do not know how to use keyboard events with cmd key.
    -The quick look feature provided by the qlmanage executable is quite limited
    -I did not test how the software behaves if you give it a very large number of items to quick look.


    Some time in the near future I will write a small program that replaces qlmanage as the program that calls the quick look functions.
  • Wow. Great job!
  • edited March 13, 2010
    Mikko: You should use a different extension id for this, unless you're planning to write only one Firefox extension ever. The sooner you change that the better, since current users will have to manually uninstall the old version.
  • Thanks for the new version – opening multiple attachments is great, the spacebar option very smooth!

    One thing I've noticed: if the pdf has extended characters in its filename your plugin opens the QL-preview window with a generic white icon (and with extended characters clipped from the title of the pdf) but the preview doesn't display any of the pdf's text or page layout. If I use QuickLook from the Finder, it handles the same pdfs as expected and text and layout display fine. I'm not sure if this an FF issue or if you could do something about it? - Thanks.
    kithairon
  • kithairon: thanks for the bug report. I confirm this and also figured a way to fix it. It will be a couple of days and then there will be a new version with a fix.

    Dan: Good point, I will change the ID in the next version.
  • It's a Mozilla bug—the same one that affects indexing.

    https://www.zotero.org/trac/ticket/957

    What's your fix? Copying to a temporary file?
  • Since there is only one file in each folder, just use * as a file name.

    for example this opens a file with extended characters

    qlmanage -p '/Users/mronkko/Documents/Research/Zotero Data/storage/XNKIWWR8/*'
  • Ah, OK—yeah, that works as long as there's only one file. That wouldn't be the case with HTML snapshots, though.
  • I think this will be fixed in Firefox 3.7, for what it's worth.
  • Please don't use * as the filename because it won't work with linked attachments. Currently the plugin does work with linked attachment and it's great!
  • Might it be possible to detect problematic file names (regular expression perhaps?), then replace problem characters with ? wildcards and hope that the problem characters aren't the only ones distinguishing multiple files in the directory?
  • The ? wildcards would work and cause minimal problems, since it is unlikely that they match more than one file name. Maybe I will make this an option.
  • One feature that I could add is to enable this feature from the word processor plugins.

    To do this, I need to know one more thing: In which file is the insert citation -popup defined?
  • chrome/content/zotero/integration/addCitationDialog.xul
  • This is now registered in Mozilla Addons

    https://addons.mozilla.org/en-US/firefox/addon/111142/

    All updates will be delivered with this channel. You need to uninstall any previous version and then reinstall from this source to update the plugin.

    I will implement the proposed changes next week. Also, Linux & Gnome support will be added with Gloobus.
  • If you manage to incorporate this feature within the Word processor plugin for Mac, how difficult would it be to have something similar (e.g. opening a default viewer instead) on Windows?
  • Not difficult at all, I think. Actually, this is something that I am planning on doing.
  • That would be great! That feature has been on my personal wishlist for a some time now.
  • I'm having trouble installing this plug in. Firefox says things have worked and that I should restart --but the plug-in is not there post-restart, nor is functionality.

    (Firefox 3.5.8/OS 10.5)
  • Thanks. I tried deleting some of the extension files and still no luck; I'll have to come back to this.
Sign In or Register to comment.