[Moin-devel] How to include attachment in a page by a script

Florian Festi festifn at rupert.informatik.uni-stuttgart.de
Thu Jul 22 06:35:10 EDT 2004


> I haven't found any way to include an attachment in a page by a script, so I
> schedule to make a python script to do that (I have arround 1000 files to
> include).
>
> I have found that when attaching a file, MoinMoin :
> -puts the attached file in the 'attachments' subdirectory of the page
This is more or less all you need to do.

> -updates 'data/editlog' (from add.editlog.py)
You only need to do this if the new added files should show up in the 
RecentChanges. For 1000 files you perhaps don't want to touch editlog.

> -updates 'data/dicts.pickle' (must be in scandicts.wikidicts.py)
dicts.pickle contains cached data collected from page contents. Groups 
(for ACLs) and Dicts which will allow to put data on pages. As long as you 
don't chagen page contents you don't to update this pickle. Nevertheless 
it gets rebuild if deleted and updated from time to time.

Generally speaking, is there any guide or introduction about the
organization of MoinMoin scripts ?

There are some infos in the MoinMoin wiki 
(http://moinmoin.wikiwikiweb.de/MoinDev) but they are notoriously weak and 
outdated. If people ask there questions on the propoer pages this might 
perhaps get better... (I have doubts...)

For more complicated tasks (like creating new pages) it is best to write 
Python scripts that just use the MoinMoin code. There is also a XMLRPC 
interface, but it is not in a very good state because it is not really in 
use.

 	cu

 		FlorianFesti




More information about the Moin-devel mailing list