diff options
author | jakobst1n <jakob.stendahl@outlook.com> | 2024-06-12 01:09:07 +0200 |
---|---|---|
committer | jakobst1n <jakob.stendahl@outlook.com> | 2024-06-12 01:09:07 +0200 |
commit | 68fb5ef079b8c122acde3252b713dd9c89d8aa5f (patch) | |
tree | 0bf782aa3578a9ef36ba357b39b2c912f019f082 /src/parseopts.rs | |
parent | 42c249ebe1cbfaac82b8fb349c34e6110d1df89f (diff) | |
download | textgraph-68fb5ef079b8c122acde3252b713dd9c89d8aa5f.tar.gz textgraph-68fb5ef079b8c122acde3252b713dd9c89d8aa5f.zip |
Add attempt at a braille mode
Diffstat (limited to 'src/parseopts.rs')
-rw-r--r-- | src/parseopts.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/parseopts.rs b/src/parseopts.rs index 9cb1c7e..7d5d760 100644 --- a/src/parseopts.rs +++ b/src/parseopts.rs @@ -65,7 +65,7 @@ impl OptsBuilder { macro_rules! parseopts_panic { ($progname:expr) => { println!( - "Usage: {} [-h|--height <height>] [-w|--width <width>] [-t <star|ascii>]", + "Usage: {} [-h|--height <height>] [-w|--width <width>] [-t <star|ascii|braille>]", $progname ); std::process::exit(1); @@ -100,7 +100,7 @@ pub fn parseopt(opts: &mut OptsBuilder, arg: &str, value: Option<String>, progna } t => { println!( - "Unknown type \"{}\", valid options are \"star\", \"ascii\".", + "Unknown type \"{}\", valid options are \"star\", \"ascii\" and \"braille\".", t ); parseopts_panic!(progname); @@ -135,6 +135,9 @@ pub fn parseopt(opts: &mut OptsBuilder, arg: &str, value: Option<String>, progna "a" | "ascii" => { opts.graph_type = GraphType::Ascii; } + "b" | "braille" => { + opts.graph_type = GraphType::Braille; + } "c" | "cut" => { opts.cut = true; } |