diff options
author | jan <jan@ruken.pw> | 2016-09-25 20:28:51 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2016-09-25 20:28:51 (UTC) |
commit | 265ea9e217f15ef387a5580d9b21a1914308389c (patch) | |
tree | a53a6c98e5e302e7712b55c03d5bdd11bf497471 /src/main.rs |
initial commit
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..ca9b1c5 --- /dev/null +++ b/src/main.rs | |||
@@ -0,0 +1,26 @@ | |||
1 | extern crate regex; | ||
2 | use regex::Regex; | ||
3 | |||
4 | extern crate walkdir; | ||
5 | use walkdir::WalkDir; | ||
6 | |||
7 | use std::io::prelude::*; | ||
8 | use std::fs::File; | ||
9 | use std::env; | ||
10 | use std::path::{Path, PathBuf}; | ||
11 | |||
12 | mod pre_process; | ||
13 | |||
14 | fn main() { | ||
15 | let raw_files = env::var("RAW_FILES").unwrap_or("S:\\grilist\\acd\\acd_character_parser\\characters\\".into()); | ||
16 | let base_path = Path::new(&raw_files); | ||
17 | |||
18 | for entry in WalkDir::new(base_path).min_depth(1).into_iter().filter_map(|e| e.ok()) { | ||
19 | println!("{:?}", entry.path()); | ||
20 | let mut f = File::open(entry.path()).expect("could not open file"); | ||
21 | let mut buf = String::new(); | ||
22 | f.read_to_string(&mut buf).unwrap(); | ||
23 | |||
24 | let buf = pre_process::strip_irrelevant_content(&buf); | ||
25 | } | ||
26 | } | ||