diff --git a/README.md b/README.md index 91f9fe0..5a0b39a 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,18 @@ > **Warning** > This program is WIP -This Rust project is designed to extract command-line flags from input and generate a powerset of those flags up to a specified depth. The resulting subsets are then prefixed with a constant string and printed to the console. +Powerset is a simple Rust binary (and perhaps future library), that takes a +configuration file specifying commands and uses it to produce a powerset of +those commands. This helps easily generate tests from a single source of truth, +allowing your tests to be initialized at any time from the declarative +configuration. -## Features +Historically, it would parse the output of a binary via a regex. Currently, +it's being refactored to generate configurations from this parsing, but +primarily being dependent on the actual configuration first and foremost. - Extract short (-f) and long (--flag) command-line flags from input. - Generate a powerset of the extracted flags up to a specified depth. - Prefix each subset in the powerset with a constant string (eza by default). +This program was created for eza, but eventually, it should be usable more +broadly. ## Usage @@ -18,24 +23,6 @@ Compile the Rust program: ```bash cargo build --release ``` -Run the compiled binary and provide the input: - -```bash -echo "-a, --all... -l, --long..." | ./target/release/your_binary_name -``` - -Replace `your_binary_name` with the appropriate name of your compiled binary. - -The program will print the output strings, each prefixed with the constant string and containing a subset of the extracted flags. - -# Configuration - - `DEPTH`: Adjust this constant to set the maximum size of the subsets in the powerset. Default is `2`. - `BINARY`: This constant string is prefixed to each subset in the powerset. Default is `eza`. - -# Dependencies - - `regex`: This crate is used for extracting flags from the input using regular expressions. # Contribution