aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/character.rs3
-rw-r--r--src/main.rs4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/character.rs b/src/character.rs
index c1d3829..489588e 100644
--- a/src/character.rs
+++ b/src/character.rs
@@ -35,7 +35,6 @@ pub struct Character {
35 pub tags: Vec<Tag>, 35 pub tags: Vec<Tag>,
36 pub traits: Traits, 36 pub traits: Traits,
37 pub assignments: Vec<u32>, 37 pub assignments: Vec<u32>,
38 pub chars_similar_traits: Vec<u32>,
39 pub extra: Vec<DLListItem>, 38 pub extra: Vec<DLListItem>,
40 39
41 pub role: Option<String>, 40 pub role: Option<String>,
@@ -67,7 +66,6 @@ impl Character {
67 tags: vec![], 66 tags: vec![],
68 traits: Traits::new(), 67 traits: Traits::new(),
69 assignments: vec![], 68 assignments: vec![],
70 chars_similar_traits: vec![],
71 extra: vec![], 69 extra: vec![],
72 role: None 70 role: None
73 } 71 }
@@ -104,7 +102,6 @@ impl Character {
104 self.traits.indexed = dl_list::parse(&(&sections["traits"] as &Section).data["indexed_raw".into()]); 102 self.traits.indexed = dl_list::parse(&(&sections["traits"] as &Section).data["indexed_raw".into()]);
105 103
106 self.assignments = tiles::parse_tile_link_ids(&(&sections["assignments"] as &Section).data["raw".into()], "series"); 104 self.assignments = tiles::parse_tile_link_ids(&(&sections["assignments"] as &Section).data["raw".into()], "series");
107 self.chars_similar_traits = tiles::parse_tile_link_ids(&(&sections["chars_similar_traits"] as &Section).data["raw".into()], "character");
108 105
109 if misc.data["role".into()].len() > 0 { 106 if misc.data["role".into()].len() > 0 {
110 self.role = Some(misc.data["role".into()].clone()); 107 self.role = Some(misc.data["role".into()].clone());
diff --git a/src/main.rs b/src/main.rs
index a7f1f9d..c91861a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -45,7 +45,9 @@ fn main() {
45 45
46 let json = serde_json::to_string(&char).unwrap(); 46 let json = serde_json::to_string(&char).unwrap();
47 47
48 let mut o = File::create(out_path.join(entry.file_name())).unwrap(); 48 let out_file = out_path.join(entry.file_name().to_str().unwrap().replace("html", "json"));
49 let mut o = File::create(&out_file).unwrap();
49 o.write_all(json.as_bytes()).unwrap(); 50 o.write_all(json.as_bytes()).unwrap();
51 println!("{:?}", out_file);
50 } 52 }
51} 53}