From a387ba495e4da3cf203b28b4b89e44d91029ff06 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Sun, 28 Jul 2024 19:52:23 -0700 Subject: [PATCH] Changed output --- .scripts/src/generate_md.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.scripts/src/generate_md.rs b/.scripts/src/generate_md.rs index a0eff06..33c7647 100644 --- a/.scripts/src/generate_md.rs +++ b/.scripts/src/generate_md.rs @@ -5,14 +5,14 @@ use tera::Tera; use tera::Context; fn main() { - println!("Hello, world!"); - let mut tera = Tera::default(); tera.add_template_file("src/toot.md", None).unwrap(); let data_dir = std::fs::read_dir("../.data") .expect("Failed to open data directory"); + let mut count = 0; + for entry in data_dir { let opath = entry.ok().map(|v| v.path()); @@ -59,6 +59,10 @@ fn main() { file.write_all(output.as_bytes()) .expect("Failed to write to markdown file"); + count += 1; + } + println!("Successfully generated {} Markdown Files", count); + }