opts.rs 525 B

1234567891011121314151617181920212223
  1. use clap::Parser;
  2. #[derive(Parser, Debug)]
  3. #[clap(author, version, about, long_about = None)]
  4. pub struct Options {
  5. pub file: String,
  6. pub output: Option<String>,
  7. #[clap(long, default_value_t = 10)]
  8. pub grid: u32,
  9. #[clap(long, default_value_t = 1.0)]
  10. pub line_weight: f64,
  11. #[clap(long, default_value_t = 3.0)]
  12. pub major_line_weight: f64,
  13. #[clap(long, default_value_t = 24.0)]
  14. pub size: f64,
  15. #[clap(long, default_value_t = String::from("Fira Sans 12"))]
  16. pub font: String,
  17. }