Changes

Line 20: Line 20:  
== Download the wikipedia base activity ==
 
== Download the wikipedia base activity ==
   −
You will need to download the wikipedia base from http://dev.laptop.org/~gonzalo/wikiserver/WikipediaBase-33.xo. This package includes the activity and the tools to create the data files.
+
You will need to download the wikipedia base from http://dev.laptop.org/~gonzalo/wikiserver/WikipediaBase-35.xo. This package includes the activity and the tools to create the data files.
    
You need to unzip it in your Activities directory, or install it, if you do not have another wikipedia activity already installed.
 
You need to unzip it in your Activities directory, or install it, if you do not have another wikipedia activity already installed.
   −
The git repository is here http://dev.laptop.org/git/projects/wikiserver .
+
The git repository is here https://github.com/godiard/wikipedia-activity .
    
== Download a Wikipedia dump file==
 
== Download a Wikipedia dump file==
Line 128: Line 128:     
  mv eswiki-20111112-pages-articles.xml.processed_expanded eswiki-20111112-pages-articles.xml.processed
 
  mv eswiki-20111112-pages-articles.xml.processed_expanded eswiki-20111112-pages-articles.xml.processed
  ../tools2/create_index.py --delete_all
+
  ../tools2/create_index.py --delete_old
   −
The option --delete_all is used to remove the old index
+
The option --delete_old is used to remove the old index
    
If you want to include images in your wikipedia activity, you can go again to your data directory and do:
 
If you want to include images in your wikipedia activity, you can go again to your data directory and do:
Line 157: Line 157:  
in the header and replace the entities for stroke_color and fill_color, after that.
 
in the header and replace the entities for stroke_color and fill_color, after that.
   −
* activity_''lang''.py: is the startup class, sets the configuration values and starts the server.
+
 
 +
* '''DEPRECATED, SEE BELOW:''' activity_''lang''.py: is the startup class, sets the configuration values and starts the server.
 
You can copy the class from another language and set the parameters. You need set the name of the class,
 
You can copy the class from another language and set the parameters. You need set the name of the class,
 
equal than the value in the exec value in the activity/activity.info.lang file.
 
equal than the value in the exec value in the activity/activity.info.lang file.
Line 166: Line 167:  
If you create your favorite list based in a translation of the home page from other language, would be a good idea translate the home page too.  
 
If you create your favorite list based in a translation of the home page from other language, would be a good idea translate the home page too.  
   −
Now, you can test your changes, starting the wikipedia server:
+
 
 +
'''DEPRECATED, SEE BELOW:''' Now, you can test your changes, starting the wikipedia server:
    
  ./activity_''lang''.py es_lat/eswiki-20111112-pages-articles.xml 8000
 
  ./activity_''lang''.py es_lat/eswiki-20111112-pages-articles.xml 8000
Line 183: Line 185:     
Now, in the directory dist, a new .xo file will be created and you can distribute it.
 
Now, in the directory dist, a new .xo file will be created and you can distribute it.
 +
 +
=== Notes on updates in the process ===
 +
 +
After version 38, with the intention of make more standard the process to allow package the activity
 +
in distributions, we added a standard setup.py. To use it, is needed add the wikipedia initialization
 +
parameters to the activity.info file, as is displayed in the file activity.info.en_simple
 +
 +
https://github.com/godiard/wikipedia-activity/blob/master/activity/activity.info.en_simple
 +
 +
[Wikipedia]
 +
path = en_simple/simplewiki-20130724-pages-articles.xml
 +
port = 8011
 +
home_page = /static/index_en_simple.html
 +
templateprefix = Template:
 +
wpheader = From Wikipedia, The Free Encyclopedia
 +
wpfooter = Content available under the
 +
  <a href="/static/es-gfdl.html">GNU Free Documentation License</a>.
 +
  <br/> Wikipedia is a registered trademark of the non-profit
 +
  Wikimedia Foundation, Inc.<br/><a href="/static/about_en.html">
 +
  About Wikipedia</a>
 +
resultstitle = Search results for '%s'.
 +
 +
Another change important is that now is not needed create a activity_<lang>.py file,
 +
because the activity starts and read the config from the activity.info file, the "exec" line need be:
 +
 +
exec = sugar-activity activity.WikipediaActivity
 +
 +
Then to create the .xo you can do:
 +
 +
./setup.py dist_xo es_lat/eswiki-20111112-pages-articles.xml
 +
 +
or to create the sources tar.bz2 file:
 +
 +
./setup.py dist_source es_lat/eswiki-20111112-pages-articles.xml
 +
 +
With this new version, testing the wiki can be done on the command line doing:
 +
 +
./test_server.py es_lat/eswiki-20111112-pages-articles.xml 8000
 +
 +
The two parameters are optional, if are not provided, the parameters in activity.info file will be used.
    
== Other changes needed ==
 
== Other changes needed ==
628

edits