aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index bc32bd9..401bbe4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,11 +1,19 @@
use std::fs::File;
use std::io::BufReader;
+extern crate clap;
+use clap::{load_yaml, App};
+
mod parser;
use parser::*;
fn main() {
- let file: File = File::open("events.xml").unwrap();
+ let yaml = load_yaml!("cli/ru.yml");
+ let matches = App::from_yaml(yaml).get_matches();
+
+ let path = matches.value_of("FILE").unwrap();
+
+ let file: File = File::open(path).unwrap();
let data: ParserResult = parse(BufReader::new(file));
dbg!(data.meeting_name);
}