Re: How to include attachment in a page by a script
Florian Festi <[email protected]> Thu, 22 Jul 2004 15:34:20 +0200 (METDST)
| Newsgroups | gmane.comp.web.wiki.moin.devel |
|---|---|
| Message-ID | <Pine.HPX.4.60.0407221522240.12811@rupert.informatik.uni-stuttgart.de> |
> 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 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click