[Zope-CMF] multiple publish of Documents, Images

Jens Hauser Jens Hauser" <hauser@jam-gmbh.de
Tue, 17 Sep 2002 20:00:24 +0200


Hi all,

I've searched this mailing list through and even found some helpful hints on
the following problem:

I want to publish an amount of Documents or images which I sent to one of my
Zope sites by FTP. Therfore I don't want to use the "desktop" to publish each
of those items manually.

So I tried to use the python script I found with this mailing list (posted by,
I think, Tres):

#####CUT

### Parameters items, comment=''
wf_tool = context.portal_workflow # XXX getToolByName
for path in items:
     object = context.restrictedTraverse( path )
     wf_tool.doActionFor( object, 'publish', comment=comment )

#####CUT


I run this script through the following dtml method:

#####CUT
#Title  publish_test

<dtml-let folder_url=absolute_url>
<dtml-let upObject="this().aq_parent">
<dtml-with upObject>

    <dtml-in expr="objectValues( [ 'Portal Folder', 'Folder' ] )" 
      sort=id skip_unauthorized>
      <dtml-if expr="id <> 'allgemeines' and id <> 'img' and id <> 'pdf' and
id <> 'aktuelles' and id <> 'Members' and id <> 'news' and id <> 'thumbs'">
        <dtml-var "publish_all(id)">
      </dtml-if>
    </dtml-in>


</dtml-with>
</dtml-let>
</dtml-let>

#####CUT

by using www.zope-domain.de/kitchen-aid/publish_test

The problem is: It doesn't publish any image, that lies within that directory
... :-(

Am I completely wrong?

Best regards,
Jens Hauser

j.a.m. GmbH
Computer, Systemberatung, Webhosting, Softwareentwicklung
Eschersheimer Landstraße 471
60431 Frankfurt am Main
fon (069) 46 09 88 - 13
fax (069) 46 09 88 - 78
url http://www.jam-gmbh.de

Haben Sie schon Jamail probiert? Den eMailer für personalisierte Serien-Mails? Jetzt testen: http://www.jamail.de 
Already tried Jamail? Visit the personalized massmailer @ http://www.jamail.de/us/

-----------------------
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.