self.add_argument('--verbose','-v',choices=[xforxinself.levels.keys()],default=verbose,help='set a verbosity level')
self.add_argument('--levels','-l',action='store_true',default=False,help='list all the verbosity levels')
self.add_argument('--output','-o',help='all the logging messages are redirected to the specified filename.')
self.add_argument('--debug','-d',action='store_const',const='debug',dest='verbose',help='Diplay all the messages.')
self.add_argument('--info','-i',action='store_const',const='info',dest='verbose',help='Diplay the info messages.')
self.add_argument('--warning','-w',action='store_const',const='warning',dest='verbose',help='Only diplay the warning and error messages.')
self.add_argument('--error','-e',action='store_const',const='error',dest='verbose',help='Only diplay the error messages')
self.add_argument('--quiet','-q',action='store_const',const='quiet',dest='verbose',help='Quiet level of verbosity only displaying the critical error messages.')
parser.add_argument('--user','-u',help='set the pgp user')
parser.add_argument('--host','-H',help='set the server host',default='localhost')
parser.add_argument('--port','-P',help='set the server port',type=int,default=8081)
parser.add_argument('--verbose','-v',choices=[xforxinlevels.keys()],default='error',help='set a verbosity level')
parser.add_argument('--levels','-l',action='store_true',default=False,help='list all the verbosity levels')
parser.add_argument('--output','-o',help='all the logging messages are redirected to the specified filename.')
parser.add_argument('--debug','-d',action='store_const',const='debug',dest='verbose',help='Display all the messages.')
parser.add_argument('--info','-i',action='store_const',const='info',dest='verbose',help='Display the info messages.')
parser.add_argument('--warning','-w',action='store_const',const='warning',dest='verbose',help='Only display the warning and error messages.')
parser.add_argument('--error','-e',action='store_const',const='error',dest='verbose',help='Only display the error messages')
parser.add_argument('--quiet','-q',action='store_const',const='quiet',dest='verbose',help='Quiet level of verbosity only displaying the critical error messages.')
parser.add_argument('--user','-u',help='PGP key to use for signature')
parser.add_argument('--server','-s',help='uCoin server to look data in',default='localhost')
parser.add_argument('--port','-p',help='uCoin server port',type=int,default=8081)
parser.add_argument('--config','-c',help='set a config file',default='config.json')
parser_current=subparsers.add_parser('current',help='Show current amendment of the contract')
parser_current.set_defaults(func=current)
parser_contract=subparsers.add_parser('contract',help='List all amendments constituting the contract')
parser_contract.set_defaults(func=contract)
parser_lookup=subparsers.add_parser('lookup',help='Search for a public key')
parser_lookup.add_argument('search',help='A value for searching in PGP certificates database. May start with \'0x\' for direct search on PGP fingerprint.')
parser_cget=subparsers.add_parser('cget',help='Get coins for given values in user account.')
parser_cget.add_argument('value',nargs='+',help='value of the coin you want to select')
parser_cget.set_defaults(func=cget)
parser_send_pubkey=subparsers.add_parser('send-pubkey',help='Send signed public key [file] to a uCoin server. If -u option is provided, [file] is ommited. If [file] is not provided, it is read from STDIN. Note: [file] may be forged using \'forge-*\' commands.')
parser_send_pubkey.add_argument('file',nargs='?',help='signed public key to send')
parser_send_pubkey.set_defaults(func=send_pubkey)
parser_vote=subparsers.add_parser('vote',help='Signs given amendment [file] and sends it to a uCoin server. If [file] is not provided, it is read from STDIN.')