Librum icon indicating copy to clipboard operation
Librum copied to clipboard

Integration with Ryot

Open IgnisDa opened this issue 2 years ago • 21 comments

Hello I am the author of Ryot. I believe the goals of Librum and Ryot align wonderfully and would like to propose an intgeration between the two. What do you think about it?

Describe the solution you'd like A webhook architecture in Librum that would inform Ryot when progress is made on a book.

Thank you for Librum, it is really useful for me!

IgnisDa avatar Sep 05 '23 15:09 IgnisDa

Hey, thank you for reaching out. I am generally open to these kind of integrations, but I'd need to know more about your project.

How exactly would Ryot work together with Librum?

DavidLazarescu avatar Sep 05 '23 15:09 DavidLazarescu

Ryot is meant for tracking media (in this case books). Every time you read a book, Librum will send your progress to Ryot so that it can be tracked.

IgnisDa avatar Sep 05 '23 16:09 IgnisDa

Does this mean that you are adding webhooks to multiple applications (e.g. e-book readers / library managers) so that they sync their data with you? If that's the case, what other services is Ryot connected with?

DavidLazarescu avatar Sep 05 '23 16:09 DavidLazarescu

Ryot supports a lot of services: https://ignisda.github.io/ryot/integrations.html.

IgnisDa avatar Sep 05 '23 17:09 IgnisDa

Ryot supports a lot of services: https://ignisda.github.io/ryot/integrations.html.

I see. How exactly would the integration work?

DavidLazarescu avatar Sep 08 '23 08:09 DavidLazarescu

Does Librum have access to a book identifier? Ideally I would prefer that Librum sends the openlibrary or google books ID but I think this would be outside the project scope. In that case, an ISBN13 would work fine.

When I read a book, Librum will send a progress update event to the Ryot API:

{
  "isbn13": "<identifier>",
  "progress": 56.45, // progress out of 100%
}

Does this make sense?

IgnisDa avatar Sep 08 '23 08:09 IgnisDa

Librum parses the book files from the user's PC and thus doesn't have access to any of ISBNs. If you'd need the ISBN, I'd need to use some kind of ISBN database and try to find the proper ISBN for every book the user imports into the application.

DavidLazarescu avatar Sep 08 '23 17:09 DavidLazarescu

I'm not that familiar with how ebooks work but i thought their ISBN was attached to their file metadata?

IgnisDa avatar Sep 08 '23 23:09 IgnisDa

I have talked to the developers of the library that Librum uses for rendering the books and extracting their metadata and they say their Library does not support extracting ISBNs

DavidLazarescu avatar Sep 09 '23 06:09 DavidLazarescu

Well we can use the book title themselves but that's prone to errors.

IgnisDa avatar Sep 09 '23 06:09 IgnisDa

From what I know there are databases that you can use to get the ISBN of a book by its title. We might be able to use that.

DavidLazarescu avatar Sep 09 '23 06:09 DavidLazarescu

https://isbndb.com/ is paid.

IgnisDa avatar Sep 09 '23 07:09 IgnisDa

Yes, I suppose that this is not an option for now but if Librum gets more donations I could add that

DavidLazarescu avatar Sep 17 '23 13:09 DavidLazarescu

@IgnisDa I have been looking into the google books api which looks quite promising to get more book metadata (including the isbn). I didn't manage to find out if it is free for commercial use, or if it would cost as well though. I am waiting for a response from google's sales department and if it is free or cheap, I'd be able to integrate it soon.

DavidLazarescu avatar Sep 23 '23 14:09 DavidLazarescu

@DavidLazarescu it's free. I'm not aware how it would apply to Librum given its license. And yes using Google Books api would be great since Ryot already has support for it.

IgnisDa avatar Sep 23 '23 16:09 IgnisDa

I couldn't find where exactly it says that. Do you have a link to that doc?

DavidLazarescu avatar Sep 24 '23 06:09 DavidLazarescu

https://developers.google.com/books/docs/v1/using

IgnisDa avatar Sep 24 '23 07:09 IgnisDa

I have looked through this document before, but searching for "free", "price", "cost" and similar gave me no results. Could you be more specific on where exactly it says that it is free?

DavidLazarescu avatar Sep 24 '23 07:09 DavidLazarescu

I assume that the absence of such clauses means it is free for non-commercial uses.

IgnisDa avatar Sep 24 '23 07:09 IgnisDa

Librum is a commercial application though, this is why I wanted to make sure that I am not breaking any of their rules.

DavidLazarescu avatar Sep 25 '23 05:09 DavidLazarescu

Yep, then your approach to contacting them is the right way to proceed. Do let me know what they reply.

IgnisDa avatar Sep 25 '23 06:09 IgnisDa