29 lines
678 B
Rust
29 lines
678 B
Rust
mod app;
|
|
mod cmds;
|
|
mod error;
|
|
mod parse;
|
|
mod printer;
|
|
mod utils;
|
|
|
|
use crate::app::App;
|
|
use app::{Cli, Commands};
|
|
use clap::Parser;
|
|
use cmds::parse::{ParseCmd, ParseCmdConfig};
|
|
use cmds::Cmd;
|
|
use std::time::Instant;
|
|
|
|
fn main() {
|
|
let args = Cli::parse();
|
|
let config = args.appConfig();
|
|
let app = App::new(config);
|
|
|
|
match args.command {
|
|
Commands::Parse { path, output_path, verbose } => {
|
|
let parse_conf = ParseCmdConfig::new(path, output_path, verbose);
|
|
let start = Instant::now();
|
|
ParseCmd.parse(&app, parse_conf).unwrap().unwrap();
|
|
println!("elapse time: {}", start.elapsed().as_secs());
|
|
}
|
|
}
|
|
}
|