[Zope] automated setting of object properties?
Heiko Stoermer
heiko@mig.net
Tue, 07 Sep 1999 10:09:20 +0200
Darran Edmundson wrote:
> I wonder if someone could offer advice on how to
> accomplish the following ...
>
> I notice that in version 2.x of Zope, uploaded
> images autmagically get their height and
> width properties set appropriately. This was
> not the case with version 1.x, at least for
> content import via the fsimport external method.
>
> I imported a slew of content with Zope 1.x and thus have
> a lot of images with height and width properties
> of 0. I would like to write an external method
> to scan through my entire database setting the
> height/width fields to their correct values. So
> far I haven't had any luck getting this to work.
> Any advice would be much appreciated.
>
> Cheers,
> Darran.
>
Hi Darran,
maybe Ross Lazarus' external method "fileme"
(http://www.zope.org/pipermail/zope/1999-June/005060.html) can give you
some hints on traversing the zope tree and doing things to objects.
(fileme recursively saves zope folders and their sub-objects out to the
harddisk - but what you actually do to the object is not so important, I
think tree traversal should be the hardest).
btw: Ross would appreciate to receive an email notice if you download
fileme...
Hope this helps,
Heiko
--
Heiko Stoermer
MIG Augsburg