From 037ec595a3926d7af5ae5816d4e791e7130c3696 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 1 Dec 2022 00:50:46 +0100 Subject: readme & stuff --- src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 59e7e51..315d093 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,8 +17,12 @@ struct Args { /// emit the feed as json #[arg(long)] json: bool, + /// ignore things that look wrong as long as possible #[arg(long="ignore-nonfatal", short='i')] - ignore_nonfatal: bool + ignore_nonfatal: bool, + /// don't do terminal colours + #[arg(long="no-colors")] + no_colors: bool } @@ -52,7 +56,9 @@ async fn main() -> miette::Result<()> { match args.json { true => println!("{}", protobuf_json_mapping::print_to_string(&proto).into_diagnostic()?), - false => + false if args.no_colors => + println!("{}", protobuf::text_format::print_to_string_pretty(&proto)), + false => println!("{}", fancy::print_to_string_fancy(&proto)) } -- cgit v1.2.3