WikiBrowse Editing

From OLPC
Revision as of 19:14, 3 November 2010 by Martinlanghoff (talk | contribs) (Created page with 'This technique allows you to edit the encyclopedia articles in an existing Wikislice, using the WikiBrowse software. You can then prepare the edits, merging them into the co…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This technique allows you to edit the encyclopedia articles in an existing Wikislice, using the WikiBrowse software.

You can then prepare the edits, merging them into the compressed article database, and preparing a new '.xo' file for distribution.

This is a very rough solution -- not a finished product.

Usage

Setup the "server"

Note: You can run this on a machine for "local" editing, or on a server. In the case of a server, there is currently no authentication or security of any kind in this mode -- use it only within a safe local network.

Get the latest wikiserver code

git clone git://dev.laptop.org/users/martin/wikiserver

Unpack Wikipedia-XX.xo . In this case, we will experiment with Spanish Wikipedia-20 from http://dev.laptop.org/~cjb/eswiki/0.84/Wikipedia-20.xo

unzip Wikipedia-20.xo

Now copy the data files from Wikipedia-20.xo to the directory where the wikiserver code is. The data files usually start with a language-country prefix, followed by "xml.bz2". In this case, they start with es_PE.xml.bz2:

cp Wikipedia.activity/es_PE.xml.bz2* wikiserver/

Prepare a directory to store your edits

mkdir ~/wikipediaedits/

Running and stopping the server

Now to run the server,

(python server.py es_PE.xml.bz2 8000 ~/wikipediaedits/ 2>&1 ) | tee wikiserver.log

To stop the server, hit control-C . In every run, it will write a logfile (wikiserver.log). If you hit a bug or a problem, please include the logfile in the report.

Edit content

If you are running the above on a network server, open your webbrowser and go to http://<name-or-IP-of-server>:8080/ .

If you are running it on a single machine, and use http://localhost:8080/

With each page you will see an 'edit' link, leading to a form. Edit and submit your changes. The UI is extremely simple

Review changes

There is not webbased UI for change review at the moment. However you can review the changes from the commandline:

diff -ur ~/wikipediaedits/wiki.orig ~/wikipediaedits/wiki

Merge edits into data files

To create a new set of datafiles...

Create a new Wikipedia.xo

.

Workflow

.

Development notes

The software works as is. Motivated programmers are invited to tackle this informal TO DO list

  • Implement HTTP Auth 'Basic' for simple user/password protection
  • Use git for history.
    • Init a git repo, commit to it on every edit.
    • We will have to add files opportunistically -- it is a huge cost to git add the whole dataset.
    • Show file history via a gitweb/cgit cgi
  • Better UI
  • Track Seen/audited status for all pages for more integrated workflow