commit 57f30c4b5f77b1811d6d72bafc916f52d104190b Author: Ondřej Hruška Date: Fri Jan 25 00:12:05 2019 +0100 initial diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..332008f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/target +**/*.rs.bk +.idea/ diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..1febf09 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,177 @@ +[[package]] +name = "aho-corasick" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bread" +version = "0.1.0" +dependencies = [ + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "markdown 0.2.0 (git+https://github.com/johannhof/markdown.rs)", +] + +[[package]] +name = "cfg-if" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "chrono" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lazy_static" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libc" +version = "0.2.47" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "markdown" +version = "0.2.0" +source = "git+https://github.com/johannhof/markdown.rs#788aa51284ef71e18bf237f91a4c7cb77de6dbaf" +dependencies = [ + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pipeline 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memchr" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-integer" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pipeline" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "redox_syscall" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "regex" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "time" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ucd-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "utf8-ranges" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" +"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" +"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" +"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" +"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" +"checksum libc 0.2.47 (registry+https://github.com/rust-lang/crates.io-index)" = "48450664a984b25d5b479554c29cc04e3150c97aa4c01da5604a2d4ed9151476" +"checksum markdown 0.2.0 (git+https://github.com/johannhof/markdown.rs)" = "" +"checksum memchr 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e1dd4eaac298c32ce07eb6ed9242eda7d82955b9170b7d6db59b2e02cc63fcb8" +"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" +"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" +"checksum pipeline 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d15b6607fa632996eb8a17c9041cb6071cb75ac057abd45dece578723ea8c7c0" +"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4189129 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "bread" +version = "0.1.0" +authors = ["Ondřej Hruška "] +edition = "2018" + +[dependencies] +markdown = { git = "https://github.com/johannhof/markdown.rs" } +chrono = "0.4" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..660dda9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,136 @@ +use std::env; +use std::fs; +use std::fs::DirEntry; +use std::fs::File; +use std::io::prelude::*; +use std::path::{Path, PathBuf}; +use chrono; +use chrono::NaiveDate; +use markdown; +use std::fs::OpenOptions; + +#[derive(Debug)] +struct Bread { + path: PathBuf, + rel_path: PathBuf, + date: chrono::NaiveDate, + note: String, + images: Vec, +} + +impl Bread { + fn thumb_photo(&self) -> (&str, &str) { + let first_img : &PathBuf = self.images.get(0).unwrap(); + + let img_path = first_img.to_str().unwrap(); + let img_alt = first_img.file_name().unwrap().to_str().unwrap(); + + (img_path, img_alt) + } + + fn parse(base_dir : &PathBuf, bread_dir : &DirEntry) -> Result { + let bpath = bread_dir.path(); + let mut note = String::new(); + + let mut note_path = bpath.join("note.txt"); + + // try a md one as a fallback + if !note_path.exists() { + note_path = bpath.join("note.md"); + } + + if note_path.exists() { + let mut note_file = File::open(note_path)?; + note_file.read_to_string(&mut note)?; + note = markdown::to_html(¬e); + } + + 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())); + + let images = bread_files.iter().filter(|&f| { + let fname = f.file_name(); + let name = fname.to_str().unwrap(); + return + name.ends_with(".png") || + name.ends_with(".jpg") || + name.ends_with(".jpeg") || + name.ends_with(".gif"); + }).map(|x| x.path().strip_prefix(base_dir).unwrap().to_path_buf()).collect(); + + return Ok(Bread { + date: NaiveDate::parse_from_str(bpath.file_name().unwrap().to_str().unwrap(), "%Y-%m-%d").unwrap(), + rel_path: bpath.strip_prefix(base_dir).unwrap().to_path_buf(), + path: bpath, + note, + images + }); + } +} + +fn main() { + let cwd = env::current_dir().unwrap(); + let web_path = Path::new(&cwd).join("web"); + let data_path = web_path.join("data"); + let tpl_path = web_path.join("templates"); + + let mut bread_dirs: Vec = fs::read_dir(&data_path).unwrap().map(|e| e.unwrap()).collect(); + bread_dirs.sort_by(|x, y| x.file_name().cmp(&y.file_name())); + + let mut breads : Vec = Vec::new(); + + for bread_dir in bread_dirs { + if let Ok(b) = Bread::parse(&web_path, &bread_dir) { + breads.push(b); + } + } + + let mut main_tpl = String::new(); + let mut thumb_tpl = String::new(); + let mut detail_tpl = String::new(); + File::open(tpl_path.join("index.html")).unwrap().read_to_string(&mut main_tpl).unwrap(); + File::open(tpl_path.join("_thumb.html")).unwrap().read_to_string(&mut thumb_tpl).unwrap(); + File::open(tpl_path.join("detail.html")).unwrap().read_to_string(&mut detail_tpl).unwrap(); + + let mut thumbs = String::new(); + + for bread in &breads { + let date = bread.date.format("%Y/%m/%d").to_string(); + let detail_file = bread.date.format("%Y-%m-%d.html").to_string(); + + let (img_path, img_alt) = bread.thumb_photo(); + + let thumb = thumb_tpl + .replace("{detail_url}", &detail_file) + .replace("{img_src}", &img_path) + .replace("{img_alt}", &img_alt) + .replace("{title}", &date); + + thumbs.push_str(&thumb); + + { + let detail = detail_tpl + .replace("{title}", &date) + .replace("{note}", if bread.note.is_empty() { "There's no note about this bread." } else { &bread.note }); + + let mut pics = String::new(); + for img in &bread.images { + pics.push_str(&"".replace("{src}", img.to_str().unwrap())) + } + + let detail = detail.replace("{images}", &pics); + + let mut f = OpenOptions::new().write(true).truncate(true).create(true).open(web_path.join(detail_file)).unwrap(); + f.write(detail.as_bytes()).unwrap(); + } + } + + // TODO generate a RSS feed + + let main = main_tpl.replace("{breads}", &thumbs); + + { + let mut f = OpenOptions::new().write(true).truncate(true).create(true).open(web_path.join("index.html")).unwrap(); + f.write(main.as_bytes()).unwrap(); + } +} diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..36f1ae9 --- /dev/null +++ b/web/.gitignore @@ -0,0 +1 @@ +./*.html \ No newline at end of file diff --git a/web/assets/style.css b/web/assets/style.css new file mode 100644 index 0000000..3960cd4 --- /dev/null +++ b/web/assets/style.css @@ -0,0 +1,82 @@ +html, body { + font-family: "Helvetica Neue", "DejaVu Sans", "Noto Sans", Helvetica, Arial, sans-serif; + background: #404040; + color: white; +} + +h1 { + text-align: center; +} + +.MainGallery { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.BreadThumb { + margin: 10px; + cursor: pointer; +} + +.BreadThumb img { + max-height: 300px; + box-shadow: 0 0 5px black; + border-radius: 5px; +} + +.BreadThumb header { + padding-bottom: 5px; + font-weight: bold; + padding-left: 3px; +} + +a { + text-decoration: none; + color: white; +} + +.BreadDetail { + +} + +.BreadDetail .note { + display: block; + margin: 0 auto 10px; + max-width: 800px; + + padding: 10px; + + border-left: 6px solid #676767; + background: rgba(29, 29, 29, 0.25); +} + +.BreadDetail .note a { + color: #9bd6fc; + text-decoration: underline; +} + +.BreadDetail .note p:first-child { + margin-top: 0; +} + +.BreadDetail .note p:last-child { + margin-bottom: 0; +} + +.BreadDetail .images { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: center; + align-items: center; +} + +.BreadDetail .images img { + margin: 10px; + max-height: 500px; + box-shadow: 0 0 5px black; + border-radius: 5px; +} \ No newline at end of file diff --git a/web/data/2018-09-19/dgs - 1 sep 19.jpg b/web/data/2018-09-19/dgs - 1 sep 19.jpg new file mode 100644 index 0000000..4329087 Binary files /dev/null and b/web/data/2018-09-19/dgs - 1 sep 19.jpg differ diff --git a/web/data/2018-09-19/dgs - 2 sep 19.jpg b/web/data/2018-09-19/dgs - 2 sep 19.jpg new file mode 100644 index 0000000..5aa86b6 Binary files /dev/null and b/web/data/2018-09-19/dgs - 2 sep 19.jpg differ diff --git a/web/data/2018-09-19/note.txt b/web/data/2018-09-19/note.txt new file mode 100644 index 0000000..c4ba1df --- /dev/null +++ b/web/data/2018-09-19/note.txt @@ -0,0 +1,4 @@ +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. diff --git a/web/data/2018-09-26/dgs - 3 sep 26.jpg b/web/data/2018-09-26/dgs - 3 sep 26.jpg new file mode 100644 index 0000000..c6583e3 Binary files /dev/null and b/web/data/2018-09-26/dgs - 3 sep 26.jpg differ diff --git a/web/data/2018-09-26/dgs - 4 sep 27.jpg b/web/data/2018-09-26/dgs - 4 sep 27.jpg new file mode 100644 index 0000000..007fcad Binary files /dev/null and b/web/data/2018-09-26/dgs - 4 sep 27.jpg differ diff --git a/web/data/2018-09-26/note.txt b/web/data/2018-09-26/note.txt new file mode 100644 index 0000000..ce2a364 --- /dev/null +++ b/web/data/2018-09-26/note.txt @@ -0,0 +1 @@ +My first sourdough bread. I added coriander seeds to it. Pretty good diff --git a/web/data/2018-09-30/dgs - 5 sep 30.jpg b/web/data/2018-09-30/dgs - 5 sep 30.jpg new file mode 100644 index 0000000..ed5bb37 Binary files /dev/null and b/web/data/2018-09-30/dgs - 5 sep 30.jpg differ diff --git a/web/data/2018-09-30/dgs - 6 sep 30.jpg b/web/data/2018-09-30/dgs - 6 sep 30.jpg new file mode 100644 index 0000000..e06072b Binary files /dev/null and b/web/data/2018-09-30/dgs - 6 sep 30.jpg differ diff --git a/web/data/2018-09-30/dgs - 7 sep 30.jpg b/web/data/2018-09-30/dgs - 7 sep 30.jpg new file mode 100644 index 0000000..ff3caea Binary files /dev/null and b/web/data/2018-09-30/dgs - 7 sep 30.jpg differ diff --git a/web/data/2018-09-30/dgs - 8 sep 30.jpg b/web/data/2018-09-30/dgs - 8 sep 30.jpg new file mode 100644 index 0000000..68257d3 Binary files /dev/null and b/web/data/2018-09-30/dgs - 8 sep 30.jpg differ diff --git a/web/data/2018-09-30/node.txt b/web/data/2018-09-30/node.txt new file mode 100644 index 0000000..77dc31c --- /dev/null +++ b/web/data/2018-09-30/node.txt @@ -0,0 +1 @@ +nice crust, but it had huge holes in it. idk why diff --git a/web/data/2018-10-04/dgs - 9 oct 4.jpg b/web/data/2018-10-04/dgs - 9 oct 4.jpg new file mode 100644 index 0000000..cfc766a Binary files /dev/null and b/web/data/2018-10-04/dgs - 9 oct 4.jpg differ diff --git a/web/data/2018-10-04/note.txt b/web/data/2018-10-04/note.txt new file mode 100644 index 0000000..ba60583 --- /dev/null +++ b/web/data/2018-10-04/note.txt @@ -0,0 +1 @@ +Tried cutting the dough blob before baking, like I saw in some tutorial. I think I overdid it a bit diff --git a/web/data/2018-10-09/dgs - 10 oct 9.jpg b/web/data/2018-10-09/dgs - 10 oct 9.jpg new file mode 100644 index 0000000..debab51 Binary files /dev/null and b/web/data/2018-10-09/dgs - 10 oct 9.jpg differ diff --git a/web/data/2018-10-09/dgs - 11 oct 9.jpg b/web/data/2018-10-09/dgs - 11 oct 9.jpg new file mode 100644 index 0000000..40270ec Binary files /dev/null and b/web/data/2018-10-09/dgs - 11 oct 9.jpg differ diff --git a/web/data/2018-10-09/note.txt b/web/data/2018-10-09/note.txt new file mode 100644 index 0000000..f4ea2d3 --- /dev/null +++ b/web/data/2018-10-09/note.txt @@ -0,0 +1 @@ +a bit flat, but tasty diff --git a/web/data/2018-10-15/dgs - 12 oct 15.jpg b/web/data/2018-10-15/dgs - 12 oct 15.jpg new file mode 100644 index 0000000..482819e Binary files /dev/null and b/web/data/2018-10-15/dgs - 12 oct 15.jpg differ diff --git a/web/data/2018-10-15/note.txt b/web/data/2018-10-15/note.txt new file mode 100644 index 0000000..10ad239 --- /dev/null +++ b/web/data/2018-10-15/note.txt @@ -0,0 +1 @@ +nice crust diff --git a/web/data/2018-10-20/dgs - 13 oct 20.jpg b/web/data/2018-10-20/dgs - 13 oct 20.jpg new file mode 100644 index 0000000..953ddb9 Binary files /dev/null and b/web/data/2018-10-20/dgs - 13 oct 20.jpg differ diff --git a/web/data/2018-10-20/note.txt b/web/data/2018-10-20/note.txt new file mode 100644 index 0000000..91b86b2 --- /dev/null +++ b/web/data/2018-10-20/note.txt @@ -0,0 +1 @@ +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 diff --git a/web/data/2018-10-24/dgs - 14 oct 24.jpg b/web/data/2018-10-24/dgs - 14 oct 24.jpg new file mode 100644 index 0000000..eb42797 Binary files /dev/null and b/web/data/2018-10-24/dgs - 14 oct 24.jpg differ diff --git a/web/data/2018-10-30/dgs - 15 oct 30.jpg b/web/data/2018-10-30/dgs - 15 oct 30.jpg new file mode 100644 index 0000000..436be1b Binary files /dev/null and b/web/data/2018-10-30/dgs - 15 oct 30.jpg differ diff --git a/web/data/2018-10-30/dgs - 16 oct 30.jpg b/web/data/2018-10-30/dgs - 16 oct 30.jpg new file mode 100644 index 0000000..e96f501 Binary files /dev/null and b/web/data/2018-10-30/dgs - 16 oct 30.jpg differ diff --git a/web/data/2018-10-30/note.txt b/web/data/2018-10-30/note.txt new file mode 100644 index 0000000..12722db --- /dev/null +++ b/web/data/2018-10-30/note.txt @@ -0,0 +1 @@ +this came out a bit more "rustic" than usual. the cracked crust looks nice, but it makes slicing difficult diff --git a/web/data/2018-11-06/dgs - 17 nov 6.jpg b/web/data/2018-11-06/dgs - 17 nov 6.jpg new file mode 100644 index 0000000..ff6451a Binary files /dev/null and b/web/data/2018-11-06/dgs - 17 nov 6.jpg differ diff --git a/web/data/2018-11-06/note.txt b/web/data/2018-11-06/note.txt new file mode 100644 index 0000000..368bcfe --- /dev/null +++ b/web/data/2018-11-06/note.txt @@ -0,0 +1 @@ +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 diff --git a/web/data/2018-11-20/dgs - 18 - nov 20.jpg b/web/data/2018-11-20/dgs - 18 - nov 20.jpg new file mode 100644 index 0000000..2d32e3c Binary files /dev/null and b/web/data/2018-11-20/dgs - 18 - nov 20.jpg differ diff --git a/web/data/2018-11-20/note.txt b/web/data/2018-11-20/note.txt new file mode 100644 index 0000000..17b2fbe --- /dev/null +++ b/web/data/2018-11-20/note.txt @@ -0,0 +1 @@ +cracked crust again diff --git a/web/data/2018-12-28/note.txt b/web/data/2018-12-28/note.txt new file mode 100644 index 0000000..4993fc0 --- /dev/null +++ b/web/data/2018-12-28/note.txt @@ -0,0 +1,2 @@ +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. +I threw the whole thing out and refreshed the starter for about a week. diff --git a/web/data/2018-12-28/pleroma - 2018-12-28.jpg b/web/data/2018-12-28/pleroma - 2018-12-28.jpg new file mode 100644 index 0000000..238d533 Binary files /dev/null and b/web/data/2018-12-28/pleroma - 2018-12-28.jpg differ diff --git a/web/data/2019-01-02/note.txt b/web/data/2019-01-02/note.txt new file mode 100644 index 0000000..c880bee --- /dev/null +++ b/web/data/2019-01-02/note.txt @@ -0,0 +1 @@ +First bread with the renewed starter culture. Didn't rise much, but tasted okay. diff --git a/web/data/2019-01-02/pleroma - 2019-01-02.jpg b/web/data/2019-01-02/pleroma - 2019-01-02.jpg new file mode 100644 index 0000000..9c2d5aa Binary files /dev/null and b/web/data/2019-01-02/pleroma - 2019-01-02.jpg differ diff --git a/web/data/2019-01-06/note.txt b/web/data/2019-01-06/note.txt new file mode 100644 index 0000000..5dc4628 --- /dev/null +++ b/web/data/2019-01-06/note.txt @@ -0,0 +1 @@ +that's more like it diff --git a/web/data/2019-01-06/pleroma - 2019-01-06.jpg b/web/data/2019-01-06/pleroma - 2019-01-06.jpg new file mode 100644 index 0000000..b5994f1 Binary files /dev/null and b/web/data/2019-01-06/pleroma - 2019-01-06.jpg differ diff --git a/web/data/2019-01-08/note.txt b/web/data/2019-01-08/note.txt new file mode 100644 index 0000000..90d74ca --- /dev/null +++ b/web/data/2019-01-08/note.txt @@ -0,0 +1 @@ +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. diff --git a/web/data/2019-01-08/pleroma - 2019-01-08.jpg b/web/data/2019-01-08/pleroma - 2019-01-08.jpg new file mode 100644 index 0000000..8acc351 Binary files /dev/null and b/web/data/2019-01-08/pleroma - 2019-01-08.jpg differ diff --git a/web/data/2019-01-08/pleroma - 2019-01-09.jpg b/web/data/2019-01-08/pleroma - 2019-01-09.jpg new file mode 100644 index 0000000..0a6a914 Binary files /dev/null and b/web/data/2019-01-08/pleroma - 2019-01-09.jpg differ diff --git a/web/data/2019-01-10/note.txt b/web/data/2019-01-10/note.txt new file mode 100644 index 0000000..3eeb44b --- /dev/null +++ b/web/data/2019-01-10/note.txt @@ -0,0 +1,13 @@ +Trying to bake a baguette with a recipe I got from Dashie. +It tasted okay, but I'll stick with bread. + +the weird shape is due to limited baking space - I baked it (like all the other breads) in a [Remoska](http://remoska.cz/). + +here's the recipe: + +- 340ml water ~25°C +- 2 tablespoon of oil (used sunflower one) +- 2 coffee spoons of salt +- 4 coffee spoon of sugar +- 560gr of T55 type flour +- 5g of *instant* yeast (bought in a bunch of small bags) diff --git a/web/data/2019-01-10/pleroma - 2019-01-10 a.jpg b/web/data/2019-01-10/pleroma - 2019-01-10 a.jpg new file mode 100644 index 0000000..ecee190 Binary files /dev/null and b/web/data/2019-01-10/pleroma - 2019-01-10 a.jpg differ diff --git a/web/data/2019-01-10/pleroma - 2019-01-10 b.jpg b/web/data/2019-01-10/pleroma - 2019-01-10 b.jpg new file mode 100644 index 0000000..ed73e1b Binary files /dev/null and b/web/data/2019-01-10/pleroma - 2019-01-10 b.jpg differ diff --git a/web/data/2019-01-11/note.txt b/web/data/2019-01-11/note.txt new file mode 100644 index 0000000..fdc6478 --- /dev/null +++ b/web/data/2019-01-11/note.txt @@ -0,0 +1 @@ +this one was very good diff --git a/web/data/2019-01-11/pleroma - 2019-01-11 a.jpg b/web/data/2019-01-11/pleroma - 2019-01-11 a.jpg new file mode 100644 index 0000000..3a80ffc Binary files /dev/null and b/web/data/2019-01-11/pleroma - 2019-01-11 a.jpg differ diff --git a/web/data/2019-01-11/pleroma - 2019-01-11 b.jpg b/web/data/2019-01-11/pleroma - 2019-01-11 b.jpg new file mode 100644 index 0000000..8c7711d Binary files /dev/null and b/web/data/2019-01-11/pleroma - 2019-01-11 b.jpg differ diff --git a/web/data/2019-01-14/note.txt b/web/data/2019-01-14/note.txt new file mode 100644 index 0000000..c24ff0f --- /dev/null +++ b/web/data/2019-01-14/note.txt @@ -0,0 +1,2 @@ +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. diff --git a/web/data/2019-01-14/pleroma - 2019-01-14.jpg b/web/data/2019-01-14/pleroma - 2019-01-14.jpg new file mode 100644 index 0000000..4640047 Binary files /dev/null and b/web/data/2019-01-14/pleroma - 2019-01-14.jpg differ diff --git a/web/data/2019-01-19/note.txt b/web/data/2019-01-19/note.txt new file mode 100644 index 0000000..a02dc41 --- /dev/null +++ b/web/data/2019-01-19/note.txt @@ -0,0 +1,3 @@ +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 diff --git a/web/data/2019-01-19/pleroma - 2019-01-19 a.jpg b/web/data/2019-01-19/pleroma - 2019-01-19 a.jpg new file mode 100644 index 0000000..fa372b3 Binary files /dev/null and b/web/data/2019-01-19/pleroma - 2019-01-19 a.jpg differ diff --git a/web/data/2019-01-19/pleroma - 2019-01-19 b.jpg b/web/data/2019-01-19/pleroma - 2019-01-19 b.jpg new file mode 100644 index 0000000..9b1feb9 Binary files /dev/null and b/web/data/2019-01-19/pleroma - 2019-01-19 b.jpg differ diff --git a/web/templates/_thumb.html b/web/templates/_thumb.html new file mode 100644 index 0000000..8f8c6f6 --- /dev/null +++ b/web/templates/_thumb.html @@ -0,0 +1,4 @@ +
+
{title}
+ {img_alt} +
diff --git a/web/templates/detail.html b/web/templates/detail.html new file mode 100644 index 0000000..c531a68 --- /dev/null +++ b/web/templates/detail.html @@ -0,0 +1,23 @@ + + + + + Breads + + + + + + + +

{title}

+ +
+
{note}
+ +
+ {images} +
+
+ + diff --git a/web/templates/index.html b/web/templates/index.html new file mode 100644 index 0000000..d135553 --- /dev/null +++ b/web/templates/index.html @@ -0,0 +1,19 @@ + + + + + Breads + + + + + + + +

Piggo's Bread Gallery

+ +
+ {breads} +
+ +