Changed output

This commit is contained in:
Brandon Rozek 2024-07-28 20:16:20 -07:00
parent 53060c3c08
commit 4f73f9173b
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480

View file

@ -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,9 @@ fn main() {
file.write_all(output.as_bytes())
.expect("Failed to write to markdown file");
count += 1;
}
println!("Successfully generated {} Markdown Files", count);
}