kiwix / kiwix-js

Fully portable & lightweight ZIM reader in Javascript
https://www.kiwix.org/
GNU General Public License v3.0
283 stars 125 forks source link

Support OPDS #489

Open kelson42 opened 5 years ago

kelson42 commented 5 years ago

OPDS is the new way to deliver the ZIM catalog. See https://wiki.kiwix.org/wiki/OPDS Would that be possible to support OPDS in Kiwix JS?

Jaifroid commented 5 years ago

@kelson42 Three questions about this (related to Kiwix JS Windows, which has an implementation of a download library):

  1. Are there plans to deprecate direct browsing of http://download.kiwix.org/zim/ for directories and filenames? I currently scrape those indices for filenames in Kiwix JS Windows. Not the right way, I know... NB I get the download links from the .meta4 file, so users of the app have a choice of mirrors.

  2. Currently I can get the torrent for a given ZIM by adding .torrent instead of .meta4 on the filename, and this works. Can I still rely on that?

  3. Have all "split" versions of ZIM files been deprecated (.zimaa .zimbb etc.)? There are now only quite old files in http://download.kiwix.org/zim/portable/. If so, I should remove my "portable" links.

I know the right way is to query the catalog, but it may take some time to develop...

kelson42 commented 5 years ago
1. Are there plans to deprecate direct browsing of `http://download.kiwix.org/zim/` for directories and filenames? I currently scrape those indices for filenames in Kiwix JS Windows. Not the right way, I know... _NB I get the download links from the `.meta4` file, so users of the app have a choice of mirrors._

No

2. Currently I can get the torrent for a given ZIM by adding `.torrent` instead of `.meta4` on the filename, and this works. Can I still rely on that?

Yes

3. Have all "split" versions of ZIM files been deprecated (*.zimaa *.zimbb etc.)? There are now only quite old files in `http://download.kiwix.org/zim/portable/`. If so, I should remove my "portable" links.

Yes

mossroy commented 5 years ago

Listing and downloading ZIM files from the app is currently not implemented in kiwix-js. We simply point to https://download.kiwix.org/zim/. @Jaifroid has implemented some logic inside kiwix-js-windows (without OPDS)

kelson42 commented 2 years ago

The OPDS stream has been strongly developed and as soon as libkiwix10 is release (in a few days) should be considered ready to use. A pure OPDS reader is now available in kiwix serve welcome page.

Jaifroid commented 2 years ago

@kelson42 Is the pure OPDS reader implemented in JS, do you know?

kelson42 commented 2 years ago

@Jaifroid yes, you can try it by downloading a nightly build of kiwix-serve. The js code is in the libkiwix for the moment. I'm perfectly aware that such a piece of software/js library would benefit to many of our solutions and therefore if your are happy with it we could/should consider to isolate it to simplify maintenance/integration.