[Moin-devel] Generate and Modify Pages with python

Thomas Waldmann tw-public at gmx.de
Fri Feb 18 09:35:28 EST 2005


Hi kent,

> I just install 1.3.3 and find out that pages structure
> is more complicate then before.

Yes, that change was necessary to get rid of that "mtime mess".

> I try to follow the MoinDev/Storage and try a 
> from MoinMoin.Page import Page
> page = Page("NewPage")
> but it fails.

You need to use PageEditor / _write_file if you do it that way.

Or look into the standardized(!) xmlrpc interface (see 
MoinMoin/scripts/xmlrpc/... - very easy to use from python scripts, 
maybe from other languages with xmlrpc lib, too).

Be aware that you have to enable that by modifying the wikirpc.py file.

As xmlrpc is a standard (and xmlrpc2 is an almost-standard), it is 
unlikely that that stuff changes.

BTW: better choose wiki xmlrpc v2, much better to use than wiki xmlrpc  v1.

> Will the future change again?

Yes, we will further enhance the storage stuff for making moin more 
versatile and powerful, while making the code simpler and more structured.

1.4devel already uses generic "mimetype items", not pages. Metadata is 
stored separately. The code handling that will be object oriented and 
exploiting inheritance.

Maybe we will even switch to have a directory with a collection of files 
*per revision*, so we can store multi-file data as twikidraw creates it 
(drawing.draw, drawing.map, drawing.png). Of course this would be the 
most generic solution, but it costs 1 additional directory per item 
revision (and often it will contain only 2 files).

We know that those structures are of course more complicated to handle 
by shell scripts than in <=1.2.x, but we try to keep that possibility by 
using some easy text based data formats.

Thomas




More information about the Moin-devel mailing list