aboutsummaryrefslogtreecommitdiff
path: root/src/parseopts.rs
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2024-06-11 22:57:42 +0200
committerjakobst1n <jakob.stendahl@outlook.com>2024-06-11 22:57:42 +0200
commit2e56a0d2e80416904712514da6dab788567a719b (patch)
tree32b2c81413730ed224214f8d443456326562d6bf /src/parseopts.rs
parentd338982d6020e2b73a0912db048a53157ac7507e (diff)
downloadtextgraph-2e56a0d2e80416904712514da6dab788567a719b.tar.gz
textgraph-2e56a0d2e80416904712514da6dab788567a719b.zip
Rename axis argument to silent, and invert it, so axis are enabled by default
Diffstat (limited to 'src/parseopts.rs')
-rw-r--r--src/parseopts.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/parseopts.rs b/src/parseopts.rs
index 5368a87..1bae188 100644
--- a/src/parseopts.rs
+++ b/src/parseopts.rs
@@ -9,8 +9,8 @@ pub struct Opts {
pub height: usize,
/// Which type of graph it should be, ascii, star
pub graph_type: GraphType,
- /// Enable axis on the resulting graph, makes it a bit prettier
- pub axis: bool,
+ /// This will disable distracting elements, such as axis
+ pub silent: bool,
/// Specify if it is used as a filter, and you only want to look at the last N samples
pub last_n: Option<u64>,
/// Read from the specified file, instead of reading continously from stdin
@@ -25,8 +25,8 @@ pub struct OptsBuilder {
pub height: Option<usize>,
/// Which type of graph it should be, ascii, star
pub graph_type: GraphType,
- /// Enable axis on the resulting graph, makes it a bit prettier
- pub axis: bool,
+ /// This will disable distracting elements, such as axis
+ pub silent: bool,
/// Specify if it is used as a filter, and you only want to look at the last N samples
pub last_n: Option<u64>,
/// Read from the specified file, instead of reading continously from stdin
@@ -53,7 +53,7 @@ impl OptsBuilder {
}
}),
graph_type: self.graph_type,
- axis: self.axis,
+ silent: self.silent,
last_n: self.last_n,
in_file: self.in_file,
}
@@ -127,8 +127,8 @@ pub fn parseopt(opts: &mut OptsBuilder, arg: &str, value: Option<String>, progna
};
opts.last_n = Some(last_n);
}
- "a" | "axis" => {
- opts.axis = true;
+ "s" | "silent" => {
+ opts.silent = true;
}
"w" | "width" => {
let Some(width) = value else {
@@ -158,7 +158,7 @@ pub fn parseopts() -> Opts {
width: None,
height: None,
graph_type: GraphType::Star,
- axis: false,
+ silent: false,
last_n: None,
in_file: None,
};