blob: ca9b1c57949a545bc5a60724d76374923c21ac9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
extern crate regex;
use regex::Regex;
extern crate walkdir;
use walkdir::WalkDir;
use std::io::prelude::*;
use std::fs::File;
use std::env;
use std::path::{Path, PathBuf};
mod pre_process;
fn main() {
let raw_files = env::var("RAW_FILES").unwrap_or("S:\\grilist\\acd\\acd_character_parser\\characters\\".into());
let base_path = Path::new(&raw_files);
for entry in WalkDir::new(base_path).min_depth(1).into_iter().filter_map(|e| e.ok()) {
println!("{:?}", entry.path());
let mut f = File::open(entry.path()).expect("could not open file");
let mut buf = String::new();
f.read_to_string(&mut buf).unwrap();
let buf = pre_process::strip_irrelevant_content(&buf);
}
}
|