Compare commits

..

No commits in common. "0e9af4f540cf974bc2038f00c5528441f42b9760" and "84fea909cdb556e400161a6d9eb59a3f74c38d13" have entirely different histories.

8 changed files with 27 additions and 35 deletions

View File

@ -43,8 +43,6 @@
\usepackage{moresize} % Provides more font size commands (\HUGE and \ssmall) \usepackage{moresize} % Provides more font size commands (\HUGE and \ssmall)
\usepackage[none]{hyphenat}
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% PAGE LAYOUT % PAGE LAYOUT
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
--- ---
project: type = "Project"
url: git.huizinga.dev/Dreaded_X/automation_rs url = "git.huizinga.dev/Dreaded_X/automation_rs"
title: Home Automation title = "Home Automation"
--- ---
I have slowly been converting my house into my very own smart home! I have slowly been converting my house into my very own smart home!

View File

@ -1,7 +1,7 @@
--- ---
project: type = "Project"
url: git.huizinga.dev/Dreaded_X/car-stereo url = "git.huizinga.dev/Dreaded_X/car-stereo"
title: Car Stereo title = "Car Stereo"
--- ---
My Peugeot 207 only has bluetooth for calling, so I decided it would be fun to build my own bluetooth receiver using the [ESP32] microcontroller. My Peugeot 207 only has bluetooth for calling, so I decided it would be fun to build my own bluetooth receiver using the [ESP32] microcontroller.

View File

@ -1,7 +1,7 @@
--- ---
project: type = "Project"
url: git.huizinga.dev/Dreaded_X/pico_p1 url = "git.huizinga.dev/Dreaded_X/pico_p1"
title: Pico P1 title = "Pico P1"
--- ---
This is my most recent project, as I had recently decided to pick up a [Raspberry Pi Pico W] just to play around with. This is my most recent project, as I had recently decided to pick up a [Raspberry Pi Pico W] just to play around with.

View File

@ -1,7 +1,7 @@
--- ---
project: type = "Project"
url: git.huizinga.dev/Z80/Z80 url = "git.huizinga.dev/Z80/Z80"
title: Z80 Computer title = "Z80 Computer"
--- ---
The first big hardware project that I worked on was building a computer, from the ground up, around the [Z80] microprocessor. The first big hardware project that I worked on was building a computer, from the ground up, around the [Z80] microprocessor.

26
tool/Cargo.lock generated
View File

@ -31,7 +31,7 @@ checksum = "1cf2fb99fac0b821a4e61c61abff076324bb0e5c3b4a83815bbc3518a38971ad"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"yaml-rust", "toml",
] ]
[[package]] [[package]]
@ -40,12 +40,6 @@ version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "linked-hash-map"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "2.6.1" version = "2.6.1"
@ -156,6 +150,15 @@ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "toml"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "tool" name = "tool"
version = "0.1.0" version = "0.1.0"
@ -214,12 +217,3 @@ name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "yaml-rust"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
dependencies = [
"linked-hash-map",
]

View File

@ -9,7 +9,7 @@ edition = "2021"
anyhow = "1.0.75" anyhow = "1.0.75"
dotenvy = "0.15.7" dotenvy = "0.15.7"
gray_matter = { version = "0.2.6", features = [ gray_matter = { version = "0.2.6", features = [
"yaml", "toml",
], default-features = false } ], default-features = false }
regex = "1.9.4" regex = "1.9.4"
serde = { version = "1.0.188", features = ["derive"] } serde = { version = "1.0.188", features = ["derive"] }

View File

@ -4,13 +4,13 @@ use std::{
path::Path, path::Path,
}; };
use gray_matter::{engine::YAML, Matter}; use gray_matter::{engine::TOML, Matter};
use regex::{Captures, Regex}; use regex::{Captures, Regex};
use serde::Deserialize; use serde::Deserialize;
use walkdir::WalkDir; use walkdir::WalkDir;
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(rename_all = "snake_case")] #[serde(tag = "type")]
enum FrontMatter { enum FrontMatter {
Project { title: String, url: String }, Project { title: String, url: String },
} }
@ -26,7 +26,7 @@ fn main() -> anyhow::Result<()> {
} }
fn generate_latex() -> anyhow::Result<()> { fn generate_latex() -> anyhow::Result<()> {
let matter = Matter::<YAML>::new(); let matter = Matter::<TOML>::new();
let prefix = Path::new("../markdown"); let prefix = Path::new("../markdown");
@ -88,7 +88,7 @@ fn generate_readme() -> anyhow::Result<()> {
let mut contents = String::new(); let mut contents = String::new();
file.read_to_string(&mut contents)?; file.read_to_string(&mut contents)?;
let matter = Matter::<YAML>::new(); let matter = Matter::<TOML>::new();
let re = Regex::new(r"\#\{(.*)\}").expect("Regex should be valid"); let re = Regex::new(r"\#\{(.*)\}").expect("Regex should be valid");
let contents = re.replace_all(&contents, |caps: &Captures| { let contents = re.replace_all(&contents, |caps: &Captures| {