summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2019-01-26 19:19:06 +0300
committerValentin Popov <info@valentineus.link>2019-01-26 19:19:06 +0300
commitb591a9c5676f50d226357f4ced531c9f3c62fe08 (patch)
tree29d2089d6c75b2627d0f6dd27441304f3e1b03a6
parentaf986fa645f2f59af4862e1178b53e0171bda9df (diff)
downloadbbb2json-b591a9c5676f50d226357f4ced531c9f3c62fe08.tar.xz
bbb2json-b591a9c5676f50d226357f4ced531c9f3c62fe08.zip
Sat, 26 Jan 2019 20:19:06 +0400
Signed-off-by: Valentin Popov <info@valentineus.link>
-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);
}