summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorstuebinm2022-12-01 00:50:46 +0100
committerstuebinm2022-12-01 00:50:46 +0100
commit037ec595a3926d7af5ae5816d4e791e7130c3696 (patch)
treee84025e829a0c81739ac546ca856b36383e84dcd /src
parent23c6195d83d4cc09545468982dda92c549d4a877 (diff)
readme & stuff
Diffstat (limited to 'src')
-rw-r--r--src/main.rs10
1 files changed, 8 insertions, 2 deletions
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))
}