CLI
This commit is contained in:
+5
-4
@@ -3,13 +3,14 @@ use std::{fs, path::Path};
|
||||
use can_dbc::Dbc;
|
||||
|
||||
fn main() {
|
||||
let args: Vec::<_> = std::env::args().collect();
|
||||
|
||||
let data =
|
||||
fs::read_to_string("./_reference/RT15evo_v8.dbc").expect("Unable to read input file");
|
||||
fs::read_to_string(&args[1]).expect("Unable to read input file");
|
||||
let dbc = Dbc::try_from(data.as_str()).expect("Failed to parse dbc file");
|
||||
|
||||
let args: Vec::<_> = std::env::args().collect();
|
||||
let asc_path = Path::new(&args[1]);
|
||||
let output_dir = Path::new(&args[2]);
|
||||
let asc_path = Path::new(&args[2]);
|
||||
let output_dir = Path::new(&args[3]);
|
||||
|
||||
libsvld::decode(&dbc, asc_path, output_dir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user