Jump to: navigation, search


1,694 bytes added, 16:56, 22 December 2011
no edit summary
This page describes how to create the data files needed to create a wikipedia activity like
[ Wikipedia es] or [ Wikipedia en]
The general idea is download a xml file with a dump (backup) with the state of the wikipedia pages, and process it to select a number of pages, and compress them, to include in a activity. Optionally, is possible download the images used in that pages.
You will need a computer with a lot of space on disk, and a working Sugar environment. May be using packages provided by your linux distribution or in a virtual machine. The wikipedia xml file is big (almost 6 GB to the spanish wikipedia, bigger in english), and you need more space to generate temporary files. The process takes a lot of time too, but is automatic, you only need check states at finish of every stage.
This page is a work in progress. If you have doubts or the information provided is not good enough, please contact me at gonzalo at laptop dot org and I will try to improve it.
== Download the wikipedia base activity ==
You will need download the wikipedia base from This file include the activity and the tools to create the data files.
You need create a directory in your Activities directory for example WikipediaEs.activity and unzip inside.
== Download a dump ==
Create a directory inside the activity and download the wikipedia dump file
Wikipedia provide a almost daily xml files dump for every language.
This test was done with the spanish dump. The file used was eswiki-20111112-pages-articles.xml.bz2 from need create a directory inside the create activity and download the wikipedia dump file
The first two letters from your directory must be the language code example: es_es or en_us
in another directory to acelerate the process.
== Create Modify your new activity to use the data files == You need can modify the file and modify the lines:  self.WIKIDB = 'es_new/eswiki-20111112-pages-articles.xml' self.HOME_PAGE = '/static/index_es.html' to point to your new data files or create a new different file, for example If you create a new file, you will need modify the file activity/ to point to this new file.
TODOYou can create a new icon too, or modify the existing activity/activity-wikipedia-es.svg file.

Navigation menu