1.1 --- a/imiptools/__init__.py Mon Nov 02 20:55:10 2015 +0100
1.2 +++ b/imiptools/__init__.py Mon Nov 02 21:09:48 2015 +0100
1.3 @@ -26,7 +26,7 @@
1.4 from imiptools.data import get_address, get_addresses, get_uri
1.5 from imiptools.mail import Messenger
1.6 import imip_store
1.7 -import sys
1.8 +import sys, os
1.9
1.10 # Postfix exit codes.
1.11
1.12 @@ -183,7 +183,42 @@
1.13
1.14 args = sys.argv[1:]
1.15
1.16 - if "-d" in args:
1.17 + if "--help" in args:
1.18 + print >>sys.stderr, """\
1.19 +Usage: %s [ -o <recipient> ... ] [-s <sender> ... ] [ -l <socket> | -L ] \\
1.20 + [ -S <store directory> ] [ -P <publishing directory> ] \\
1.21 + [ -p <preferences directory> ] [ -d ]
1.22 +
1.23 +Address options:
1.24 +
1.25 +-o Indicate the original recipients of the message, overriding any found in
1.26 + the message headers
1.27 +-s Indicate the senders of the message, overriding any found in the message
1.28 + headers
1.29 +
1.30 +Delivery options:
1.31 +
1.32 +-l The socket filename for LMTP communication with a mailbox solution,
1.33 + selecting the LMTP delivery method
1.34 +-L Selects the local SMTP delivery method, requiring a suitable mail system
1.35 + configuration
1.36 +
1.37 +(Where a program needs to deliver messages, one of the above options must be
1.38 +specified.)
1.39 +
1.40 +Configuration options:
1.41 +
1.42 +-S Indicates the location of the calendar data store containing user storage
1.43 + directories
1.44 +-P Indicates the location of published free/busy resources
1.45 +-p Indicates the location of user preference directories
1.46 +
1.47 +Output options:
1.48 +
1.49 +-d Run in debug mode, producing informative output describing the behaviour
1.50 + of the program
1.51 +""" % os.path.split(sys.argv[0])[-1]
1.52 + elif "-d" in args:
1.53 self.process_args(args, sys.stdin)
1.54 else:
1.55 try: