slightly improved documentation

This commit is contained in:
xenofem 2022-02-11 18:47:21 -05:00
parent 09100cb212
commit 1674c43178
2 changed files with 10 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "badpipe" name = "badpipe"
description = "introduce errors into a pipeline for testing purposes" description = "Introduce transcription errors into a pipeline"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
authors = ["xenofem <xenofem@xeno.science>"] authors = ["xenofem <xenofem@xeno.science>"]

View file

@ -6,8 +6,15 @@ use std::io::{self, Read, Write};
const BUF_SIZE: usize = 8192; const BUF_SIZE: usize = 8192;
#[derive(Parser, Debug)] #[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 { struct Cli {
/// Log the location and details of each transcription error to stderr
#[clap(short, long)] #[clap(short, long)]
verbose: bool, verbose: bool,
@ -15,7 +22,7 @@ struct Cli {
#[clap(short, long, value_name = "N", default_value_t = 1000)] #[clap(short, long, value_name = "N", default_value_t = 1000)]
rarity: u32, 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, error_spec: ErrorSpec,
} }