A beta of the offline Wikipedia server is available for download

First: Today I had found some time to iron out some nasty bugs:

  • The handling of the “language.config” files is now much improved. For the German version (or other languages of course) the correct month and day names are now also stored in that file.
  • Templates in template name are resolved: That make the “Main_Page” working. Including “Today’s featured article” and “On this day…”. Of course, the first is not changing so much.
  • Minor issues: The app is now compiled with -O3 optimization. Upon receiving a SIGTERM the socket is properly closed.

Unfortunately I was not able to set up a project on SourceForge or Google codes today. Only a lack of time. But if you like you can get the application and check it out by yourself. The link is below. But be warned: This is not easy.

There is not much documentation but here are some guidelines:

  • Read Thanassis Tsiodras article “Building a (fast) Wikipedia offline reader”
  • Don’t use his “quickstartindex.cc” but mine. You will find it in the folder “Changed quickstartindex”. Using my one will decode URL encoded titles. “Black%20&%20White” will become “Black & White” and is then indexed under this title.
  • Put everything in the “iPhone or iPod Touch (1.1.1) folder onto your device. I’ve added the proper directory structure so you should know where everything has to go.
  • Put the produced index and the splitted bz2-files to the proper folder on you’re device. Have a look into the zip and you know the right location.
  • English should work but I never put the 4.5 GB to my iPod touch. But I’ve checked it on my Mac. (BTW: 2.9 GB is the size of the bzip2 files, 1.5 GB is the size of the Xapian index).
  • If you like to use a different language: Create a folder with the language code as its name and copy the “language.config” from the German installation and edit it.
  • The application automatically detects which languages are installed. Every subfolder is scanned for a “language.config” file. But the main “index.html” is not aware of that. Change this file to the proper language code. Actually it is set to “de:” for the German version.
  • Start the wikisrv on you’re device using ssh. I prefer the port 80 on the device but 8080 on my Mac. 8080 is currently default. So I use “wikisrv -p 80 -v- &” to start the server on port 80. The -v- switch suppresses some info messages.

Some warnings:

  • I’m not responsible for any damage to you’re device or so. Mine is still working and it never needed a hard reset because of using the Wikipedia offline reader.
  • You might have found out that some knowledge about Darwin/Unix and a jailbroken device is necessary. So forget about using iTunes for copying or so. Use MacFuse, Cyberduck or something else. PuTTY, WS_FTP or other PC applications are fine, too.
  • Beware: This is beta and you will see some minor rendering issues. But most of the articles are displayed fine.

As soon as Apple has released the developer kit of the iPod touch/iPhone I will switch to this.

You can download the current version here: iKi_20080106.zip.

Have fun!

Leave a Reply