sharun-s / kiwix-html5

My fork of Kiwix-JS (standalone mode - no extension/server/app required)
GNU General Public License v3.0
2 stars 0 forks source link

Use another zim file #7

Open cptolemy opened 3 years ago

cptolemy commented 3 years ago

Hi,

Great code by the way. I have, however, a problem: I am trying to use a wikipedia zim file (wikipedia in english with pictures or in other language). Still, at the start of index.html in the www folder the file doesn't appear, and if I rename it Ray_5.zim it gives an "entry article error".

I assume that I must define these properties (name, filename and main article) somewhere in the js code? Could someone help please?

Best regards,

Ptolemy

sharun-s commented 3 years ago

Are you sure you want to be using this repo? Its been a long long time since I looked at the code so what zim file formats this repo works with might be totally outdated. I recommend you check out the main kiwix-js repo and message mossroy or jaifroid there for the latest news.

As to this repo, from what I remember off hand just changing the file name wont work ( Firefox local file access policies prevent local file object creation - so the app creates a "pseudo file object" of all known zim archives to "bypass" file object creation). You will probably have to add that entry.

First try, placing your zim file in the kiwix-html5/www directory and check if it gets detected and appears in settings/detected archive page.

If not you probably have to add the "pseudo file object" entry in kiwix-html5/www/js/lib/knownArchives.js then it may show up on the settings page.

(To work out how to produce that entry - look at https://github.com/sharun-s/kiwix-html5/issues/5 you are probably specifically interested in just step 9 scripts/GenerateKnownArchives.html which produces the psuedo file object entry that needs to be cut and pasted into knownArchives.js)

May be just simpler to use the main kiwix-js repo :)