ZoteroQuickLook icon indicating copy to clipboard operation
ZoteroQuickLook copied to clipboard

In compatible with Zotero 6.0

Open tenglu0417 opened this issue 2 years ago • 24 comments

The plugin seems to be incompatible with the Zotero beta. image

tenglu0417 avatar Mar 07 '22 22:03 tenglu0417

This plugin is not currently being maintained. The new PDF reader is much faster than QuickLook ever was. I will accept pull requests to fix the issues needed to make the plugin functional again, but I'm not going to spend time to fix them myself

bwiernik avatar Mar 08 '22 01:03 bwiernik

On osx, being able to page / leaf through your documents via ZoteroQuickLook does make browsing quite a pleasure. The immediacy of access is really key for doing research.

So when you need to page through a nr of documents ZoteroQuickLook still presents a huge advantage over opening the file in a reader. In terms of browsing, nothing really has changed, since either opening in the new reader or in Preview.app pretty much is the same latency.

jf--- avatar Mar 20 '22 07:03 jf---

@tenglu0417 Please consider a rename to remove the "beta", thanks in advance.

For Mac OS, it appears initScripts or initExecutable is no longer properly completing, the functions. When openQuickLook gets called the this.viewerBaseArguments and this.viewerExecutable are null.

I was able to fix it for Mac by putting this in to set the values.

        this.viewerBaseArguments=['-p'];
        this.viewerExecutable = Zotero.File.pathToFile("/usr/bin/qlmanage");

right after

	openQuickLook: async function(items) {

Note: the install.rdf update to 6.0.* for the maxVesion for the target.

I don't have time to create a proper fork and pull request. Cheers

AddictArts avatar Mar 21 '22 19:03 AddictArts

As I've said multiple times, I am happy to accept a pull request if someone wants to make the plugin compatible with Zotero 6, but I don't have the time to make the updates myself. If you have done so, please submit a pull request.

bwiernik avatar Mar 21 '22 20:03 bwiernik

@tenglu0417 Please consider a rename to remove the "beta", thanks in advance.

For Mac OS, it appears initScripts or initExecutable is no longer properly completing, the functions. When openQuickLook gets called the this.viewerBaseArguments and this.viewerExecutable are null.

I was able to fix it for Mac by putting this in to set the values.

        this.viewerBaseArguments=['-p'];
        this.viewerExecutable = Zotero.File.pathToFile("/usr/bin/qlmanage");

right after

	openQuickLook: async function(items) {

Note: the install.rdf update to 6.0.* for the maxVesion for the target.

I don't have time to create a proper fork and pull request. Cheers

It works in Mac. And sorry to ask, the Chinese.pdf can not be opened, how to sovle it ? Thanks! image

zoelir729 avatar Mar 23 '22 08:03 zoelir729

@zoelir729 @AddictArts Thank all of you for discussing and fixing the issue. But I'm new to Zotero and don't actually understand where to put the code in. Could you please tell me more details about it?

cannolis avatar Mar 24 '22 02:03 cannolis

If you are new to Zotero it is probably not a good idea to start making changes to the code.

I originally developed the plugin and was using it actively until upgrading to Zotero 6. I see value in the ability browse through articles with quicklook and this is not something that the built-in viewer provides. I will probably fix this at some point, but given that this is a side project it is difficult to say when that might be.

mronkko avatar Mar 24 '22 06:03 mronkko

@mronkko Thanks! We will deeply appreciate your help and look forward to the new ZoteroQuickLook Plugin.

cannolis avatar Mar 24 '22 08:03 cannolis

image image image image Zip these files (Do not zip the upper level folder), and change the .zip into the .xpi.

zoelir729 avatar Mar 25 '22 13:03 zoelir729

@zoelir729 A temporary solution:

Tools -> ZotFile Preferences -> Advanced Settings -> "☑️rename special characters (diacritics) from file name"

Update:

Works for non English non Chinese file name, but still does not work for Chinese file name.

@tenglu0417 Please consider a rename to remove the "beta", thanks in advance. For Mac OS, it appears initScripts or initExecutable is no longer properly completing, the functions. When openQuickLook gets called the this.viewerBaseArguments and this.viewerExecutable are null. I was able to fix it for Mac by putting this in to set the values.

        this.viewerBaseArguments=['-p'];
        this.viewerExecutable = Zotero.File.pathToFile("/usr/bin/qlmanage");

right after

	openQuickLook: async function(items) {

Note: the install.rdf update to 6.0.* for the maxVesion for the target. I don't have time to create a proper fork and pull request. Cheers

It works in Mac. And sorry to ask, the Chinese.pdf can not be opened, how to sovle it ? Thanks! image

phguo avatar Mar 25 '22 14:03 phguo

@zoelir729 I truly appreciate your timely help!

cannolis avatar Mar 26 '22 02:03 cannolis

@zoelir729 I have a quick look at the file named zoteroquicklook.js, and just after I remove the code as below in the function cleanFileName, the plugin works well for the Chinese file name.

    if (this.getPref("usefilenameworkaround") && ! Zotero.isWin){
    filename=filename.replace(/[^A-Z0-9.:\/\\_\- ]/gi,'*');
    }

cannolis avatar Mar 26 '22 06:03 cannolis

@zoelir729 I have a quick look at the file named zoteroquicklook.js, and just after I remove the code as below in the function cleanFileName, the plugin works well for the Chinese file name.

    if (this.getPref("usefilenameworkaround") && ! Zotero.isWin){
    filename=filename.replace(/[^A-Z0-9.:\/\\_\- ]/gi,'*');
    }

It works. Thanks!

zoelir729 avatar Mar 27 '22 06:03 zoelir729

Good job!!

iseesaw avatar Apr 17 '22 05:04 iseesaw

I tried to modify the code by following the discussions above to make ZoteroQuickLook work with Zotero 6.x in this fork version, which can be downloaded and installed directly. Thanks for all good comments above.

Also Have found another new fork version - ZoteroQuickLookReload which is compatible with Zotero 6.x too. Guys could test the compatibility on your system. (Change the extension name to .xpi or .zip to install on Zotero 6.x)

Regulust avatar Apr 17 '22 07:04 Regulust

你好,邮件已收到,我会尽快处理,如有急事请联系13547906739

lbc1027 avatar Apr 17 '22 07:04 lbc1027

I have forked the project again because ZoteroQuickLookReload (the fork mentioned above) does not provide an un-obfuscated version of the source and I was worried about running it on my system.

My version is here (and only supports macOS): https://github.com/beaugunderson/ZoteroQuickLookNG

beaugunderson avatar Jun 13 '22 21:06 beaugunderson

That was my favorite way to quick check files. Hopefully we can get working again. I am not a MAC user at the moment =(

eliasgalvan305 avatar Jun 26 '22 02:06 eliasgalvan305

Thanks for this @beaugunderson! I had the same worry. I found I could make the old version work just by changing the target version, but I see you did a lot of cleanup and removed calling the perl file. Your version also seems more responsive on my system.

cwwalter avatar Jun 26 '22 02:06 cwwalter