File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,6 +162,9 @@ All API calls can be called from the command line. The command will convert doma
162162$ cli4 [-h|--help] [-v|--verbose] [-q|--quiet] [--get|--patch|--post|-put|--delete] [item=value ...] /command...
163163```
164164
165+ For API calls that need a set of date or parameters passed there is a item=value format.
166+ If you want a numeric value passed, then _ ** _ can be used to force the value to be treated as a numeric value.
167+
165168The output from the CLI command is in json format (and human readable).
166169
167170### Simple CLI examples
Original file line number Diff line number Diff line change @@ -124,13 +124,13 @@ def cli4(args):
124124 # next grab the params. These are in the form of tag=value
125125 params = {}
126126 while len (args ) > 0 and '=' in args [0 ]:
127- tag , value = args .pop (0 ).split ('=' )
127+ tag , value = args .pop (0 ).split ('=' , 1 )
128128 if value == 'true' :
129129 value = True
130130 elif value == 'false' :
131131 value = False
132- elif digits_only .match (value ):
133- value = int (value )
132+ elif value [ 0 ] is '=' and digits_only .match (value [ 1 :] ):
133+ value = int (value [ 1 :] )
134134 elif value [0 ] is '[' and value [- 1 ] is ']' :
135135 value = value [1 :- 1 ].split (',' )
136136 params [tag ] = value
You can’t perform that action at this time.
0 commit comments