fix structopt picking o as the short alias for multiple opts

master
Sameer Puri 4 years ago
parent 7c6c790378
commit d6e5f208ab

@ -1,7 +1,7 @@
[package]
name = "svg2gcode"
version = "0.0.2"
authors = ["Sameer Puri <purisame@spuri.io>"]
authors = ["Sameer Puri <sameer@purisa.me>"]
edition = "2018"
description = "Convert paths in SVG files to GCode for a pen plotter, laser engraver, or other machine."

@ -35,17 +35,17 @@ struct Opt {
/// Dots per inch (DPI) for pixels, points, picas, etc.
#[structopt(long, default_value = "96")]
dpi: f64,
#[structopt(short = "on", long)]
#[structopt(alias = "tool_on_sequence", long = "on")]
/// Tool on GCode sequence
tool_on_sequence: Option<String>,
#[structopt(short = "off", long)]
#[structopt(alias = "tool_off_sequence", long = "off")]
/// Tool off GCode sequence
tool_off_sequence: Option<String>,
/// Optional GCode begin sequence (i.e. change to a cutter tool)
#[structopt(short = "begin", long)]
#[structopt(alias = "begin_sequence", long = "begin")]
begin_sequence: Option<String>,
/// Optional GCode end sequence, prior to program end (i.e. put away a cutter tool)
#[structopt(short = "end", long)]
#[structopt(alias = "end_sequence", long = "end")]
end_sequence: Option<String>,
/// A file path for an SVG, else reads from stdin
file: Option<PathBuf>,

Loading…
Cancel
Save