Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silo Request] openlibrary #1633

Open
yepstepz opened this issue Dec 18, 2023 · 6 comments
Open

[Silo Request] openlibrary #1633

yepstepz opened this issue Dec 18, 2023 · 6 comments
Labels

Comments

@yepstepz
Copy link

Hi! I want to contribute to brid.gy and add an integration with OpenLibrary.

Would be great to get notifications about the books I read, and since Goodreads deprecated their API, the best option could be the OpenLibrary.

The easiest option is to start from the listening part. They do not have any oAuth options right now, but API is available for GET option: https://openlibrary.org/developers/api

So what I think:

Login

After you login into Brid.gy with your website (indie auth), check profile page from OpenLibrary (OL) that you added to the input. for instance, https://openlibrary.org/people/zpetspey is my OL account, and it has my site https://yepstepz.io, and I can add

html

<code>1    ...
2    &lt;a href="https://openlibrary.org/people/zpetspey" rel="me"&gt;&lt;/a&gt;
3    ...
</code>

to my site. It would be enough to show that I want to listen some updates.

Updates

There are a few pages that I would possibly crawl to get my updates from:

  • currently-reading
  • read
  • would like to read

Bridgy could crawl it from time to time to get updates.

I don't see any eTag on curl -I request, but probably once in a day is ok.

Another interesting feature request could be to fetch year's goal and stats. Would be nice to get that updates from webmention.

Post

After crawling and getting updates, bridgy could form a post. There is a discussion about some properties here: microformats/h-entry#10, so I need to research it further.

What do you think? I also have plans for investigating posting possibility, but wanted to check if this idea is ok with you.

(Originally published at: https://yepstepz.io/notes/04-openlibrary-proposal)

@snarfed
Copy link
Owner

snarfed commented Dec 19, 2023

Interesting, thanks for filing!

The vision and ideas here are pretty broad and wide-ranging. Could you give a specific example of an OpenLibrary post that you syndicated/cross-posted from an original post on your site, and the response(s) to it on OpenLibrary that you'd hope to backfeed to that original post as webmentions? And what existing microformats2 you'd expect those backfed responses to use? (We generally prefer to use existing, established microformats2 instead of new ones that aren't used in the wild anywhere yet.)

It also sounds like much of what you're interested in here is more like PESOS, ie copying posts from inside OpenLibrary back onto your site? PESOS is great, but it's generally out of scope for Bridgy specifically.

I'm still open to ideas here though! Especially if we can start with concrete examples.

@yepstepz
Copy link
Author

The vision and ideas here are pretty broad and wide-ranging. Could you give a specific example of an OpenLibrary post that you syndicated/cross-posted from an original post on your site, and the response(s) to it on OpenLibrary that you'd hope to backfeed to that original post as webmentions?

Not on my web site, but I have this example https://gregorlove.com/2023/05/reading-funny-in-farsi/. As far as I know, you can't officially use goodreads API, so it's probably posted manually. So the idea is: I post a book that I started to read, somehow it was sent to the OL (you can make bots which could publish data, but let's say it has already been established) and got to the currently-reading list. Then I can mark is as read, abandon, rate, leave some review.

I understand that it is better to use existing tags. Probably u-bookmark-of for want to read, u-like-of for rating (could it be numeric?), u-tag-of for listing in different shelves, u-in-reply-to for review.

Furthermore, now I think that the listening part is not required for OL since you can't leave actual text reviews, just some general anonymous phrases. (example).

Should I research a possibility of sending this data to OL through brid.gy or abandon this idea completely?

@snarfed
Copy link
Owner

snarfed commented Dec 19, 2023

Thanks! That helps a bit.

It sounds like you're mostly interested in POSSEing your own reviews, ratings, "want to read," etc posts to OL? Except I don't see a write API for posting those things on https://openlibrary.org/developers/api . So you're thinking you'd post those in OL, on an existing book, and then Bridgy would send them back to your site via webmention? How would Bridgy find the corresponding "currently reading" post on your site? Would it look for a u-read-of pointing to the book on OL?

If you want your OL reviews, ratings, etc to turn into their own posts on your site, that's more PESOS/Micropub territory. If you're ok with them becoming comments or reactions on the original "currently reading" post on your site, though, webmentions and Bridgy could work!

If so, here are a couple places to start:

  • Start posting a few read posts, reviews, ratings, etc on your own site first. It's always helpful to do something manually a bit before automating it (eg with Bridgy). That can help confirm what you want and don't want, how things should work, etc.
  • If that goes well and you do want to automate with Bridgy, start by adding OpenLibrary support to granary. @gRegorLove and others in the IndieWeb community can hopefully help figure out how OpenLibrary data maps to mf2 and AS1.

@snarfed
Copy link
Owner

snarfed commented Dec 19, 2023

Oh, and try out more of these features in OpenLibrary itself too! It looks like you only joined a week ago, https://openlibrary.org/people/zpetspey , and you've posted one "already read" book, but no reviews or ratings or progress updates or anything else?

@yepstepz
Copy link
Author

yepstepz commented Dec 19, 2023

Yeah, will try, sounds like a plan!

It looks like you only joined a week ago

yeah I tried to figure out how to build my book routine outside goodreads and thought it would be great to have mentions. I will give it a try surely, and hopefully will get back to this topic after some time :)

Thank you for guidance :)

@gRegorLove
Copy link

gRegorLove commented Dec 19, 2023

Hi @yepstepz!

Not on my web site, but I have this example https://gregorlove.com/2023/05/reading-funny-in-farsi/. As far as I know, you can't officially use goodreads API, so it's probably posted manually.

I make posts like that using Micropub requests, from https://indiebookclub.biz. It's a pretty basic tool: you enter title, author, and ISBN. You select one of the statuses: to-read, reading, and finished. If your site supports Micropub, it tries to publish the post to your site.

Sparkles is another Micropub client for posting books and it uses OpenLibrary search.

Separate from indiebookclub, on my site I set up a URL that will accept an ISBN then redirect to the OpenLibrary page. That's why if you click on the book title in my post https://gregorlove.com/isbn/9780307430991, it redirects to https://openlibrary.org/isbn/0307430995 (normalized ISBN-10), which OL redirects internally a couple times and ends up at https://openlibrary.org/books/OL24289154M/Funny_in_Farsi. Obviously not every book is in OL yet, so this redirection method does sometimes result in a 404 on OL, but it's worked most of the time for me.

If you have questions about Micropub, the IndieWeb community #dev channel is a good place. Ryan and I are both there, as well as helpful community members around the world. I can also answer questions about indiebookclub there if you try that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants