Changeset 14174


Ignore:
Timestamp:
05/30/12 17:06:27 (12 years ago)
Author:
sil
Message:

made some corrections in the help-texts of the option parser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt/bin/cmt

    r14171 r14174  
    399399        dest='DRYRUN',
    400400        default=config_parser.getboolean('defaults', 'DRYRUN'),
    401         help="""This flag has to be given before -[aclmr]""")
     401        help='This flag has to be given before -[aclmr]')
    402402    parser.add_option('--script',
    403403        action='store_false',
     
    410410        metavar='ENTITY',
    411411        nargs=1,
    412         help="""Add an object of given ENTITY.
    413 
    414             arguments:   set <ASSIGNMENTS>
    415 
    416             The object will get values according to the given assignments.
    417             Assignments could be formed like [<FK>__]<attr>=<value>""")
     412        help='Add an object of the given ENTITY. '\
     413            'Extra arguments should be given like `set ASSIGNMENTS`, '\
     414            'where ASSIGNMENTS are formatted like `ATTR=VAL`')
    418415    parser.add_option('-c', '--change',
    419416        action='callback',
     
    422419        metavar='ENTITY',
    423420        nargs=1,
    424         help="""Change value(s) of object(s) of given ENTITY.
    425 
    426             arguments:   get <QUERY> set <ASSIGNMENTS>
    427 
    428             The query, which consists out of one or more terms, is used to make
    429             a selection of objects to change. These objects will be changed
    430             according to the given assignments.""")
     421        help='Change value(s) of object(s) of the given ENTITY. '\
     422            'Arguments should be given like `get QUERY set ASSIGNMENTS`, '\
     423            'where both QUERY and ASSIGNMENTS consist out of one or more '\
     424            'terms formatted like `ATTR=VAL`. Only objects matching QUERY '\
     425            'will be changed according to the given ASSIGNMENTS')
    431426    parser.add_option('-g', '--generate',
    432427        action='callback',
     
    435430        metavar='TEMPLATE',
    436431        nargs=1,
    437         help='Render the given template')
     432        help='Render the given TEMPLATE, and store the result if specified')
    438433    parser.add_option('-l', '--list',
    439434        action='callback',
    440435        callback=show,
    441436        type='string',
    442         metavar='ENTITY [ATTRIBUTE=VALUE]',
     437        metavar='ENTITY',
    443438        nargs=1,
    444         help="""List object(s) of the given ENTITY.
    445 
    446             arguments:   get <QUERY>
    447 
    448             The query, which consists out of one or more terms, is used to make
    449             a selection of objects to list.""")
     439        help='List object(s) of the given ENTITY. Arguments should be given '\
     440            'like `get QUERY`, where QUERY consists out of one or more terms '\
     441            'formatted like `ATTR=VAL`')
    450442    parser.add_option('-r', '--remove',
    451443        action='callback',
    452444        callback=remove,
    453445        type='string',
    454         metavar='ENTITY [ATTRIBUTE=VALUE]',
     446        metavar='ENTITY',
    455447        nargs=1,
    456         help='Remove objects which reflect the given query')
     448        help='Remove object(s) of the given ENTITY. '\
     449            'Arguments should be given like `get QUERY`, where QUERY '\
     450            'consists out of one or more terms formatted like `ATTR=VAL`. '\
     451            'Only objects matching QUERY will be listed')
    457452
    458453    # TODO: implement the following option(s)
Note: See TracChangeset for help on using the changeset viewer.