Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Catalina: "epub.mdimporter" cannot be opened because the developer cannot be verified. #51

Open
7k50 opened this issue Nov 11, 2019 · 10 comments

Comments

@7k50
Copy link

7k50 commented Nov 11, 2019

Screenshot 2019-11-11 at 12 32 11

@jaketmp
Copy link
Owner

jaketmp commented Nov 15, 2019

This seems to be related to notarisation, as seen here whomwah/qlstephen#81. Unfortunately as noted in #50, I don't have the time or tools to fix this.

@sisd23978
Copy link

Literature professor here, no programming skills. I've relied on epub.mdimporter for years, so thank you. I'm hoping there will be a solution to the Catalina problem someday. I've even tried using Time Machine to fix things. If anyone knows of an alternative method to search epub text, I'd be grateful to learn it.

(P.S. dream feature, just in case anyone is looking for projects: an ability to sort search results by relevance/frequency.)

@jaketmp
Copy link
Owner

jaketmp commented Apr 15, 2020

Sorry I can help more - one suggestion for searching the text of an ePub: if you download The Unarchiver, and drag an ePub onto it, it should extract the book into a set of text files you can search.

@sisd23978
Copy link

The Unarchiver trick has been very helpful—thank you! Do you know of any way to sort the text file search results by relevance?

@jaketmp
Copy link
Owner

jaketmp commented Apr 21, 2020

The question is relevance to what? I'm afraid that veering into the world of data-science and natural language processing - there are lots of commercial or OS options here, but big tradeoffs in terms of complexity vs cost.

@pragmat1c1
Copy link

pragmat1c1 commented May 15, 2020

This is how I solved it: Instead of copying EPUB.mdimporter into the global directory /Library/Spotlight/ you have to put it in the user directory in ~/Library/Spotlight. For me this folder Spotlight did not exist in my home folder ~/Library, so I had to create it:

~  mkdir ~/Library/Spotlight
➜  ~  mv ~/Downloads/EPUB.mdimporter ~/Library/Spotlight
➜  ~ mv ~/Downloads/EPUB.qlgenerator ~/Library/QuickLook

# Reload~ mdimport -r ~/Library/Spotlight/EPUB.mdimporter
➜  ~ qlmanage -r
qlmanage: resetting quicklookd

Now it works without any problem :)


Regarding results by relevance/frequency: Have a look at DEVONThink 3. It offers what you are looking for.

@merelybeholdingthedevs
Copy link

I don't think that the last post, while containing useful suggestions, would solve the issue indicated at the beginning. At least, it didn't work in the Catalina OS (unsurprisingly, as the code only makes the plugin work via Terminal and doesn't eschew the Apple security restrictions). Here is what I found online that appeared to be promising: 1. At Stack Exchange, someone suggested the following:

epub.mdimporter is in ~/Library/Spotlight, and run xattr -d -r com.apple.quarantine ~/Library/Spotlight to remove com.apple.quarantine from the Spotlight plugins folder

I guess we should further specify the path, to the epub.mdimporter if we don't want to exempt the whole Spotlight folder from Apple security checks...

  1. Someone on Reddit made a similar suggestion for another application:

If macOS is blocking the file “xattr -d -r com.apple.quarantine {path to file}” will clear quarantine for the file. Be careful when using this one, only clear quarantine if you trust the file. This will only work if macOS is blocking the file with gatekeeper or xdefend.

I haven't tried any of these as I have no idea how to "undo" if something goes wrong. Just in case these appear to be a possible solution for a user with better computer skills...

@damian0815
Copy link

damian0815 commented Feb 3, 2023

I can confirm that @pragmat1c1 's suggestion is 100% working on macOS Monterey 12.6 on an M1 mac after deleting the com.apple.quarantine xattr entries as per @merelybeholdingthedevs 's comment. It takes a few minutes for the quicklook previews to start working, and the Spotlight process seems to be taking even longer, but i'm starting to see epubs showing up in Finder search where I've verified that the appearance is due to a full index of the text and not just the title or metadata.

@merelybeholdingthedevs
Copy link

Another confirmation here, for macOS Catalina! Many thanks, damian0815, brilliant indeed!: I had given up much earlier; merely hoping that the recent Calibre option for full text search could be an alternative (to some limited degree, surely).
Glad that the suggestions for other programs applied well for mdimporter together with pragma1c1's post.
Cheers!

@yinan-c
Copy link

yinan-c commented Mar 18, 2024

Thanks @pragmat1c1 and @merelybeholdingthedevs for the advice. I have removed quarantine for the spotlight pluggin and it worked great, although the quicklook is not showing the full book but just an short description with some basic information, is that what I should expect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants