aboutsummaryrefslogtreecommitdiff
path: root/src/output.rs
Commit message (Collapse)AuthorAge
* Add tsv output formatoutput-formatsRobin Krahl2020-09-05
| | | | | | | | This patch adds a new output format, tsv. It uses the tsv crate to generate the data and the serde_json crate to transform structs into key-value pairs. TODO: man page, changelog
* Add json output formatRobin Krahl2020-09-05
| | | | | | | This patch adds a new output format, JSON. It uses serde to serialize the output types. todo: man page, changelog
* Add --output-format argumentRobin Krahl2020-09-05
| | | | | | | | | This patch adds the --output-format argument that makes it possible to select a format for the data that nitrocli prints to stdout. Currently, the only supported format is text output, i. e. a human-readable representation. TODO: man page, changelog
* Use dedicated types for outputRobin Krahl2020-09-05
Previously, we just printed nitrocli’s output to the stdout stream using format macros. To make it possible to support multiple output formats, this patch introduces the output module with dedicated types for the data that is printed to stdout: - Value: A single value, e. g. an OTP code or the configuration data. - Table: A list of objects, rendered as a table, e. g. the list of OTP slots. With this patch, we also drop the --quiet option for the pws get command. It was intended to make it easier to parse the output of the command. But as we will add better output formats for parsing, we no longer need this option. TODO: update changelog