-
-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Following kiwix/kiwix-tools#586, it is clear that the bookName is an important information for Kiwix-serve users/integrators. While the v2 API is now completely reliant on UUIDs, reader endpoints like /content, /raw, /search, /suggest and /viewer are dependent on that bookName.
bookName is a human-friendly book identifier in the internal catalog. It is built from the source ZIM filename, essentially normalizing it. On our public catalog, those mostly matches the Name metadata of the ZIM because that's our convention but it doesn't have to be.
Given it's an identifier, I wonder if we should expose it in the OPDS API.
❯ curl https://library.kiwix.org/catalog/v2/entry/5f93c4a9-2ebd-ddd0-d13d-1edc29d511a6
<?xml version="1.0" encoding="UTF-8"?>
<entry>
<id>urn:uuid:5f93c4a9-2ebd-ddd0-d13d-1edc29d511a6</id>
<title>Le Mali Pour Les Nuls</title>
<updated>2022-11-10T00:00:00Z</updated>
<summary>Des vidéos pour découvrir le Mali</summary>
<language>fra</language>
<name>mali-pour-les-nuls_fr_all</name>
<flavour></flavour>
<category></category>
<tags>youtube;_videos:yes;_ftindex:no;_pictures:yes;_details:yes</tags>
<articleCount>10</articleCount>
<mediaCount>26</mediaCount>
<link rel="http://opds-spec.org/image/thumbnail"
href="/catalog/v2/illustration/5f93c4a9-2ebd-ddd0-d13d-1edc29d511a6/?size=48"
type="image/png;width=48;height=48;scale=1"/>
<link type="text/html" href="/content/mali-pour-les-nuls_fr_all_2022-11" />
<author>
<name>Youtube Channel “Le Mali Pour Les Nuls”</name>
</author>
<publisher>
<name>Kiwix</name>
</publisher>
<dc:issued>2022-11-10T00:00:00Z</dc:issued>
<link rel="http://opds-spec.org/acquisition/open-access" type="application/x-zim" href="https://download.kiwix.org/zim/videos/mali-pour-les-nuls_fr_all_2022-11.zim.meta4" length="139335680" />
</entry>The bookName is present inside the link to the reader
<link type="text/html" href="/content/mali-pour-les-nuls_fr_all_2022-11" />One could parse the link to extract the identifier but if it's a first-class input for our endpoints, maybe it deserves its own property?
It would prevent breaking access to it when changing our reader URLs but on the other end, despite its use, we don't want to consider it an identifier… just a pretty-URL-part