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

Prototype an Open Library Citation Embed feature (experimental) #1363

Open
mekarpeles opened this issue Dec 25, 2024 · 6 comments
Open

Prototype an Open Library Citation Embed feature (experimental) #1363

mekarpeles opened this issue Dec 25, 2024 · 6 comments
Assignees

Comments

@mekarpeles
Copy link
Member

mekarpeles commented Dec 25, 2024

Proposal

The BookReader and CORS policies are likely not perfectly set up for this and there's no guarantee this feature ships to production, but for anyone interested, the idea is to create a prototype (similar to youtube embeds) which allows someone from Open Library to find a readable book, search inside that book, and then click a button to create an embeddable preview (copying the code to their clipboard)

TL;DR e.g. highlight region on book + click "create sharable citation" -> gives embed code

e.g.

  1. open up an archive.org book
  2. highlight the region of text to share
  3. upon highlight, a button emerges to create as "youtube" style share/embed
  4. you get a snippet of code copied to your clipboard one may paste anywhere on the web and hovering over results in a cropped snippet that is the citation OR another [better] option is that the button generates something like of like a gist or pastebin which is just an item filled with citation regions that you link directly to (e.g. on x) w/o copying code.

Design / Demo

https://codepen.io/mekarpeles/pen/OPLgGyR

In this codepen, hovering over the eye pulls up a limited preview, ideally to the correct page with the region highlighted:

Screenshot 2024-12-25 at 10 27 17 AM

Justification

Let more sits like wikipedia round the web reference and cite books in an interactive way with previews.

Brainstorm:
Screenshot 2024-12-25 at 12 33 49 PM

Research

Are there any precedents or findings from other projects or studies that support this feature? (link or screenshot if possible)

See Youtube's Share flow

1. Select "Share":

Screenshot 2024-12-25 at 10 32 15 AM

2. Click "Embed" option:

Screenshot 2024-12-25 at 10 32 37 AM

3. Copy the code

Screenshot 2024-12-25 at 10 31 50 AM

Breakdown

No response

@SharkyBytes
Copy link

SharkyBytes commented Dec 25, 2024

Hey @mekarpeles

This looks interesting! Could you please assign this to me? For this thing, I think we could follow this approach:

  1. Highlight & Selection Tool
  2. Embed Code Generator
  3. Try to integrate the book reader
  4. Clipboard Integration
  5. CORS Policy tweaking like (if needed)

Let me know your thoughts on this.

@mekarpeles
Copy link
Member Author

Hi @SharkyBytes

My approach would be to start with the https://github.com/internetarchive/bookreader and find an open access book like https://archive.org/details/metropolis00sincgoog/page/n208/mode/2up?ref=ol&view=theater.

I'd extend the bookreader so when a section is highlighted, a share icon appears alongside the highlighted area

...which one may tap and it pulls up a modal that shows a youtube style preview of the selected region and gives the patron a link they can copy and share.

This link/url (when shared) would generate a social preview of only the highlighted region (less than a page) without the bookreader chrome. e.g.

Screenshot 2024-12-26 at 11 45 42 AM

The url might look something like this, which encodes the start and end offset:
https://archive.org/details/metropolis00sincgoog/page/n208/mode/2up/citation/212:312

Clicking on the url would bring the patron to the page, with the cited region visually highlighted

@mekarpeles
Copy link
Member Author

mekarpeles commented Dec 26, 2024

@SharkyBytes feel free to prototype if it pleases you, though note @cdrini at some point may have strong opinions about the execution and direction, etc as he's currently overseeing bookreader roadmap.

@prasad14070
Copy link

Hello @mekarpeles , can I contribute to this issue, i would like to work on it.

@mekarpeles mekarpeles transferred this issue from internetarchive/openlibrary Dec 27, 2024
@SharkyBytes
Copy link

Hi @mekarpeles & @cdrini! 👋

I took a look at this, and it’s such a great idea—really love it! I’m thinking of implementing this as a sharable card, where users can share their highlighted thoughts by downloading them as an image. The card could be customizable with options for formatting, making it even more user-friendly.

This approach can be especially appealing for book lovers who want to share excerpts or insights on social media, saving them the effort of converting content into a visually pleasing format.

I also found an extension with a similar feature, and I think it aligns well with the goal of this project. Here’s a quick video demo to illustrate the concept: [Link]

If you’d like to add more features, we can also do that:-
For now what I think, When a user clicks on the share icon which you talked above, it could open a modal (similar to the one I’ve shown in the video). From there, they could preview and customize the sharable snippet before downloading or copying the embed code.

Let me know your thoughts on this or if you'd like me to adjust the direction further!

@mekarpeles
Copy link
Member Author

mekarpeles commented Dec 30, 2024

@SharkyBytes great find, that example video :) I don't think our widget would need to be quite so complicated or have so many options. Again, we should include @cdrini and @pezvi in any decisions moving forward, if we want a chance of them making it into bookreader, though there's no rule against prototyping something out! Thanks for your excitement. :)

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

No branches or pull requests

3 participants