It is possible to fix the non-english characters issue and this is on my list too, since it is something that I face all the time.
Another thing: A lot of people in this thread have posted fixes to the plugin. I would be more than happy to take co-maintainers for this plugin, so please email me mikko.ronkko@tkk.fi if interested.
There a a couple of ways to fix the non-english characters issue if someone is willing to take a look at it now. The non-english characters can be converted to ? wildcards (this is what the current workaroudn does already) and then these filenames can be resolved with ls or find command and then executing these with qlmanage
There is now a new version available for testing at
http://www.tkk.fi/u/mronkko/zoteroquicklook.xpi
Changes include
* On Linux and Mac quick look is called through a perl script that resolves wildcards in file names. This solves the problem with non-ascii characters in file names
* The default behavior on Windows is now to look for MaComfort and use that if it is available.
Currently there is no support for non-ascii characters in file names on Windows. If someone is willing to port the perl script as Windows shell script, then support will be added.
Please report test results here. If no major bugs are found, I will make a new release through the mozilla extensions site.
@mronkko: Great. Was looking forward to this. Unfortunately, the new version seems completely unresponsive to my attempts at activating it. (Either via menu or the Spacebar). Tried it on webshots and various pdfs – with english and non-english characters in the title –, disabled and re-enabled the extensions.zoteroquicklook.usefilenameworkaraound (in about:config) took out any possibly offensive add-ons from FF – no luck to see Quicklook in action. Any ideas? Thanks. kithairon.
This is most likely a permission problem (and of course a bug). If you got to ~/Application Support/Firefox/profiles/(name of your profile)/extensions/zoteroquicklook@gmail.com/chrome/content and modify the permissions for file zoteroquicklook.pl. It needs execute permissions.
Meanwhile, I will try to figure out to way to get the permissions correct on install.
@mronkko: Thanks. Couldn't find a zoteroquicklook.pl file under the path you indicated (or anywhere else on my HD). Found an include.js, an overlay.xul, a zoteroquicklook.js and a zoteroquicklook.sh. Changed all their permissions with chmod 755 (for good measure...) but had no luck invoking Zoteroquicklook after this. Let me know what else i can try. kithairon
mronkko - I can't get this to work on Ubuntu 10.04 - gloobus works for me on my desktop, so that's not it. I can also open the respective file with adobe acrobat from within Zotero.
Here's the error message:
Amazing! You've done it. After fixing the permissions (-x) in the newly appeared zoteroquicklook.pl it works beautifully: Pdfs with spaces in the title, with non-English characters, with diacritica, multiple pdfs, 300-page-pdfs, linked jpgs (on my HD), webshots – all accessible with your plug-in. Very delightful.
One condition seems to be that the Zotero entry and the file-name are identical (for both pdf and html-webshots alike); when they are not ZQL brings up the generic white icon. In most cases the pdf-title and the Zotero entry are identical but in a number of cases they are not (one entry has several pdfs or an added webshot) and the latter (by Zotero default) take as title the title of the source webpage. Is it possible to let ZQL open html and pdf objects without their filename having to be identical with the name of the Zotero entry they are filed under?
kithairon: The problem that you are describing is probably easy to fix, but I do not quite understand what you mean. Can you provide a step-by-step instructions on how I can get this problem to appear?
Example of step-by-step instructions:
-search "test" on google scholar
-import the second item
-choose the item (not attachement) and press space
@mronkko: step-by-step to recreate problem with ZoteroQuickLook In FF: -Go to URL: http://forums.zotero.org/categories/ -Create snapshot in Zotero („new entry from current page“) -Find new entry in Zotero center pane („Zotero Forums - Categories“) -Select snapshot contained in above entry (same title as entry „Zotero Forums - Categories“) Invoke ZQL (via spacebar or contextual menu-item „Quicklook“) [Would expect ZQL to open the html-file but nothing happens]
Checking the title of the actual html-file (not the title of the snapshot in Zotero’s center pane) with the „Show file“-button: Zotero will open one of its folders with a file called „Categories.html“
-Going back to Zotero’s center pane and select above snapshot („Zotero Forums - Categories“) -Use contextual menu „Rename file with metadata“ (this adds „.html“ to the title visible in Zotero’s center pane); „Show File“ in right pane reveals that the actual file name has now changed from „Categories.html“ to „Zotero Forums - Categories.html“ i.e. it is now identical (a) to name of main entry in center pane (b) to name of snapshot contained in main entry. -Invoke ZQL: (via spacebar or contextual menu-item „Quicklook“) [all is well ZQL: shows up and displays the html-snapshot as expected]
Something similar happens with pdfs: if main entry (in central pane) and the title of file attached are identical (in Zotero's storage subfolders) ZQL displays them; if they are different (as maybe the case if one entry has many attached pdfs with differing titles and filenames) they are not being displayed with ZQL. If manually changed (with the contextual menu's "Rename file with main entry's metadata") ZQL displays them again.
It would be good if ZQL could display html and pdf files that have different names from a main entry in Zotero.
Hope this is detailed enough for you to make sense of. (Im using a non-english setup and have to retranslate Zot's menupoints.)
I followed the steps in the bug report, but for me it works just fine. I made a screen recording of this. Did I do it correctly? Also check that your preferences are the same as mine:
@ mronkko: After your last response I tried it again in a guest account with a new install of FF, Zot and ZQL and came to to same results as you in the video. (Thanks for this, yes you got my point). Went back to my normal account and tried it with my usual settings on the same pages - no success. The crux seems to be that in my normal setup I use a specified directory for Zotero's storage, differing from the default setting in FF's profile. If I set this back to the Zotero default in the 'Advanced'-tab in the Zotero's preferences (i.e. to the FF profile) then all seems to work fine. (Maybe it is possible for ZQL to allow for a customized storage-folder?) Sorry for misleading you with parts of my post above.
Changes include:
-Fixed the permissions problem on Mac and Linux
-QuickLook is now enabled for the insert citation dialog as well. (With space bar as the keyboard shortcut)
1) On Win7: I get this error message: "C:Program FilesmaComfortmaComfort.exe is missing. Please install MaComfort into this directory or spesify a custom view command instead." I thought it was a problem with escape char (backslash) but it does not work even if I change the line 80 of zoteroquicklook.js : file.initWithPath("C:\\Program Files\\maComfort\\maComfort.exe"); Strange...
2)
-QuickLook is now enabled for the insert citation dialog as well. (With space bar as the keyboard shortcut)
Even for Windows?
EDIT for 2) : even for Windows seemingly... (but problem 1) remains)
Great! The plugin is fantastic news - that is a huge improvement in Zotero functionality.
Works for me in Ubuntu now. Only thing that doesn't work is using spacebar in Zotero itself - it works in the Ooo plugin. I don't need it, but I'm happy to help troubleshoot if you're interested. Let me know what you need.
@mronkko Here the debug output for two instances the plugin only brings up the generic icon with no text from two freshly created websnapshots - the path to my Zotero storage is my usual (Users/amw/Documents/Zettelbank/Zotero/storage):
I'm glad this is useful. Can confirm that the following file indeed exists on my system and opens as expected with any browser from Finder : /Users/amw/Documents/Zettelbank/Zotero/storage/TU2QH37J/index.html
I'll stay tuned. Thanks. Let me know if I can be of help.
OK, there is now a new version available for download. This adds some more information to output for debugging.
The problem on Linux is quite tricky: When you press space, the plugin creates a new process that opens the gloobus window. When you press space again, the plugin checks if the process exists and is alive. If so, the plugin kills the process. For some reason when the process is launched from the add citation dialog, checking the status will freeze the browser.
I disabled checking if the process is alive if the system is Linux and now the system works. Apparently gloobus takes focus when it activates and closes with space. (QuickLook on OS X does not take focus when it activates and thus the need to kill the process from the plugin.)
Anyway, it works now on my Linux. (And a new version is available for download.)
@mronkko: My last post was not clear. It does not work even with double backslash (\\).
I tried to understand what's going wrong on Win: I've tested the three different versions of ZQL that you've released since yesterday (all "0.2.0"). I'll call them 0.2.0a (the first one); 0.2.0b (the second one); 0.2.0c (today). None of these versions work. But 0.2.0a is displaying a warning message ("C:Program FilesmaComfortmaComfort.exe is missing. etc)
---- The debug output (only the last lines: when I'm pressing spacebar) with: -0.2.0a
zotero(3): ZoteroQuickLook active. Dialog: false
zotero(3): ZoteroQuickLook opening viewer
-0.2.0b
zotero(3): ZoteroQuickLook active. Dialog: false
-0.2.0c
Nothing in the debug output!
-----
These tests gave the same result (in the debug output) when I set zoteroquicklook.customviewcommand to C:\Program Files\maComfort\maComfort.exe
Hope that can help. Thank you for everything.
[Win 7-32bits; FF 3.6.6]
---- EDIT: With ZQL 0.1.5 (and these changes), it works perfectly and the debug output is:
Gracile: Do you have maComfort installed and is it located at C:\Program Files\maComfort\maComfort.exe?
If you get nothing from the latest version, you should reinstall the plugin. There were some errors that I fixed, but since this thread was quiet, I did not announce them.
After this current feature set is done and works on all three platforms, I will add a feature for browsing PDFs with quicklook on using the arrow keys.
Gracile: Do you have maComfort installed and is it located at C:\Program Files\maComfort\maComfort.exe?
Yes, of course.
If you get nothing from the latest version, you should reinstall the plugin. There were some errors that I fixed, but since this thread was quiet, I did not announce them.
0.2.0d It's now working well... if I set zoteroquicklook.filenameworkaround to false (french accent in filename)
One minor problem: if I press spacebar to close the ZQL, it closes then immediately reopens (except with pdf!!!?)
Another thing: A lot of people in this thread have posted fixes to the plugin. I would be more than happy to take co-maintainers for this plugin, so please email me mikko.ronkko@tkk.fi if interested.
Regret that I cannot contribute code. Will stay tuned. Thanks for a great plugin.
kithairon
Something like this
find [path] -name "filename.pdf" -exec /usr/bin/qlmanage -p {} \;
This can be called directly or through a shell script.
http://www.tkk.fi/u/mronkko/zoteroquicklook.xpi
Changes include
* On Linux and Mac quick look is called through a perl script that resolves wildcards in file names. This solves the problem with non-ascii characters in file names
* The default behavior on Windows is now to look for MaComfort and use that if it is available.
Currently there is no support for non-ascii characters in file names on Windows. If someone is willing to port the perl script as Windows shell script, then support will be added.
Please report test results here. If no major bugs are found, I will make a new release through the mozilla extensions site.
Any ideas? Thanks.
kithairon.
OSX 10.6.6 / FF 3.6.6 /Zotero 2.03 / ZQL 0.2.0
Meanwhile, I will try to figure out to way to get the permissions correct on install.
kithairon
Here's the error message:
[JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIProcess.init]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: chrome://zoteroquicklook/content/zoteroquicklook.js :: anonymous :: line 150" data: no]"]
New version is available at http://www.tkk.fi/u/mronkko/zoteroquicklook.xpi
One condition seems to be that the Zotero entry and the file-name are identical (for both pdf and html-webshots alike); when they are not ZQL brings up the generic white icon. In most cases the pdf-title and the Zotero entry are identical but in a number of cases they are not (one entry has several pdfs or an added webshot) and the latter (by Zotero default) take as title the title of the source webpage. Is it possible to let ZQL open html and pdf objects without their filename having to be identical with the name of the Zotero entry they are filed under?
Example of step-by-step instructions:
-search "test" on google scholar
-import the second item
-choose the item (not attachement) and press space
In FF:
-Go to URL: http://forums.zotero.org/categories/
-Create snapshot in Zotero („new entry from current page“)
-Find new entry in Zotero center pane („Zotero Forums - Categories“)
-Select snapshot contained in above entry (same title as entry „Zotero Forums - Categories“)
Invoke ZQL (via spacebar or contextual menu-item „Quicklook“)
[Would expect ZQL to open the html-file but nothing happens]
Checking the title of the actual html-file (not the title of the snapshot in Zotero’s center pane) with the „Show file“-button: Zotero will open one of its folders with a file called „Categories.html“
-Going back to Zotero’s center pane and select above snapshot („Zotero Forums - Categories“)
-Use contextual menu „Rename file with metadata“ (this adds „.html“ to the title visible in Zotero’s center pane); „Show File“ in right pane reveals that the actual file name has now changed from „Categories.html“ to „Zotero Forums - Categories.html“ i.e. it is now identical (a) to name of main entry in center pane (b) to name of snapshot contained in main entry.
-Invoke ZQL: (via spacebar or contextual menu-item „Quicklook“)
[all is well ZQL: shows up and displays the html-snapshot as expected]
Something similar happens with pdfs: if main entry (in central pane) and the title of file attached are identical (in Zotero's storage subfolders) ZQL displays them; if they are different (as maybe the case if one entry has many attached pdfs with differing titles and filenames) they are not being displayed with ZQL.
If manually changed (with the contextual menu's "Rename file with main entry's metadata") ZQL displays them again.
It would be good if ZQL could display html and pdf files that have different names from a main entry in Zotero.
Hope this is detailed enough for you to make sense of. (Im using a non-english setup and have to retranslate Zot's menupoints.)
http://www.youtube.com/watch?v=Yrdjcstjh30&feature=youtube_gdata
The crux seems to be that in my normal setup I use a specified directory for Zotero's storage, differing from the default setting in FF's profile. If I set this back to the Zotero default in the 'Advanced'-tab in the Zotero's preferences (i.e. to the FF profile) then all seems to work fine. (Maybe it is possible for ZQL to allow for a customized storage-folder?) Sorry for misleading you with parts of my post above.
Try to switch debug on and debug level to three (extensions.zotero.debug.level) and run Firefox from command line.
(see http://www.zotero.org/support/debug_output)
You should get something like this in the console:
zotero(3)(+0001970): ZoteroQuickLook active
zotero(3)(+0000000): ZoteroQuickLook opening viewer
zotero(3)(+0000001): ZoteroQuickLook calling a shell command: /Users/mronkko/Library/Application Support/Firefox/Profiles/l5auep3s.Mikko/extensions/zoteroquicklook@gmail.com/chrome/content/zoteroquicklook.pl /Users/mronkko/Documents/Research/Zotero Data/storage/H5KD9I24/categories.html
Testing Quick Look preview with files:
/Users/mronkko/Documents/Research/Zotero Data/storage/H5KD9I24/categories.html
Post what you get when the plugin does not work.
http://www.tkk.fi/u/mronkko/zoteroquicklook.xpi
Changes include:
-Fixed the permissions problem on Mac and Linux
-QuickLook is now enabled for the insert citation dialog as well. (With space bar as the keyboard shortcut)
I get this error message:
"C:Program FilesmaComfortmaComfort.exe is missing. Please install MaComfort into this directory or spesify a custom view command instead."
I thought it was a problem with escape char (backslash) but it does not work even if I change the line 80 of zoteroquicklook.js :
file.initWithPath("C:\\Program Files\\maComfort\\maComfort.exe");
Strange...
2) Even for Windows?
EDIT for 2) : even for Windows seemingly... (but problem 1) remains)
Works for me in Ubuntu now. Only thing that doesn't work is using spacebar in Zotero itself - it works in the Ooo plugin. I don't need it, but I'm happy to help troubleshoot if you're interested. Let me know what you need.
Here the debug output for two instances the plugin only brings up the generic icon with no text from two freshly created websnapshots - the path to my Zotero storage is my usual (Users/amw/Documents/Zettelbank/Zotero/storage):
2010.07.08 17:06:13 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:06:13 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook opening viewer
2010.07.08 17:06:13 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook calling a shell command: /usr/bin/perl /Users/amw/Library/Application Support/Firefox/Profiles/fwq67dk5.default/extensions/zoteroquicklook@gmail.com/chrome/content/zoteroquicklook.pl /Users/amw/Documents/Zettelbank/Zotero/storage/9J2NI326/index.html
2010.07.08 17:06:16 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:06:18 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:06:18 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook opening viewer
2010.07.08 17:06:18 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook calling a shell command: /usr/bin/perl /Users/amw/Library/Application Support/Firefox/Profiles/fwq67dk5.default/extensions/zoteroquicklook@gmail.com/chrome/content/zoteroquicklook.pl /Users/amw/Documents/Zettelbank/Zotero/storage/9J2NI326/index.html
2010.07.08 17:06:19 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:11:51 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:11:51 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook opening viewer
2010.07.08 17:11:51 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook calling a shell command: /usr/bin/perl /Users/amw/Library
/Application Support/Firefox/Profiles/fwq67dk5.default/extensions/zoteroquicklook@gmail.com/chrome/content/zoteroquicklook.pl /Users/amw/Documents/Zettelbank/Zotero/storage/TU2QH37J/index.html
2010.07.08 17:11:56 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
Here the debug output when I change Zotero to use the default storage directory in FF's profile and the plugin produces the expected results:
2010.07.08 17:02:10 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook loading
2010.07.08 17:02:10 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook loaded
2010.07.08 17:02:11 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook starts init
2010.07.08 17:02:11 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook finished init
2010.07.08 17:02:15 [0x0-0x366366].org.mozilla.firefox zotero(3): Translate: Searching for translators for http://forums.zotero.org/discussion/11441/2/new-plugin-zoteroquicklook/#Item_30
2010.07.08 17:03:13 [0x0-0x366366].org.mozilla.firefox Zotero Forums - New plugin: ZoteroQuickLook
2010.07.08 17:03:13 [0x0-0x366366].org.mozilla.firefox http://forums.zotero.org/discussion/11441/2/new-plugin-zoteroquicklook/#Item_30
2010.07.08 17:03:19 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:03:19 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook opening viewer
2010.07.08 17:03:19 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook calling a shell command: /usr/bin/perl /Users/amw/Library/Application Support/Firefox/Profiles/fwq67dk5.default/extensions/zoteroquicklook@gmail.com/chrome/content/zoteroquicklook.pl /Users/amw/Library/Application Support/Firefox/Profiles/fwq67dk5.default/zotero/storage/J4AGTP89/index.html
2010.07.08 17:03:37 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:03:40 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
2010.07.08 17:03:40 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook opening viewer
2010.07.08 17:03:40 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook calling a shell command: /usr/bin/perl /Users/amw/Library/Application Support/Firefox/Profiles/fwq67dk5.default/extensions/zoteroquicklook@gmail.com/chrome/content/zoteroquicklook.pl /Users/amw/Library/Application Support/Firefox/Profiles/fwq67dk5.default/zotero/storage/J4AGTP89/index.html
2010.07.08 17:03:41 [0x0-0x366366].org.mozilla.firefox zotero(3): ZoteroQuickLook active. Dialog: false
Hope this is of some use (feel slightly out of my depth here...)
My short-term solution is clearly that I use FF's default storage because your plugin is so immensly useful to me. Thanks for this!
Can you confirm that the file
/Users/amw/Documents/Zettelbank/Zotero/storage/TU2QH37J/index.html
exists in your system?
I will add some debug output to the perl script to make it easier to debug this issue.
/Users/amw/Documents/Zettelbank/Zotero/storage/TU2QH37J/index.html
I'll stay tuned. Thanks. Let me know if I can be of help.
The problem on Linux is quite tricky: When you press space, the plugin creates a new process that opens the gloobus window. When you press space again, the plugin checks if the process exists and is alive. If so, the plugin kills the process. For some reason when the process is launched from the add citation dialog, checking the status will freeze the browser.
I disabled checking if the process is alive if the system is Linux and now the system works. Apparently gloobus takes focus when it activates and closes with space. (QuickLook on OS X does not take focus when it activates and thus the need to kill the process from the plugin.)
Anyway, it works now on my Linux. (And a new version is available for download.)
Test reports are more than welcome. I intend to publish this in the Mozilla Extensions Directory on Monday.
My last post was not clear. It does not work even with double backslash (\\).
I tried to understand what's going wrong on Win: I've tested the three different versions of ZQL that you've released since yesterday (all "0.2.0"). I'll call them 0.2.0a (the first one); 0.2.0b (the second one); 0.2.0c (today).
None of these versions work. But 0.2.0a is displaying a warning message ("C:Program FilesmaComfortmaComfort.exe is missing. etc)
----
The debug output (only the last lines: when I'm pressing spacebar) with:
-0.2.0a
zotero(3): ZoteroQuickLook active. Dialog: false
zotero(3): ZoteroQuickLook opening viewer
-0.2.0b
zotero(3): ZoteroQuickLook active. Dialog: false
-0.2.0c
Nothing in the debug output!
-----
These tests gave the same result (in the debug output) when I set zoteroquicklook.customviewcommand to C:\Program Files\maComfort\maComfort.exe
Hope that can help. Thank you for everything.
[Win 7-32bits; FF 3.6.6]
----
EDIT: With ZQL 0.1.5 (and these changes), it works perfectly and the debug output is:
zotero(3): ZoteroQuickLook active
zotero(3): ZoteroQuickLook opening viewer
zotero(3): ZoteroQuickLook active
If you get nothing from the latest version, you should reinstall the plugin. There were some errors that I fixed, but since this thread was quiet, I did not announce them.
After this current feature set is done and works on all three platforms, I will add a feature for browsing PDFs with quicklook on using the arrow keys.
It's now working well... if I set zoteroquicklook.filenameworkaround to false (french accent in filename)
One minor problem: if I press spacebar to close the ZQL, it closes then immediately reopens (except with pdf!!!?)
Thank you very much. That's great!