Mercurial > libervia-backend
comparison frontends/src/jp/constants.py @ 2278:489efbda377c
jp (input): input command first draft:
this is an experimental command to use external data as input arguments.
A series of data is used (only CSV is implemented so far), and it is used to fill argument of a command according to a sequence.
The sequence is given using input arguments, with types corresponding to the data found (short option, long option, stdin).
e.g. if a CSV file has row with 3 columns, we can say that column 1 is subject (long option), column 2 is body (stdin), and column 3 is language (short option -l).
A filter can be used after each option type, to transform read value.
Finally a static part is used to have the main command and non dynamic arguments to use.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 28 Jun 2017 01:28:41 +0200 |
parents | a29d1351bc83 |
children | 31f586d6ab16 |
comparison
equal
deleted
inserted
replaced
2277:637886ac35f6 | 2278:489efbda377c |
---|---|
36 OUTPUT_TYPES = (OUTPUT_TEXT, OUTPUT_DICT, OUTPUT_LIST, OUTPUT_LIST_DICT, OUTPUT_COMPLEX, OUTPUT_XML, OUTPUT_LIST_XML) | 36 OUTPUT_TYPES = (OUTPUT_TEXT, OUTPUT_DICT, OUTPUT_LIST, OUTPUT_LIST_DICT, OUTPUT_COMPLEX, OUTPUT_XML, OUTPUT_LIST_XML) |
37 | 37 |
38 # ANSI | 38 # ANSI |
39 A_HEADER = A.BOLD + A.FG_YELLOW | 39 A_HEADER = A.BOLD + A.FG_YELLOW |
40 A_SUBHEADER = A.BOLD + A.FG_RED | 40 A_SUBHEADER = A.BOLD + A.FG_RED |
41 A_SUCCESS = A.BOLD + A.FG_GREEN | |
42 A_FAILURE = A.BOLD + A.FG_RED | |
41 | 43 |
42 # exit codes | 44 # exit codes |
43 EXIT_OK = 0 | 45 EXIT_OK = 0 |
44 EXIT_ERROR = 1 # generic error, when nothing else match | 46 EXIT_ERROR = 1 # generic error, when nothing else match |
45 EXIT_BAD_ARG = 2 # arguments given by user are bad | 47 EXIT_BAD_ARG = 2 # arguments given by user are bad |