aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2016-09-25 20:28:51 (UTC)
committerjan <jan@ruken.pw>2016-09-25 20:28:51 (UTC)
commit265ea9e217f15ef387a5580d9b21a1914308389c (patch)
treea53a6c98e5e302e7712b55c03d5bdd11bf497471 /src/main.rs
initial commit
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs26
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 @@
1extern crate regex;
2use regex::Regex;
3
4extern crate walkdir;
5use walkdir::WalkDir;
6
7use std::io::prelude::*;
8use std::fs::File;
9use std::env;
10use std::path::{Path, PathBuf};
11
12mod pre_process;
13
14fn 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}