mirror of https://codeberg.org/topola/topola.git
cli: initial help for input/output
This commit is contained in:
parent
63d3e345aa
commit
ce848bb700
|
|
@ -13,16 +13,19 @@ use topola::specctra::design::SpecctraDesign;
|
||||||
#[derive(Parser, Debug, Default)]
|
#[derive(Parser, Debug, Default)]
|
||||||
#[command(about, version)]
|
#[command(about, version)]
|
||||||
struct Cli {
|
struct Cli {
|
||||||
|
#[arg(value_name = "SPECCTRA DESIGN FILE",
|
||||||
|
help = "Specify the Specctra Design (*.dsn) file input file for the Topola autorouter")]
|
||||||
input: PathBuf,
|
input: PathBuf,
|
||||||
#[arg(short, long, value_name = "FILE")]
|
#[arg(short, long, value_name = "FILE",
|
||||||
|
help = "Specify the output Topola session file (*.ses)")
|
||||||
|
]
|
||||||
output: Option<PathBuf>,
|
output: Option<PathBuf>,
|
||||||
#[arg(short, long, value_name = "FILE")]
|
#[arg(short, long, value_name = "FILE", help = "TODO")]
|
||||||
commands: Option<PathBuf>,
|
commands: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), std::io::Error> {
|
fn main() -> Result<(), std::io::Error> {
|
||||||
let args = Cli::parse();
|
let args = Cli::parse();
|
||||||
|
|
||||||
let design_file = File::open(&args.input)?;
|
let design_file = File::open(&args.input)?;
|
||||||
let mut design_bufread = BufReader::new(design_file);
|
let mut design_bufread = BufReader::new(design_file);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue