[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_issue_trim_states.py:1.1
Ken Manheimer
klm@zope.com
Wed, 17 Oct 2001 22:29:53 -0400
Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv14894/skins/collector
Added Files:
collector_issue_trim_states.py
Log Message:
Pare out irrelevant states reported by the catalog (from other types
that use 'review_state'), and trim '_confidential' from the remaining
ones, eliminating resulting duplicates.
=== Added File CMF/CMFCollector/skins/collector/collector_issue_trim_states.py ===
## Script (Python) "collector_issue_trim_states.py"
##title=Return massaged list of states of issues in catalog.
# Pare out irrelevant states and trim '_confidential' from the rest.
import string
states = context.portal_catalog.uniqueValuesFor('review_state')
got = []
for i in states:
if i in ['private', 'published']:
continue
trim = string.split(i, '_')[0]
if trim not in got:
got.append(trim)
return got