From d78852976ff53cbfede84e80dd121e372399252c Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sat, 2 Dec 2023 12:48:52 -0800 Subject: [PATCH] summarize: add flag for including content-type parameters --- src/bin/summarize.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bin/summarize.rs b/src/bin/summarize.rs index bed3e24..9f1db05 100644 --- a/src/bin/summarize.rs +++ b/src/bin/summarize.rs @@ -9,6 +9,10 @@ use memmap::MmapOptions; #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] struct Args { + /// Include subpart params in fingerprint + #[arg(short, long)] + include_params: bool, + /// List of files to summarize paths: Vec, } @@ -23,7 +27,10 @@ fn main() -> anyhow::Result<()> { .headers .get_first_value("subject") .unwrap_or("(NO SUBJECT)".to_owned()); - println!("{subject}: {path}\n{}", fingerprint(&m, false).join("\n")); + println!( + "{subject}: {path}\n{}", + fingerprint(&m, args.include_params).join("\n") + ); } Ok(()) }