# HG changeset patch # User Jeff Hammel # Date 1271818906 25200 # Node ID 894a2e76bd40da69efb819b072ba73409a4e7024 # Parent 4e41e1084e564bc0f6fc8e61d70fe1519ef8d0ac add documentation to the OptionParser diff -r 4e41e1084e56 -r 894a2e76bd40 bitsyblog/blogme.py --- a/bitsyblog/blogme.py Tue Apr 13 13:59:43 2010 -0700 +++ b/bitsyblog/blogme.py Tue Apr 20 20:01:46 2010 -0700 @@ -1,5 +1,4 @@ #!/usr/bin/env python - """ command line blogger """ @@ -32,14 +31,19 @@ def main(args=sys.argv[1:]): # parse command line options - parser = optparse.OptionParser() - parser.add_option('-c', '--config') - parser.add_option('-f', '--file') - parser.add_option('-H', '--host') + parser = optparse.OptionParser(description=__doc__) + parser.add_option('-c', '--config', + help='configuration file to use [Default: ~/.blogme]') + parser.add_option('-f', '--file', + help='path to blog entries for the user; does not touch net') + parser.add_option('-H', '--host', + help='URL of bitsyblog instance') parser.add_option('-u', '--user') parser.add_option('-p', '--password') - parser.add_option('--private', action='store_true', default=False) - parser.add_option('--secret', action='store_true', default=False) + parser.add_option('--private', action='store_true', default=False, + help='denote this blog entry as private') + parser.add_option('--secret', action='store_true', default=False, + help='denote this blog entry as secret') options, args = parser.parse_args() # sanity check