summarize: add flag for including content-type parameters
This commit is contained in:
parent
34293e03d2
commit
d78852976f
@ -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<String>,
|
||||
}
|
||||
@ -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(())
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user