wik icon indicating copy to clipboard operation
wik copied to clipboard

Feature Request: Work with offline ZIM files/kiwix

Open klundry opened this issue 1 year ago • 3 comments

It would be really nice to be able to use wik in conjunction with local offline wikipedia dumps. I'm not a programmer but I'm a big command line enthusiast and I tried modifying the wiki URL in info.py to the local one I'm running. It will display an article when giving the exact name but doesn't return any results when searching. I'm clearly out of my element here :) but it doesn't appear to be too far away from being able to do it. Thoughts?

klundry avatar Jul 07 '22 21:07 klundry

wik is web-scrapping based tool so i don't know if the offline dumps (the one you're talking about) have same elements names (tags,class,id) as the original Wikipedia when searching. I would love to into it if can share the source code of web-page when searching for the article in web-browser.

yashsinghcodes avatar Jul 10 '22 05:07 yashsinghcodes

Cool. I'll see if I can paste some of the html that it produces. I'm using kiwix and the CLI tool kiwix-serve to serve the archive and the pages have a more basic and simplified layout that regular wikipedia. If wik can be modified to work with the ZIM files I wonder if it would then work with any of the ZIM files that kiwix has available? That would be pretty neat.

klundry avatar Jul 11 '22 14:07 klundry

I don't think so, as they might use different tags and class names for different zim files, for example if you take arch wiki zim files it is totally different in terms of formatting. Hope it makes sense

yashsinghcodes avatar Jul 14 '22 11:07 yashsinghcodes

The thread is no longer active hence closing. Will look into the feature request in future. Thanks

yashsinghcodes avatar Mar 13 '23 17:03 yashsinghcodes