[Zope-CMF] multiple publish of Documents, Images

Jens Hauser Jens Hauser" <hauser@jam-gmbh.de
Thu, 19 Sep 2002 11:06:57 +0200


Hi Roel,

thanks for your answer. You're right, it's not looking into folders named
"img". But that's what I want. Within those directories only pictures are
available, which shouldn't be listed by a directory index at webuser side.

I'm interested in publishing those pictures, which are sent to all other
directories ...

Best regards,
Jens

On Wed, 18 Sep 2002 12:18:30 +0200, Roel Van den Bergh wrote:

>
>Your script states that 'img' objects don't need to be published
>Take a good look at your script :-)
>
>Roel.
>
>> From: "Jens Hauser" <hauser@jam-gmbh.de>
>> To: "zope-cmf@zope.org" <zope-cmf@zope.org>
>> Date: Tue, 17 Sep 2002 20:00:24 +0200
>> Reply-To: "Jens Hauser" <hauser@jam-gmbh.de>
>> Subject: [Zope-CMF] multiple publish of Documents, Images
>> 
>> 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 
>                                                     ^^^^^
>Here you define image objects NOT to be published
>
>> <> '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
>
>