diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-09-05 13:18:41 +0200 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2020-09-05 13:18:41 +0200 |
commit | 04b4262cdf4bbb4e2698d8ce51a261bf294a2da3 (patch) | |
tree | 9de5eda786b20ac1b6350144499ce08fd4baa6c9 /src/config.rs | |
parent | 9dca5be8b182773a7b7eb23b47296d403540ead4 (diff) | |
download | nitrocli-04b4262cdf4bbb4e2698d8ce51a261bf294a2da3.tar.gz nitrocli-04b4262cdf4bbb4e2698d8ce51a261bf294a2da3.tar.bz2 |
Add --output-format argument
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
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index aceda38..b96d071 100644 --- a/src/config.rs +++ b/src/config.rs @@ -32,6 +32,8 @@ pub struct Config { #[merge(strategy = merge::num::overwrite_zero)] #[serde(default)] pub verbosity: u8, + /// The output format. + pub output_format: Option<args::OutputFormat>, } impl Config { @@ -57,6 +59,9 @@ impl Config { if args.verbose > 0 { self.verbosity = args.verbose; } + if args.output_format.is_some() { + self.output_format = args.output_format; + } } } |