How to copy text from a book in an application, without a quote and instructions where to get it

I use the BOOKS app on my mac a lot. And I often copy something from there for educational purposes.

Is it possible to somehow delete these signatures that go to the clipboard.

Example:

« Some text »

Excerpt from a book: ... « ... ». Apple Books. 

Is it possible to disable it?


Solution 1:

It is not possible to disable that functionality. Apple eBook (EPUB) files are protected by DRM (Digital Rights Management) and Apple's form of DRM is called FairPlay. They frequently update their DRM methods to foil programmers who have reverse engineered it in the past.

Apple Books inserts the offending line when you copy to the clipboard. What you can do is write an Automator workflow or Application to get the contents of the Clipboard, filter to remove the offending "Excerpt From ..." line and put the remainder back on the clipboard. You could then put the workflow on the Dock and execute it after you copy text from the eBook. Once it's on the clipboard it's yours to modify.

Example: (tune to your specific needs)

enter image description here