What is Nostr?
npub19cs…3u8d
2024-09-06 18:20:56

npub19c…u3u8d on Nostr: commit 260020b148847d63682107ad18af857b2e165539 Author: randymcmillan ...

commit 260020b148847d63682107ad18af857b2e165539
Author: randymcmillan <randymcmillan@protonmail.com>
Date: Sat Jul 20 15:28:30 2024 -0400

src/main.rs:writing *.md.html

diff --git a/src/main.rs b/src/main.rs
index 7e614d6..eed9ab5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -77,13 +77,14 @@ fn print_entries<const BOUND: u8>() -> () {
let content = md_content.contents_utf8().unwrap();
//println!("\n{}", content);
//
- let filename: &str = &entry.path().display().to_string();
- let mut file = File::create(filename);
- file.expect("REASON").write_all(b"Hello, world!");
+ //let filename: &str = &(entry.path().display().to_string() + ".html");
+ let filename: String = entry.path().display().to_string() + ".html";
+ let mut file = File::create(&filename);
+ let _ = file.expect("REASON").write_all(markdown::to_html(content).as_bytes());

let mut file = File::open(filename);
let mut contents = String::new();
- file.expect("REASON").read_to_string(&mut contents);
+ let _ = file.expect("REASON").read_to_string(&mut contents);
println!("{}", contents);
println!("{}", markdown::to_html(content));
}
Author Public Key
npub19csr2xcz984jkxspv9w2dj77aagt8jdxdd09m0m040qy7um8mdysyu3u8d