[Zope] YIHAW latest file list

eric.n.dunn@bankofamerica.com eric.n.dunn@bankofamerica.com
Thu, 22 Aug 2002 15:29:41 -0400


The code was already in the YIHAW product (control panels)
I modified it for look and feel.
ZopeTime()-2,   gives the range to pull from catalog.  NOTE:  It blew up
after 20 days. I did not investigate since I only needed 2 days worth.
<dtml-unless "meta_type in ['DTML Method','Image','DTML Document','Yihaw
Folder']"> line ignores listed meta_types.  I only wanted Yihaw objects
visable.
Thanks for the help.  Will post to the group.

********************
<h2><font color="#336699"><dtml-var title_or_id></font></h2>
<p>
<dtml-comment> Items modified in the last 2 days
</dtml-comment>
<dtml-in "Catalog(bobobase_modification_time=ZopeTime()-2,
      bobobase_modification_time_usage='range:min',
      sort_on='bobobase_modification_time',
      sort_order='reverse')" size=50>
<dtml-with "Catalog.getobject(data_record_id_)">
<dtml-unless "meta_type in ['DTML Method','Image','DTML Document','Yihaw
Folder']">
<dtml-if "_.has_key('approved') and approved or not _.has_key('approved')">
<dtml-if icon><img src="<dtml-var SCRIPT_NAME>/<dtml-var icon>"
alt=""></dtml-if>
<span style="BACKGROUND-COLOR: #ffffcc">
<a href="&dtml-absolute_url;"><dtml-var title_or_id></a></span>
- modified <dtml-var bobobase_modification_time fmt=Date><br>
</dtml-if>
</dtml-unless>
</dtml-with>
</dtml-in>
</p>
********************




Andreas Jung <andreas@andreas-jung.com> on 08/22/2002 12:37:18 PM

Please respond to Andreas Jung <andreas@andreas-jung.com>

To:   zope@zope.org, Eric N. Dunn/USA/BAC@BankofAmerica
cc:
Subject:  Re: [Zope] File List



Why not create a ZCatalog with a FieldIndex on bobobase_modification_time.
Then you could use a range search on the ZCatalog.
Btw. Zope 2.6 comes with a DateRangeIndex. This might solve your problem
too.
Maybe you can steal it from the Zope 2.6 tree and use it under 2.5.X (not
tested).

Andreas
----- Original Message -----
From: <eric.n.dunn@bankofamerica.com>
To: <zope@zope.org>
Sent: Thursday, August 22, 2002 18:20
Subject: [Zope] File List


>
>
> I'm looking for a way to list all files (DTML Documents etc) created in
for
> the past two days.
>
> I found this
> http://www.zope.org/Members/hawkfish/zpt_list_files
> article
> but
> would like to know how to edit it to list all files created after certain
> dates or previous two days.
>
> Eric Dunn
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )