Commit graph libervia-backend/frontends/src/jp/constants.py
Author SHA1 Message Date
Goffi
178a8311ca jp (constants): added OUTPUT_DICT_DICT for dictionaries of nested dictionaries 2017-07-02 19:51:00 +02:00
Goffi
9322d617d4 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.
2017-06-28 01:28:41 +02:00
Goffi
7edc9c8a3b jp (constants): added exit code for data error. 2017-06-27 16:14:58 +02:00
Goffi
e255b969e0 jp (output): added LIST_DICT output, to handle list of dictionaries 2017-04-27 00:58:12 +02:00
Goffi
6e70992c6c jp: added constant to handle ANSI code for header and subheaders 2017-04-27 00:57:04 +02:00
Goffi
6fd7bd5313 jp (outputs): new xml and list_xml outputs, handling pretty formatting and syntax highlighting 2017-03-12 23:34:19 +01:00
Goffi
8579722d09 jp (output): template output first draft:
template output use the new template renderer and data_objects module in backend tools.
    Options can be specified: template to give a direct path to template, browser to display result directly, inline-css to include css in the HTML page.
    Default template can be specified in command's TEMPLATE attribute, and a template_data_mapping method is called if it exists to map data to what is expected by the template.
2017-02-21 21:01:40 +01:00
Goffi
97cf0e6e01 jp (outputs): added OUTPUT_COMPLEX type for data which are more complex than key/value dictionaries 2017-02-16 00:51:33 +01:00
Goffi
fb0aaf2cae jp (constants): added exit code for error on bridge method call 2017-01-05 20:37:01 +01:00
Goffi
0a5fd6f3f4 primitivus, jp: dynamic bridge + fixed D-Bus bridge:
Primitivus and jp can now load the bridge specified in sat.conf, but they are only working with D-Bus so far (need to change all sync calls to async).
    Exit code 3 is used for Bridge init error.
2016-12-18 16:28:51 +01:00
Goffi
fce13b52f8 jp (core): added EXIT_NOT_FOUND constant, which return 16 as exit code 2016-09-13 22:03:45 +02:00
Goffi
1fc8580831 jp: added consts for exit codes, not used yet 2016-04-23 23:30:06 +02:00
Goffi
b8e62dd69c jp: --output option:
- new --output option can be added wich use_output. use_output can be True (in which case it wild default to C.OUTPUT_TEXT), or any of C.OUTPUT_TYPES (currently text, list and dict)
    - output change the output format mainly to make command result parsing more easy, but it can also be use to add fancy effects (like coloration)
    - outputs are added with plugins in the same way as commands (import of both is done in the same method)
    - in the command class, output need to be declared with use_output=C.OUTPUT_xxx, then the data only need to be processed with self.output(data)
    - outputs can have description (not used yet)
    - use_xxx argument handling has been refactored (minor refactoring) to be more generic
    - first outputs are "default", "json" (pretty printed) and "json_raw" (compact json)
    - the first command to use them is "profile list"
2016-04-23 23:10:03 +02:00
Goffi
6bbcbaf522 use of /usr/bin/env instead of /usr/bin/python in shebang 2016-04-17 14:45:26 +02:00
Goffi
348be27934 copyright update 2016-01-03 16:28:30 +01:00
Goffi
fbec02d396 2015 copyright dates update 2015-03-30 10:26:26 +02:00
Goffi
647487fc1d jp: using C.APP_URL for application url 2014-04-02 12:11:07 +02:00