Changes

Jump to navigation Jump to search
no edit summary
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.
 +
 +
With this changes
    
== Other changes needed ==
 
== Other changes needed ==
628

edits

Navigation menu