openzim / librechef

Sushi Chef script for importing sushi-chef-libretext content
MIT License
1 stars 0 forks source link

Support for previous/next #18

Open rgaudin opened 3 years ago

rgaudin commented 3 years ago

Most in-book content have previous/next links at the end of each content. We should add this as well ; and could use the Previous Step / Next Step feature of kolibri to do so.

benoit74 commented 1 month ago

What is the "Previous Step / Next Step" feature of kolibri? Are you refering to a feature of the studio or a feature of openZIM scraper?

I consider this should probably be implemented in kolibri2zim (and other "readers") rather than in librechef / the HTML itself, since this navigation might differ depending on how the HTML is used.

rgaudin commented 1 month ago

I'm not sure anymore but I believe that this is about offering (eventually) a feature similar to the side arrows:

https://eng.libretexts.org/Bookshelves/Civil_Engineering/Book%3A_Building_Information_-_Representation_and_Management_-_Fundamentals_and_Principles_(Koutamanis)/02%3A_Building_Representation/2.01%3A_Representation

There you see you're in 2.1 and can click to right arrow and go to 2.2 which makes sense from a reader's perspective.

Same page in ZIM https://dev.library.kiwix.org/viewer#libretexts-engineering_en_2024-01/a22b7bc4cd7751439223bcf73b214e4d/index.html

You can't directly go to 2.2 ; you have to go back and select 2.2 in the cards.

So the user feature is in the ZIM but I believe we have no next/previous in the data. We have a parent node and siblings but that's all.

This could naively be implemented using the order in the collection and next/previous to siblings in that order. That can be directly implemented in kolibri2zim.

We could also consider those links to be more elaborate than this and record somewhere where they point to.

Obviously, I'd suggest the first option until there is an actual use case where it can not work.