johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.35k stars 289 forks source link

Allow annotations for books without unique identifiers #533

Closed nicolas-pi closed 1 year ago

nicolas-pi commented 4 years ago

Foliate is great, thanks for all the good work.

Recent issue When I first installed Foliate a few months ago, the highlighting button was working fine. Since around one month, the button is grayed out and cannot be used. It’s a shame because it’s a really great feature.

Version

Screenshot screenshot

nicolas-pi commented 3 years ago

I thought the bug was coming from Debian testing but it does not seem to be the case. On some epubs, the highlighting button is grayed out and on others, it works properly. The epubs I’ve tested where all converted using Calibre and I don’t get why some work and others not. With Calibre E-book viewer highlighting tool, I can highlight on both kind of epubs. Any hint welcome.

johnfactotum commented 3 years ago

Annotation is currently disabled for EPUB and Kindle files that do not have unique identifiers.

nicolas-pi commented 3 years ago

Thanks for the info. So I guess I would have to add a unique identifier and it should solve the problem. Is there a way (option somewhere) to enable annotation even for files without unique identifiers?

johnfactotum commented 3 years ago

I plan to generate identifiers for those files, similar to how FB2, comic book, or plain text files are handled now. But I never got to implement that, so no, currently there's no such option. See FAQ: https://github.com/johnfactotum/foliate/wiki#how-are-identifiers-generated

nicolas-pi commented 3 years ago

Thanks a lot. I will try to add unique identifiers by hand and hope you will implement the auto-generation for epub identifiers some time in the future… Thanks also for this great app.

nicolas-pi commented 3 years ago

Highlighting works great once the content.opf metadata tags are made a bit cleaner, with a unique identifier generated through the MD5 method (see link above : https://github.com/johnfactotum/foliate/wiki#how-are-identifiers-generated).

johnfactotum commented 1 year ago

In the gtk4 branch, it now generates identifiers for all formats. (Well, it doesn't save the annotations yet, but that's a different issue...)