diff --git a/src/main.rs b/src/main.rs index a25bf2d..9e8b3ae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,7 +114,7 @@ fn main() { File::open(tpl_path.join("_head.html")).unwrap().read_to_string(&mut head_tpl).unwrap(); File::open(tpl_path.join("detail.html")).unwrap().read_to_string(&mut detail_tpl).unwrap(); - let mut thumbs = String::new(); + let mut thumbs = Vec::::new(); let mut channel : Channel = ChannelBuilder::default() .title("Piggo's Bread Gallery") @@ -126,6 +126,9 @@ fn main() { let mut channel_items = Vec::::new(); let mut hashes = hash_dict::HashDict::load(cwd.join(".hashes.txt")).unwrap(); + + // TODO separate thumbs by year and generate per-year pages + // TODO limit RSS to last N breads for bread in &breads { let date = bread.date.format("%Y/%m/%d").to_string(); @@ -174,7 +177,7 @@ fn main() { .replace("{img_alt}", &img_alt) .replace("{title}", &date); - thumbs.push_str(&thumb); + thumbs.push(thumb); } // Add to RSS @@ -220,8 +223,11 @@ fn main() { hashes.save(); { + // make thumbs go from the newest to the oldest + thumbs.reverse(); + println!("Building the gallery page"); - let main = main_tpl.replace("{breads}", &thumbs.trim()) + let main = main_tpl.replace("{breads}", &thumbs.join("").trim()) .replace("{head}", &head_tpl.replace("{title}", "Piggo's breads").trim()); let mut f = OpenOptions::new().write(true).truncate(true).create(true).open(web_path.join("index.html")).unwrap(); diff --git a/web/data/2019-01-31/2019-01-31 09.50.29.jpg b/web/data/2019-01-31/2019-01-31 09.50.29.jpg new file mode 100644 index 0000000..64ec3a5 Binary files /dev/null and b/web/data/2019-01-31/2019-01-31 09.50.29.jpg differ diff --git a/web/data/2019-01-31/2019-01-31 09.51.46.jpg b/web/data/2019-01-31/2019-01-31 09.51.46.jpg new file mode 100644 index 0000000..33897b6 Binary files /dev/null and b/web/data/2019-01-31/2019-01-31 09.51.46.jpg differ diff --git a/web/data/2019-01-31/2019-01-31 10.58.43 cover.jpg b/web/data/2019-01-31/2019-01-31 10.58.43 cover.jpg new file mode 100644 index 0000000..ce564cc Binary files /dev/null and b/web/data/2019-01-31/2019-01-31 10.58.43 cover.jpg differ diff --git a/web/data/2019-01-31/2019-01-31 11.13.07.jpg b/web/data/2019-01-31/2019-01-31 11.13.07.jpg new file mode 100644 index 0000000..a1250b1 Binary files /dev/null and b/web/data/2019-01-31/2019-01-31 11.13.07.jpg differ diff --git a/web/data/2019-01-31/note.txt b/web/data/2019-01-31/note.txt new file mode 100644 index 0000000..e5caca2 --- /dev/null +++ b/web/data/2019-01-31/note.txt @@ -0,0 +1,12 @@ +Testing my new rattan basket. It was time for an upgrade ^_^ + +Shape is ok, but the bread came out tasting a little sour. sourdough duh + +But it's because of poor planning, I started it too late in the day so +it wasn't ready by the time I went to bed, and in the morning it was "over-proofed". + +also forgot to score it, oops + +Gonna be more careful next time. It'll taste better when it cools down, I'm sure + +*update: it tastes fine after a few hours!* diff --git a/web/feed.xml b/web/feed.xml index 9b0afd6..33873be 100644 --- a/web/feed.xml +++ b/web/feed.xml @@ -246,5 +246,25 @@ https://www.ondrovo.com/bread/2019-01-28.html Mon, 28 Jan 2019 12:00:00 +0000 + + 2019/01/31 + https://www.ondrovo.com/bread/2019-01-31.html + + Testing my new rattan basket. It was time for an upgrade ^_^

+ +

Shape is ok, but the bread came out tasting a little sour. sourdough duh

+ +

But it’s because of poor planning, I started it too late in the day so it wasn’t ready by the time I went to bed, and in the morning it was "over-proofed".

+ +

also forgot to score it, oops

+ +

Gonna be more careful next time. It’ll taste better when it cools down, I’m sure

+ +

update: it tastes fine after a few hours!

+2019-01-31 10.58.43 cover.jpg

Open the link for more...

]]> +
+ https://www.ondrovo.com/bread/2019-01-31.html + Thu, 31 Jan 2019 12:00:00 +0000 +
\ No newline at end of file