duydl / logseq-calibre-annotation

Other
20 stars 2 forks source link

Can there be a copy annotation option in the sub-menu? #8

Open rishacha opened 5 months ago

rishacha commented 5 months ago

Background

I have successfully setup the annotation plugin, but I really need a copy annotation button.

Motivation

I don't understand the use of sync using the lastsync timestamp.

I would rather prefer that the annotations stored in calibre can be directly copied from the preview when required.

Resolution

Is this something that has to be changed in calibre or is it something to do with the plugin?

I haven't investigated both in depth, but wanted to know your view on this.

I can also buy you some coffee if this is resolved 😉

duydl commented 4 months ago

I would rather prefer that the annotations stored in calibre can be directly copied from the preview when required.

What did you mean by "preview", the Calibre's Highlight panel? I tried to imitate the behavior of Logseq's pdf highlight and is probably as close as it could get.
I could implement a drop-down search utils to search highlights of a book and import it into Calibre instead of syncing though, if this is what you meant.

I will be busy till the later half of this month, so not any serious progress until then.

rishacha commented 4 months ago

So if I right click on the PDF Preview in Logseq, I can copy reference of the highlight and paste it inside any note.

Is something like this possible with the plug-in? I tried some tinkering and figured out that you're just rendering an iframe using the content server. So my guess is, the copy reference feature has to be implemented in the webview (content server)

This is something cumbersome. So I'm inclined to an in-built reader/preview pane that mimics the functionality of the pdf reader. I doubt that calibre will work as well in this case unless changes like these are made.

duydl commented 4 months ago

Understand. Then it would need to be a modification from calibre. Right now you could copy the info of highlights - the operation is convenient enough but could be optimized. Then with a little process, it could be turned into the macro link of the plugin in Logseq.

Perhaps adding a template feature for copying highlight info in Calibre ebook viewer would be a solution to the problem. I made some PR there before so it is something I could do.

duydl commented 4 months ago

copy_hl_info Would something like this help?

rishacha commented 4 months ago

This is the exact feature/behaviour that I required. Thank you !! Has this been released?

duydl commented 2 months ago

Apologize for the delay. It has been merged in calibre. https://github.com/kovidgoyal/calibre/pull/2226 You can use the dev branch which would require a little setup or wait for next release.