summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 81c2c61..b3e907d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,9 @@
use tera::{Context, Tera};
+use self::works::Work;
+
+mod works;
+
fn main() {
let tera = match Tera::new("templates/**/*.html") {
Ok(t) => t,
@@ -17,4 +21,12 @@ fn main() {
std::fs::write("docs/index.html", output)
.expect("Failed to write rendered output to index.html");
+
+ let mut file = match std::fs::File::open(std::path::PathBuf::from("stories.json")) {
+ Ok(file) => file,
+ Err(err) => panic!("Trying to open stories.json in readmode - {:?}", err),
+ };
+
+ let stories = works::stories::Stories::new_from_file(file);
+ println!("Stories: {:?}", stories);
}