Wikimedia

Automatically download missing ZIM files when compiling Kiwix custom Android apps

Custom apps are "special" Kiwix apps which are pre-packaged with a content. The multiple custom apps we propose are configured through dedicated JSON files, available in the "custom" directory of our Android source code.

In each JSON file, there is a property "zim_file" which is a path to the ZIM content file on the local file system. We want this to also allow a valid HTTP URL to avoid the burden of downloading/syncing the file each time manually.

Steps to reproduce:

  1. Compile a custom app, for example "Wikimed"
  2. Have a look to the corresponding JSON file at custom/wikimed/info.json

What you get:

  • "zim_file" path is "custom/wikimed/content.zim"

What we want:

What to do:

  • Modify gen-custom-android-build.py script to download if necessary a new version of the ZIM file from the internet and then continue like before the app creation.

Additional instructions and help are located in the GitHub Issue

How to step-in in development: http://wiki.kiwix.org/wiki/Google_Code-in If you have any questions don't hesitate to contact us or ask for more time.

Task tags

  • python
  • kiwix
  • android

Students who completed this task

fba

Task type

  • code Code
close

2016