# HG changeset patch # User Paul Boddie # Date 1446494988 -3600 # Node ID a83aa13339c97b7641a54005b45504e86bc0f6ae # Parent 68aa336116d3e3c9c10977ee1170df04daec5983 Added a help message for handler programs. diff -r 68aa336116d3 -r a83aa13339c9 imiptools/__init__.py --- a/imiptools/__init__.py Mon Nov 02 20:55:10 2015 +0100 +++ b/imiptools/__init__.py Mon Nov 02 21:09:48 2015 +0100 @@ -26,7 +26,7 @@ from imiptools.data import get_address, get_addresses, get_uri from imiptools.mail import Messenger import imip_store -import sys +import sys, os # Postfix exit codes. @@ -183,7 +183,42 @@ args = sys.argv[1:] - if "-d" in args: + if "--help" in args: + print >>sys.stderr, """\ +Usage: %s [ -o ... ] [-s ... ] [ -l | -L ] \\ + [ -S ] [ -P ] \\ + [ -p ] [ -d ] + +Address options: + +-o Indicate the original recipients of the message, overriding any found in + the message headers +-s Indicate the senders of the message, overriding any found in the message + headers + +Delivery options: + +-l The socket filename for LMTP communication with a mailbox solution, + selecting the LMTP delivery method +-L Selects the local SMTP delivery method, requiring a suitable mail system + configuration + +(Where a program needs to deliver messages, one of the above options must be +specified.) + +Configuration options: + +-S Indicates the location of the calendar data store containing user storage + directories +-P Indicates the location of published free/busy resources +-p Indicates the location of user preference directories + +Output options: + +-d Run in debug mode, producing informative output describing the behaviour + of the program +""" % os.path.split(sys.argv[0])[-1] + elif "-d" in args: self.process_args(args, sys.stdin) else: try: