janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.98k stars 1.39k forks source link

Sync reading status and highlights/notes in KOReader #2122

Open rolocampusano opened 3 years ago

rolocampusano commented 3 years ago

Is your feature request related to a problem? Please describe. I love the way the Kobo Sync feature works. Now I got a Boox Reader and using the KOReader (or any other android reader for that matter) made me loose the syncing feature that I loved the most with Kobo and Calibre Web together.

Describe the solution you'd like Is there a way to improve the relationship between calibre web and KOReader? The potential benefit of this is that KOReader is available for many platforms! (I will be making this feature request in their GitHub as well).

Describe alternatives you've considered Manual syncing. But is just too much work :(.

arunoruto commented 3 years ago

I am currently searching for a new e-reader, since I lost my kindle and with that, my progress in all my "side loaded" books too. I found calibre-web and the Kobo integration and just because of that, I am now out which Kobo device to buy. But if a sync option could be used for utilizing the progress sync of KOReader, that would be amazing. If you are willing to use an outdated server, you can use the koreader sync server. But there is a simple project which uses python called koreader sync. I could imagine to just build a small Dockerfile around that script and host it along the calibre-web instance, but integrating it into the project would also be nice. I will try the python script and see how good it is and how it works :)

rolocampusano commented 3 years ago

Thanks @SoulEater45! I'll give it a try.

Question: How do you get access to the reading status if not through koreader? What if I want to keep track of my books in some sort of goodreads way, it doesnt have to be that way though but ideally centralized somehwere.

arunoruto commented 3 years ago

The major problem of syncing progress, is that there is no standard or protocol which everyone could use. So for example, the folks at calibre could implement a way of saving the reading progress, but then all readers would need to implement the protocol on their side, so the syncing works. What we need is something like OPDS, but just for progress syncing.

In one way you achieve that with koreader, but you need to use their app. If now calibre-web would also support their way of syncing, that would maybe motivate other readers to implement the plugin in their project.

ceselder commented 1 year ago

old thread but I might just try and implement this...

Vito0912 commented 1 year ago

Is there any update on this? I use the pocketbook-Reader-App on my IOS devices and the calibre-web-server for my MacBook. Is there any way of syncing the progress over all of these (koreader, pocketbook and calibre-web itself)?

Thank you

SomeOtherDev commented 1 year ago

Funnily enough, I wanted to implement something related to this to. I use a Kobo Libra H2O, and I wanted to write a daemon that syncs reading progress between KOReader and Calibre. Like people have said before, there's not really a standard way to do this.

Calibre seems to use epubcfi, location, references etc. KOReader stores this information roughly in a statistics.sqlite3 database (pages read, total pages), and as a percentage read/xpointer in metadata.epub.lua (the latter being in the folder of a given epub. Not sure about other document types).

Converting between the two doesn't seem easy. You'd probably have to reverse engineer the xpointer piece so you can translate it back and fourth between epubcfi.

Edit: To add to this, I've just realised Cool Reader 3 is used with this project, and it seems the function CR3View::goToXPointer in that project might hold the answer.

Vito0912 commented 1 year ago

@SomeOtherDev

Funnily enough, I wanted to implement something related to this to. I use a Kobo Libra H2O, and I wanted to write a daemon that syncs reading progress between KOReader and Calibre. Like people have said before, there's not really a standard way to do this.

Calibre seems to use epubcfi, location, references etc. KOReader stores this information roughly in a statistics.sqlite3 database (pages read, total pages), and as a percentage read/xpointer in metadata.epub.lua (the latter being in the folder of a given epub. Not sure about other document types).

Converting between the two doesn't seem easy. You'd probably have to reverse engineer the xpointer piece so you can translate it back and fourth between epubcfi.

Edit: To add to this, I've just realised Cool Reader 3 is used with this project, and it seems the function CR3View::goToXPointer in that project might hold the answer.

I have researched this topic (a little bit) and it is not as simple as it sounds - in theory it is, but not from calibre-web´s standpoint. If I understand correctly, you want to achieve synchronization of books when uploading them/ keeping the synchronization data in the bookfile itself. But I think for the beginning it does not need to be - because it makes everything to complex imo.
However, because, sadly, there is no standard way of synchronizing that yet, so I would be satisfied with something (preferably with the KOReader-Sync feature) at the beginning. The main difficulties with this approach are:

It is not "compatible" with calibre-db Rewrite the basically all reading-code and more...

You mentioned an issue with epubcfi. But I think it´s not even an issue when it is used in this syncing method because it is also stored and sended (I am referring to the KOReader-Sync, not local storage). So if there is a movement to the cfi code they will implement it to local-savinf for sure. But in my opinion this is not the right way to do it, because there are many formats and it should be some universal system.

Theoretically, it should not be too hard to implement it yourself in a fork (just the syncronisaztion), but I doubt it would be accepted here. To do it you just need to implement a converter to md5 hash of the book content save it to a db and more or less be happy. 8Of course it still needs to be displayed in calibre-web, .....) Just take a look at this repo

But at the end - because calibre-web lacks many features - I decided to create my own solution in React (also to support audio files and blank entries, etc.). I think calibre-web is great for reading on the web and keeping track of your books across multiple devices, but not much more in my opinion.

clach04 commented 3 months ago

@Vito0912 wrote:

..... But at the end - because calibre-web lacks many features - I decided to create my own solution in React (also to support audio files and blank entries, etc.). I think calibre-web is great for reading on the web and keeping track of your books across multiple devices, but not much more in my opinion.

Do you have a link I could take a look at? Thanks! :-)

Vito0912 commented 3 months ago

@Vito0912 wrote:

..... But at the end - because calibre-web lacks many features - I decided to create my own solution in React (also to support audio files and blank entries, etc.). I think calibre-web is great for reading on the web and keeping track of your books across multiple devices, but not much more in my opinion.

Do you have a link I could take a look at? Thanks! :-)

I have since discontinued the project.

Firstly, because this was my first React project and the codebase became increasingly difficult to maintain, making a release completely out of the question.

Secondly, I have switched to a new reader that no longer supports Kobosync, so I don't see any need to bring the project to completion for me. For example, it never had a proper UI, nor error handling or upload.

And lastly, I'm currently taking a break from reading because there's just so much going on, and I simply don't have the time anymore.

That's why I've been listening to a lot of audiobooks for some time now.

Recently through Audiobookshelf.

Audiobookshelf is primarily for audio files, but it also has very rudimentary support for common eBook formats. Additionally, progress is saved, although it's only usable in the browser and not with a reader. However, there are already issues that address this topic.

I currently work on a client that I will probably soon publish and then concentrate on the eBook side of Audiobookshelf. But I cannot guarantee for anything.

clach04 commented 3 months ago

@Vito0912 thanks for the speedy reply and for taking the time for answering in the depth you did. Funny enough I have https://github.com/advplyr/audiobookshelf on my never-ending TODO list to checkout! :laughing: I'm happy with the OPDS server I have but I've been wondering about putting more time into it or devote that time to a more active project (than my own).