[CalendarServer-changes] [7471] CalendarServer/branches/users/glyph/new-export/calendarserver/tools/ export.py

source_changes at macosforge.org source_changes at macosforge.org
Mon May 16 07:45:25 PDT 2011


Revision: 7471
          http://trac.macosforge.org/projects/calendarserver/changeset/7471
Author:   glyph at apple.com
Date:     2011-05-16 07:45:25 -0700 (Mon, 16 May 2011)
Log Message:
-----------
usage patterns are implemented, so we can get rid of that message

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py

Modified: CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py
===================================================================
--- CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py	2011-05-16 14:45:11 UTC (rev 7470)
+++ CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py	2011-05-16 14:45:25 UTC (rev 7471)
@@ -36,7 +36,6 @@
 per-user data such as alarms.
 """
 
-import os
 import sys
 from getopt import getopt, GetoptError
 from os.path import dirname, abspath
@@ -60,24 +59,10 @@
     if e:
         print e
         print ""
-
-    name = os.path.basename(sys.argv[0])
-    print "usage: %s [options] [input_specifiers]" % (name,)
-    print ""
-    print "Generate an iCalendar file containing the merged content of each calendar"
-    print "collection read."
-    print __doc__
-    print "options:"
-    print "  -h --help: print this help and exit"
-    print "  -f --config: Specify caldavd.plist configuration path"
-    print "  -o --output: Specify output file path (default: '-', meaning stdout)"
-    print ""
-    print "input specifiers:"
-    print "  -c --collection: add a calendar collection"
-    print "  -H --home: add a calendar home (and all calendars within it)"
-    print "  -r --record: add a directory record's calendar home (format: 'recordType:shortName')"
-    print "  -u --user: add a user's calendar home (shorthand for '-r users:shortName')"
-
+    try:
+        ExportOptions().opt_help()
+    except SystemExit:
+        pass
     if e:
         sys.exit(64)
     else:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110516/95b87eaa/attachment.html>


More information about the calendarserver-changes mailing list