[Moin-user] Programmatic creating/editing of pages

Philip Colmer philip.colmer at linaro.org
Mon Jan 12 05:49:27 EST 2015

I've written a script that, every night, checks that the organisational
pages are built from data taken from our LDAP directory.

The code to do the page bit looks like this:

            editor = PageEditor(request,
                text = editor.normalizeText(personMainBody.getvalue())
                    editor.saveText(text, 0)

It works fine except for two areas that I'd like to overcome if the Moin
API permits it:

1. I'd prefer NOT to have page history for these pages. It takes up disc
space and isn't really necessary.

2. I'd prefer NOT to have changes to these pages show up in the
RecentChanges list. The reason for this request is because part of the
update process requires me to update the photos for each person. Since I
can't (easily) do a file comparison to see if the photo has changed, I
replace all of the photos anyway just to be on the safe side. That is 200
file updates every night which then swamps the RecentChanges list.

The bit of code that does the photo is:

        if (person.photo != ''):
'Internal/meet-the-team/{0}'.format(pnNormalised), "profile.jpg",
person.photo, overwrite=1)

Does the API support either of options to reduce noise/files?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20150112/b5724ba6/attachment.html>

More information about the Moin-user mailing list