Skip to content

Commit

Permalink
refactor!: improve CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcur committed Jul 26, 2024
1 parent e99d95f commit 7951c59
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ enum OutputFormat {
Json,
}

/// Print metrics of fonts in a font file.
/// Print font information and metrics.
#[derive(Parser)]
struct Cli {
/// Print verbose debug output.
#[arg(short, long)]
verbose: bool,

/// Find all fonts in the giving file.
/// Load all fonts in the given font file.
#[arg(long, group = "input")]
font_file: Option<PathBuf>,

Expand All @@ -35,13 +35,13 @@ struct Cli {
#[arg(long, default_value = "human-readable")]
format: OutputFormat,

/// Print font features.
/// Print a listing of font features.
#[arg(long)]
print_features: bool,
list_features: bool,

/// Print supported writing systems.
/// Print a listing of supported writing systems.
#[arg(long)]
print_writing_systems: bool,
list_writing_systems: bool,
}

enum PrintFeatures {
Expand Down Expand Up @@ -443,12 +443,12 @@ fn main() -> anyhow::Result<()> {
}

let options = Options {
print_features: if cli.print_features {
print_features: if cli.list_features {
PrintFeatures::Yes
} else {
PrintFeatures::No
},
print_writing_systems: if cli.print_writing_systems {
print_writing_systems: if cli.list_writing_systems {
PrintWritingSystems::Yes
} else {
PrintWritingSystems::No
Expand Down

0 comments on commit 7951c59

Please sign in to comment.