Sat, 26 Jan 2019 20:19:06 +0400
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
af986fa645
commit
b591a9c567
10
src/main.rs
10
src/main.rs
@ -1,11 +1,19 @@
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
||||||
|
extern crate clap;
|
||||||
|
use clap::{load_yaml, App};
|
||||||
|
|
||||||
mod parser;
|
mod parser;
|
||||||
use parser::*;
|
use parser::*;
|
||||||
|
|
||||||
fn main() {
|
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));
|
let data: ParserResult = parse(BufReader::new(file));
|
||||||
dbg!(data.meeting_name);
|
dbg!(data.meeting_name);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user