Sunday, February 27, 2011

Changing profile/index location for Kiwix on Windows

Quick primer : Go to
Changing profile / index location for Kiwix on Windows. This can also be taken as a guide for pre-installing indexes for your zim files.
1. Go to a path like this: E:\Users\NIKHIL\AppData\Roaming\\Kiwix
--this path is for Windows 7 and Vista and on my PC the OS is on E: drive; for Windows XP it would probably be like
C:\Documents and Settings\Nikhil\Application Data\\Kiwix
2. Open profiles.ini to edit (just double-click or open with Notepad or whatever text editor you use)
Add these lines to whatever’s already there:
Path=C:\Kiwix Profile
3. Make the new folder (“C:\Kiwix Profile” here), leave it empty, run kiwix once and then close it. After running you'll find all sorts of files have been created inside "C:\Kiwix Profile".
4. Shift the index folder from old to this new profile folder and rename it to something legible like "wikipedia_en_wp1_0.8_45000+_12_2010_rc1.zim.idx" (note: this is a folder, not a .idx file. All index folders have .idx or .index at the end.) so you can identify it with your zim file rather than those weird long alphanumeric names. See the library.xml in the old profile folder to figure out which .idx folder is for which zim file in case you’ve loaded multiple zims by now.
In case you don’t have it already, I’ve uploaded some indexes (incl. for the latest english wikipedia zim) on this shared online folder: You can directly download and unzip them to the new profile (using 7-zip).
5. Open library.xml inside the profile in a text editor and make a change like this:
<library current="4dd18dea-9afd-080a-080a-50c68d62072f5675"><book id="4dd18dea-9afd-080a-080a-50c68d62072f5675" path="C:\Wikipedia\wikipedia_en_wp1_0.8_45000+_12_2010_rc1.zim" last="1298420521" indexPath="C:\Kiwix Profile\wikipedia_en_wp1_0.8_45000+_12_2010_rc1.zim.idx" indexType="xapian"/></library>
Take care of your absolute paths.
6. To add more indexes, simply repeat the steps and remember to vary the ‘book id’ variable in library.xml. Also you may set last=”undefined”. It should all be between the <library …> </library> tags.
7. Now run Kiwix again. Hopefully it should be done.

1 comment:

Kelson said...

I'm working on a feature allowing in the (new) preferences dialog box to change the path of the profile.

By changing it, using the file picker, the old profile will be moved to the new location or if the new location already is a profile folder, will use it.

Related Posts with Thumbnails