hugolabe / Wike

Wikipedia Reader for the GNOME Desktop
https://hugolabe.github.io/Wike/
GNU General Public License v3.0
231 stars 32 forks source link

Offline cache #121

Closed vanillajonathan closed 1 year ago

vanillajonathan commented 1 year ago

Alice is in the arctic without any internet connectivity. Bob is on a boat and have no internet connectivity. Clare is in the jungle without any internet connectivity. Dave is in the desert without any internet connectivity. They all need information!

Wike could offline cache visited articles and fallback to that offline cache if it cannot connect to Wikipedia.

hugolabe commented 1 year ago

This has already been discussed other times: #15 #104

It's quite complicated (as Wike works) and is outside the scope of the app. There are other alternatives for those who require offline access to Wikipedia.

vanillajonathan commented 1 year ago

It seems there is a library for this. https://requests-cache.readthedocs.io

hugolabe commented 1 year ago

It seems there is a library for this. https://requests-cache.readthedocs.io

Requests is only used to perform searches and something else, but not to get the content of the articles. The article view is nothing more than the Wikipedia web page tweaked by css injection.

vanillajonathan commented 1 year ago

Maybe set_enable_offline_web_application_cache, set_enable_page_cache or WebContext.new_with_website_data_manager could be of interest.