[Pywikipedia-l] Rewrite status report #2

Russell Blau russblau at imapmail.org
Mon May 5 18:19:13 UTC 2008


By request, here is an update for interested persons on the status of the 
rewrite branch.

The major purpose of the rewrite branch is to implement a bot framework that 
uses the new MediaWiki API (see http://www.mediawiki.org/wiki/API for 
details) instead of the old approach of scraping HTML wiki pages.  Note that 
many other potential areas for a rewrite have been suggested on this list, 
and at http://www.botwiki.sno.cc/wiki/Rewrite, but most of those are not 
currently being pursued due to a lack of resources.

The software in the rewrite branch currently is runnable, but incomplete, 
and with limited documentation.  For the most part, the bot programming 
interface is intended to be very similar to the interface used in the 
current pywikipedia trunk, so that bot programs can be ported easily, but 
there are significant changes that we have started to document in the file 
README-conversion.txt.  To date, most methods of the Page object that read 
from the wiki have been implemented; you can, for example, instantiate a 
Page object, get its text, and retrieve its templates, links, categories, 
backlinks, and so forth (interwiki links other than language links are not 
yet implemented).  Methods that provide Site-wide lists of pages (allpages, 
allcategories, randompages, etc.) have not yet been implemented, but this is 
next on my to-do list.  Most methods in the existing framework that 
manipulate wiki text have not yet been ported (things like 
replaceCategoryLinks), but these should require very few changes.

The ability to save changes to the wiki is *not* yet implemented.  Note that 
the MediaWiki API does now have the ability to edit pages, but this has not 
yet been activated on any WMF wikis, so once editing is implemented in the 
bot framework, it still will be of limited use.

At the moment, I am doing most of the development work on this branch. 
Valhallasw contributed the http interface, nicdumz has contributed some 
user-related methods, and although he has not contributed directly, I have 
stolen^H^H^H^H^H^Hbeen inspired by some of Bryan Tong Minh's ideas from his 
mwclient project.  Let me make it clear that I do not consider this "my" 
project by any means; anyone who is willing and able to contribute will be 
most welcome.  It may be helpful for any new contributors to announce which 
aspects of the code they are planning to work on, to avoid duplication of 
effort.

Russ




More information about the Pywikipedia-l mailing list