[Zope-CMF] how do I manipulate a CMF document programatically?

Frank McGeough fm@synchrologic.com
Tue, 14 Aug 2001 11:41:37 -0400


Excuse me for being dense but

<dtml-let
docData="_.string.split(Members.staff.SampleDoc.EditableText(),'\n')"
>

just gets mad at me with :

Error Type: AttributeError
Error Value: EditableText

Is the method not on the object that I'm manipulating?

----- Original Message -----
From: "Tres Seaver" <tseaver@palladion.com>
To: "Frank McGeough" <fm@synchrologic.com>
Cc: <zope-cmf@zope.org>
Sent: Tuesday, August 14, 2001 9:42 AM
Subject: Re: [Zope-CMF] how do I manipulate a CMF document programatically?


> Frank McGeough wrote:
>
> > If I have members that have created CMF documents and I want to
manipulate
> > those documents programatically, how would I proceed?
> > An example of the need is suppose I have a bunch of documents that
people
> > have written that refer to "Fuzzbot Generic Tummy Scratcher" and my
company
> > renames this to be "Fuzzbot Generic Back Scratcher" as they reposition
> > themselves in the Fuzzbot market. I'd like to run a little Python script
> > that goes through and replaces the former with the latter but I'm not
sure
> > how to do this. I can't seem to figure out how to get at the contents of
the
> > objects.
>
> The 'EditableText' method should give you the raw HTML or StructuredText
>
> of the documents;  you would manipulate the value, and then poke it
> back in using the 'edit' method (which also requires that you pass the
> 'text_format').
>
>
> Tres.
> --
> ===============================================================
> Tres Seaver                                tseaver@zope.com
> Zope Corporation      "Zope Dealers"       http://www.zope.com