[CMF-checkins] CVS: Products/CMFCore - utils.py:1.57

Stefan H. Holek stefan at epy.co.at
Sat Jul 31 08:59:13 EDT 2004


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv5764/CMFCore

Modified Files:
	utils.py 
Log Message:
Add contributorsplitter() utility function.


=== Products/CMFCore/utils.py 1.56 => 1.57 ===
--- Products/CMFCore/utils.py:1.56	Tue Jul 13 12:49:39 2004
+++ Products/CMFCore/utils.py	Sat Jul 31 08:58:37 2004
@@ -631,6 +631,20 @@
     return out
 
 #
+#   Metadata Contributors splitter utilities
+#
+CONTRIBSPLITRE = re.compile(r';')
+
+security.declarePublic('contributorsplitter')
+def contributorsplitter( headers
+                       , names=('Contributors',)
+                       , splitter=CONTRIBSPLITRE.split
+                       ):
+    """ Split contributors out of headers, keyed on names.  Returns list.
+    """
+    return keywordsplitter( headers, names, splitter )
+
+#
 #   Directory-handling utilities
 #
 security.declarePublic('normalize')



More information about the CMF-checkins mailing list