Commit graph libervia-backend/frontends/src/jp/output_std.py
Author SHA1 Message Date
Goffi
e255b969e0 jp (output): added LIST_DICT output, to handle list of dictionaries 2017-04-27 00:58:12 +02:00
Goffi
444926825c jp (output dict): added color and no-header option 2017-03-13 23:15:06 +01:00
Goffi
48a5f1f4c7 jp (std output): force unicode on simple output 2017-03-12 23:29:09 +01:00
Goffi
8155bc3ee8 jp (base, blog, output(std)): fixed bad unicode handling in stdout, use of jp.disp instead of simple print 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
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