noembryo / KoHighlights

KOHighlights is a utility for viewing KOReader's highlights and/or export them to simple text, html, csv or markdown files.
MIT License
128 stars 5 forks source link

Possibility to transfer highlights to epub file #15

Closed FraH90 closed 2 years ago

FraH90 commented 2 years ago

Hi guys, this is not an issue but an improvement suggestion: would it be possible to transfer all the highlights from the LUA file created from koreader, directly into the epub format?

I'd very much appreciate this feature.. I need to "save" the highlights created from koreader into all the epub books I'm reading, but doing it manually would be very, very very tedious.

noembryo commented 2 years ago

Can you be a little more specific? Do you want to save the highlights of an epub into another epub? Or, do you want to append the highlights of an epub to the epub itself?

FraH90 commented 2 years ago

Can you be a little more specific? Do you want to save the highlights of an epub into another epub? Or, do you want to append the highlights of an epub to the epub itself?

Practically, when I open the epub in a certain e-reader app on windows, the highlights that I've created with koreader doesn't show up obviously, because from what I've understand the highlights are stored in LUA files.

I'd like to write the highlights from the LUA files to the epub itself (basically, append the highlights of an epub to the epub itself, like you say), so when I open the epub with another e-reader (physical or software) the highlights will show up.

I think this would be a very, very useful functionality!

noembryo commented 2 years ago

I think this would be a very, very useful functionality!

Well, it would! But unfortunately, that means that KOHighlights should also be an epub editor.. :wink:

So, as you can understand, its not possible..

FraH90 commented 2 years ago

I think this would be a very, very useful functionality!

Well, it would! But unfortunately, that means that KOHighlights should also be an epub editor.. :wink:

So, as you can understand, its not possible..

And it wouldn't be as easy as using a python library that handles epubs, and just "transfer" the highlights by searching for the highlighted text from the book (automatically) and using a function already provided by the python library to highlight the selected part?

I mean, it wouldn't be necessary to have full epub-editing features, just one button with which you can click "TRANSFER MY HIGHLIGHTS TO EPUB" and automatically use an external python library to manage the epub?

I'm not an experienced developer, but I think this would be doable... Without even visualizing the epub ..

noembryo commented 2 years ago

I know how to do it. :stuck_out_tongue: It is doable, if you want to build an ePub editor. Yes, the GUI is just a button somewhere.. You press it and stuff happens... :wink:

The thing is that it might need a lot of code underneath because there are a lot of different coded ePubs. I don't believe it would be easy or simple (as you have it in your mind) and I don't want to make KOHighlights heavier because "More code, more bugs!"