mirror of
https://github.com/Brandon-Rozek/website-toots.git
synced 2024-12-22 17:10:50 +00:00
Changed output
This commit is contained in:
parent
53060c3c08
commit
4f73f9173b
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue