This commit is contained in:
Rakarake 2026-03-28 00:03:28 +01:00
parent b0168c05be
commit ac5cba1c4d
8 changed files with 19 additions and 17 deletions

View file

@ -1 +0,0 @@
What a good day!

View file

@ -1 +0,0 @@
This was tough, good I have my pikmin plush.

View file

@ -1,4 +0,0 @@
## This is huge
We have infrastructure set up for a brighter future. Game on gamers!
// Raka

View file

@ -1 +0,0 @@
Just some normal text!

View file

@ -1,6 +0,0 @@
title: Crazy Hamburger
author: Banana Farm
pubDate: Tue, 12 Mar 2024 16:53:47 GMT
---
😎 I don't like loosing.

8
blogs/day6.md Normal file
View file

@ -0,0 +1,8 @@
title: Cute
author: Rakarake
pubDate: Fri, Mar 27 2026
---
Warframe.
![a spinning golden banana](./golden-banana.gif "Oh Banana")

5
blogs/day7.md Normal file
View file

@ -0,0 +1,5 @@
title: A statement
author: Rakarake
pubDate: Fri, Mar 27 2026
---
Kyuuuuuuu! 🐳

View file

@ -34,7 +34,7 @@ fn main() -> io::Result<()> {
let mut channel = Channel::default();
channel.title = "MDF blog huge".to_string();
channel.link = "https://mdf.farm".to_string();
channel.description = "morbius text wow".to_string();
channel.description = "The MDF blog".to_string();
channel.generator = Some("Rakabaka's tooling".to_string());
channel.items = posts.iter().map(|(body, metadata)| {
let guid = metadata.get("guid").map(|guid|
@ -58,7 +58,9 @@ fn main() -> io::Result<()> {
let guid = metadata.get("guid").unwrap_or(&i.to_string()).clone();
let title = metadata.get("title").map(|title| format!("<h1>{title}</h1>")).unwrap_or("".to_string());
let pub_date = metadata.get("pubDate").map(|pub_date| format!("<i>{pub_date}</i>")).unwrap_or("".to_string());
format!("<div class=\"blogpost\" id={guid}>{title}{body}{pub_date}</div>")
let author = metadata.get("author").map(|author| format!("<i>{author}</i>")).unwrap_or("".to_string());
format!("<div class=\"blogpost\" id={guid}>{title}{body}<p>{author} - {pub_date}</p></div>")
}).collect::<Vec<String>>().concat())
},
"new" => {
@ -70,9 +72,9 @@ fn main() -> io::Result<()> {
let mut author = String::new();
io::stdin().read_line(&mut author).unwrap();
let pub_date = chrono::Utc::now();
let pub_date = chrono::Utc::now().format("%a, %b %e %Y");
print!("title: {title}author: {author}pubDate: {pub_date}");
print!("title: {title}author: {author}pubDate: {pub_date}\n---\n");
},
_ => eprintln!("need to specify 'rss', 'html' or 'new'"),
}