From 1674c431786d4a11db38cc7b011a49978cd3c72b Mon Sep 17 00:00:00 2001 From: xenofem Date: Fri, 11 Feb 2022 18:47:21 -0500 Subject: [PATCH] slightly improved documentation --- Cargo.toml | 2 +- src/main.rs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c5feb8f..9249d37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "badpipe" -description = "introduce errors into a pipeline for testing purposes" +description = "Introduce transcription errors into a pipeline" version = "0.1.0" edition = "2021" authors = ["xenofem "] diff --git a/src/main.rs b/src/main.rs index 8db0900..ffc6c41 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,8 +6,15 @@ use std::io::{self, Read, Write}; const BUF_SIZE: usize = 8192; #[derive(Parser, Debug)] -#[clap(author, version, about)] +#[clap(author, version)] +/// Introduce transcription errors into a pipeline +/// +/// badpipe passes data from stdin to stdout while randomly +/// introducing single-byte transcription errors. Its intended use is +/// for testing how other programs handle data corruption caused by +/// poor network conditions or bitrot. struct Cli { + /// Log the location and details of each transcription error to stderr #[clap(short, long)] verbose: bool, @@ -15,7 +22,7 @@ struct Cli { #[clap(short, long, value_name = "N", default_value_t = 1000)] rarity: u32, - #[clap(flatten, help_heading = "Types of errors to cause. If none are specified individually, all will be allowed")] + #[clap(flatten, help_heading = "Types of errors to introduce. If none are specified individually, all will be allowed")] error_spec: ErrorSpec, }