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

Access books using a metadata-based ID #1057

Open
rgaudin opened this issue Feb 21, 2024 · 3 comments
Open

Access books using a metadata-based ID #1057

rgaudin opened this issue Feb 21, 2024 · 3 comments
Milestone

Comments

@rgaudin
Copy link
Member

rgaudin commented Feb 21, 2024

Although there are tickets that intersects with this discussion, such as #864; I'd like to express this one independently and clearly.

Request

Being able to build a kiwix-serve URL with only in-ZIM (thus Metadata) information.

Ideally, I'd like to be able to call /viewer#{bookId} or /content/{bookId} and get to said book. bookId here being the ZIM UUID.

Why would one need this?

  • The bookName to a book is based on the filename on disk at time of addition to kiwix-serve. This is thus somewhat volatile.
  • The bookName can be extracted from the OPDS catalog (link to /content/), of a running kiwix-serve. Needs live-querying of kiwix-serve.

Assuming I want to link to a specific content from outside of kiwix-serve ; if I can't rely on a running OPDS endpoint (as the libkiwix viewer does), I have to:

  • known the filename passed to kiwix-serve
  • duplicate and maintain part of libkiwix code to generate the bookName.

Adding support for this seems quite simple.

If the BookName part of URL looks like a UUID, it can be tested first and if it matches, a redirection to the current format happen.

This would ensures continuity of current behavior and allows UUID-based link to be presented as human in URL of browsers.

@kelson42
Copy link
Collaborator

kelson42 commented Feb 21, 2024

100% agree. A minima, at the core, any end-point should be available easily for a machine: ie. using the ZIM id.

Other URL/ZIM identifiers should be considered as aliases. Such aliases cozld be very important but this the topic of #864.

@kelson42 kelson42 added this to the 13.4.0 milestone Feb 21, 2024
@rgaudin
Copy link
Member Author

rgaudin commented Feb 25, 2024

13.4!

@kelson42 kelson42 modified the milestones: 13.4.0, 13.2.0 Feb 25, 2024
@kelson42
Copy link
Collaborator

13.2.0, sorry my bad.

@kelson42 kelson42 modified the milestones: 13.2.0, 13.3.0 Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants