opts.rs 551 B

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