[CalendarServer-changes] [8309] CalendarServer/trunk/calendarserver/tools/shell.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Nov 16 16:21:51 PST 2011
Revision: 8309
http://trac.macosforge.org/projects/calendarserver/changeset/8309
Author: wsanchez at apple.com
Date: 2011-11-16 16:21:51 -0800 (Wed, 16 Nov 2011)
Log Message:
-----------
Useful listing for calendars
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/shell.py
Modified: CalendarServer/trunk/calendarserver/tools/shell.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell.py 2011-11-16 23:19:43 UTC (rev 8308)
+++ CalendarServer/trunk/calendarserver/tools/shell.py 2011-11-17 00:21:51 UTC (rev 8309)
@@ -500,14 +500,20 @@
@inlineCallbacks
def list(self):
- objects = (yield self.calendar.calendarObjects())
+ result = []
- returnValue((
- "%s (%s)" % (o.uid(), o.componentType())
- for o in objects
- ))
+ for object in (yield self.calendar.calendarObjects()):
+ component = (yield object.component())
+ mainComponent = component.mainComponent()
+ componentType = mainComponent.name()
+ #componentType = (yield object.componentType())
+ summary = mainComponent.propertyValue("SUMMARY")
+ result.append("%s %s: %s" % (object.uid(), componentType, summary))
+ returnValue(result)
+
+
def main(argv=sys.argv, stderr=sys.stderr, reactor=None):
"""
Do the export.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111116/c382adc1/attachment.html>
More information about the calendarserver-changes
mailing list