diff --git a/src/main.rs b/src/main.rs
index 9e8b3ae..1e5eb99 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -27,6 +27,7 @@ struct Bread {
rel_path: PathBuf,
date: chrono::NaiveDate,
note: String,
+ rss_note: String,
images: Vec,
}
@@ -50,13 +51,19 @@ impl Bread {
fn parse(base_dir : &PathBuf, bread_dir : &DirEntry) -> Result {
let bpath = bread_dir.path();
let mut note = String::new();
+ let mut rss_note = String::new();
let mut note_path = bpath.join("note.txt");
+ let mut rss_note_path = bpath.join("rss.txt");
// try a md one as a fallback
if !note_path.exists() {
note_path = bpath.join("note.md");
}
+
+ if !rss_note_path.exists() {
+ rss_note_path = bpath.join("rss.md");
+ }
if note_path.exists() {
let mut note_file = File::open(note_path)?;
@@ -64,6 +71,12 @@ impl Bread {
note = markdown::to_html(¬e);
}
+ if rss_note_path.exists() {
+ let mut note_file = File::open(rss_note_path)?;
+ note_file.read_to_string(&mut rss_note)?;
+ rss_note = markdown::to_html(&rss_note);
+ }
+
let mut bread_files: Vec = fs::read_dir(&bpath)?.map(|e| e.unwrap()).collect();
bread_files.sort_by(|x, y| x.file_name().cmp(&y.file_name()));
@@ -82,6 +95,7 @@ impl Bread {
rel_path: bpath.strip_prefix(base_dir).unwrap().to_path_buf(),
path: bpath,
note,
+ rss_note,
images
});
}
@@ -139,6 +153,7 @@ fn main() {
let (img_path, img_alt) = bread.thumb_photo();
let note = if bread.note.is_empty() { "There's no note about this bread." } else { &bread.note };
+ let rss_note = &bread.rss_note;
let thumb_fname = date_slug.clone() + "." + Path::new(&img_path).extension().unwrap().to_str().unwrap();
let thumb_path = thumbs_path.join(&thumb_fname);
@@ -191,11 +206,18 @@ fn main() {
let date_formatted : Date = chrono::Utc.from_local_date(&bread.date).unwrap();
let dt = date_formatted.and_hms(12,0,0);
+
+ let mut descr = String::new();
+ if !rss_note.is_empty() {
+ descr.push_str(&(rss_note.to_string() + ""));
+ }
+ descr.push_str(note);
+ descr.push_str(&format!("
Open the link for full-res photos ({} total)", image_url, img_alt, bread.images.len()));
channel_items.push(ItemBuilder::default()
.title(date.clone())
.link(link.clone())
- .description(note.to_string() + &format!("
Open the link for more...
", image_url, img_alt))
+ .description(descr)
.guid(guid)
.pub_date(dt.to_rfc2822())
.build().unwrap());
diff --git a/web/data/2019-01-28/2019-01-28 16.21.27 cover.jpg b/web/data/2019-01-28/2019-01-28 16.21.27 cover.jpg
index 736f950..8cb614e 100644
Binary files a/web/data/2019-01-28/2019-01-28 16.21.27 cover.jpg and b/web/data/2019-01-28/2019-01-28 16.21.27 cover.jpg differ
diff --git a/web/data/2019-02-02/2019-02-02 20.54.28.jpg b/web/data/2019-02-02/2019-02-02 20.54.28.jpg
new file mode 100644
index 0000000..a1c3d70
Binary files /dev/null and b/web/data/2019-02-02/2019-02-02 20.54.28.jpg differ
diff --git a/web/data/2019-02-02/note.txt b/web/data/2019-02-02/note.txt
new file mode 100644
index 0000000..1d1fb69
--- /dev/null
+++ b/web/data/2019-02-02/note.txt
@@ -0,0 +1 @@
+Scoring came out great this time.
diff --git a/web/data/2019-02-02/rss.txt b/web/data/2019-02-02/rss.txt
new file mode 100644
index 0000000..2539d2c
--- /dev/null
+++ b/web/data/2019-02-02/rss.txt
@@ -0,0 +1,3 @@
+**time flies, huh? there's a new bread already!**
+
+*New:* The bread gallery is now sorted from the newest bread. Check it out!
diff --git a/web/feed.xml b/web/feed.xml
index 33873be..f8bde5b 100644
--- a/web/feed.xml
+++ b/web/feed.xml
@@ -10,7 +10,7 @@
This was my first bread ever.
I didn’t have a sourdough starter yet, so it used store-bought yeast. It looked okay, tasted mediocre.
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2018-09-19.htmlWed, 19 Sep 2018 12:00:00 +0000
@@ -20,7 +20,7 @@
https://www.ondrovo.com/bread/2018-09-26.html
My first sourdough bread. I added coriander seeds to it. Pretty good
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2018-09-26.htmlWed, 26 Sep 2018 12:00:00 +0000
@@ -30,7 +30,7 @@
https://www.ondrovo.com/bread/2018-09-30.html
nice crust, but it had huge holes in it. idk why
-
Open the link for more...
]]>
+
Open the link for full-res photos (4 total)]]>
https://www.ondrovo.com/bread/2018-09-30.htmlSun, 30 Sep 2018 12:00:00 +0000
@@ -40,7 +40,7 @@
https://www.ondrovo.com/bread/2018-10-04.html
Tried cutting the dough blob before baking, like I saw in some tutorial. I think I overdid it a bit
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2018-10-04.htmlThu, 4 Oct 2018 12:00:00 +0000
@@ -50,7 +50,7 @@
https://www.ondrovo.com/bread/2018-10-09.html
a bit flat, but tasty
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2018-10-09.htmlTue, 9 Oct 2018 12:00:00 +0000
@@ -60,7 +60,7 @@
https://www.ondrovo.com/bread/2018-10-15.html
nice crust
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2018-10-15.htmlMon, 15 Oct 2018 12:00:00 +0000
@@ -70,7 +70,7 @@
https://www.ondrovo.com/bread/2018-10-20.html
I made the dough too runny–too much water–so it spilled over the whole baking form. That’s why it’s round. I dont remember what it tasted like, probably average
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2018-10-20.htmlSat, 20 Oct 2018 12:00:00 +0000
@@ -79,7 +79,7 @@
2018/10/24
https://www.ondrovo.com/bread/2018-10-24.html
- There's no note about this bread.
Open the link for more...
]]>
+ There's no note about this bread.
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2018-10-24.htmlWed, 24 Oct 2018 12:00:00 +0000
@@ -89,7 +89,7 @@
https://www.ondrovo.com/bread/2018-10-30.html
this came out a bit more "rustic" than usual. the cracked crust looks nice, but it makes slicing difficult
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2018-10-30.htmlTue, 30 Oct 2018 12:00:00 +0000
@@ -99,7 +99,7 @@
https://www.ondrovo.com/bread/2018-11-06.html
Experimenting with chia seeds. Tasted okay, but a lot of the seeds didn’t stick to the bread. Maybe I should’ve put them in water for a bit first.. they get all slimy in water, might stick better
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2018-11-06.htmlTue, 6 Nov 2018 12:00:00 +0000
@@ -109,7 +109,7 @@
https://www.ondrovo.com/bread/2018-11-20.html
cracked crust again
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2018-11-20.htmlTue, 20 Nov 2018 12:00:00 +0000
@@ -121,7 +121,7 @@
I didn’t bake any bread for almost a month and the starter culture went bad. This bread didn’t rise at all and was super sour.
Was planning to eat it, but it was just disgusting. I threw the whole thing out and refreshed the starter for about a week.
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2018-12-28.htmlFri, 28 Dec 2018 12:00:00 +0000
@@ -131,7 +131,7 @@
https://www.ondrovo.com/bread/2019-01-02.html
First bread with the renewed starter culture. Didn’t rise much, but tasted okay.
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2019-01-02.htmlWed, 2 Jan 2019 12:00:00 +0000
@@ -141,7 +141,7 @@
https://www.ondrovo.com/bread/2019-01-06.html
that’s more like it
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2019-01-06.htmlSun, 6 Jan 2019 12:00:00 +0000
@@ -151,7 +151,7 @@
https://www.ondrovo.com/bread/2019-01-08.html
trying a new recipe - I may have finally found the right ratio of rye vs wheat flour. It’s quite simple - 1:1. Baked with 200g of each and one spoon of salt. Note the starter is rye only, so it counts into the rye amount.
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2019-01-08.htmlTue, 8 Jan 2019 12:00:00 +0000
@@ -179,7 +179,7 @@
5g of instant yeast (bought in a bunch of small bags)
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2019-01-10.htmlThu, 10 Jan 2019 12:00:00 +0000
@@ -189,7 +189,7 @@
https://www.ondrovo.com/bread/2019-01-11.html
this one was very good
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2019-01-11.htmlFri, 11 Jan 2019 12:00:00 +0000
@@ -199,7 +199,7 @@
https://www.ondrovo.com/bread/2019-01-14.html
nice texture, not cracked at all. this is because I added some water into the baking form, so it made steam. like you’re supposed to.
-
Open the link for more...
]]>
+
Open the link for full-res photos (1 total)]]>
https://www.ondrovo.com/bread/2019-01-14.htmlMon, 14 Jan 2019 12:00:00 +0000
@@ -211,7 +211,7 @@
made the dough too dry, so it couldn’t rise properly. also didn’t do the steam thing. all in all a disaster
but it tasted okay regardless
-
Open the link for more...
]]>
+
Open the link for full-res photos (2 total)]]>
https://www.ondrovo.com/bread/2019-01-19.htmlSat, 19 Jan 2019 12:00:00 +0000
@@ -225,7 +225,7 @@
The starter with rye was sitting in its bowl overnight, then I mixed it with wheat, salt and spices in the morning and let it do its work til about 2 PM. The dough was nice and stringy, as you can see in the pictures.
Also the crust came out excellent, not too thick and crunchy.
-
Open the link for more...
]]>
+
Open the link for full-res photos (3 total)]]>
https://www.ondrovo.com/bread/2019-01-23.htmlWed, 23 Jan 2019 12:00:00 +0000
@@ -241,7 +241,7 @@
I also don’t normally score the bread, after the last experiment failed so spectacularly. This was still too deep, but it turned out a lot better.
And it tastes pretty damn good!
-
Open the link for more...
]]>
+
Open the link for full-res photos (4 total)]]>
https://www.ondrovo.com/bread/2019-01-28.htmlMon, 28 Jan 2019 12:00:00 +0000
@@ -261,10 +261,23 @@
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!
-
Open the link for more...
]]>
+
Open the link for full-res photos (4 total)]]>
https://www.ondrovo.com/bread/2019-01-31.htmlThu, 31 Jan 2019 12:00:00 +0000
+
+ 2019/02/02
+ https://www.ondrovo.com/bread/2019-02-02.html
+
+ time flies, huh? there’s a new bread already!
+
+
New: The bread gallery is now sorted from the newest bread. Check it out!
+
Scoring came out great this time.
+
Open the link for full-res photos (1 total)]]>
+
+ https://www.ondrovo.com/bread/2019-02-02.html
+ Sat, 2 Feb 2019 12:00:00 +0000
+
\ No newline at end of file