summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorveradec <glitchmill.dyj3d@simplelogin.co>2026-10-28 11:26:02 +0530
committerveradec <glitchmill.dyj3d@simplelogin.co>2026-10-28 11:26:02 +0530
commit7dad60632a3f5ca307f015c4203abfe0c3a9e1d8 (patch)
treea7684d076b5722eb70ab46ece6f142612b9b2df0
parentc8a959a65e6fe5d3d33dd0befe91438841cddbf4 (diff)
move stuff from previous blog to content/ to test. walkdirs perfect
-rw-r--r--Cargo.lock51
-rw-r--r--Cargo.toml2
-rw-r--r--content/about.md19
-rw-r--r--content/index.md1
-rw-r--r--content/posts/drum-sequencer.md40
-rw-r--r--content/posts/hello.md6
-rw-r--r--content/posts/not-all-hackathons-are-built-the-same.md6
-rw-r--r--src/main.rs78
8 files changed, 177 insertions, 26 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 4d35cc9..8dd6643 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,10 +3,18 @@
version = 4
[[package]]
+name = "anyhow"
+version = "1.0.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
+
+[[package]]
name = "lavender"
version = "0.1.0"
dependencies = [
+ "anyhow",
"markdown",
+ "walkdir",
]
[[package]]
@@ -19,7 +27,50 @@ dependencies = [
]
[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
name = "unicode-id"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65dd75ab2d9d379dbe86d4059e91d8b5a6e7054865eaba1ddbfc7a817ff96392"
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "winapi-util"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 8ce1bae..150d656 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,4 +4,6 @@ version = "0.1.0"
edition = "2024"
[dependencies]
+anyhow = "1.0.104"
markdown = "1.0.0"
+walkdir = "2.5.0"
diff --git a/content/about.md b/content/about.md
new file mode 100644
index 0000000..e749fec
--- /dev/null
+++ b/content/about.md
@@ -0,0 +1,19 @@
++++
+title = "About verade"
+date = 2026-05-24
+toc = true
+header = false
++++
+
+I am Venkata Rao Dechiraju, A Low-Level Perfomance Developer based off 🇮🇳, I heavily fw Compilers, Motorsports and Low Level Programming.
+
+You can find all the weird stuff i do on [my github](https://github.com/veradec/) (Even though I am trying to move to something like codeberg)
+
+I hope you find yourself intriguied after reading through my posts -- that's the intention of the whole website.
+
+
+(Just because I use em-dashes doesn't mean it wasn't written by LLMs, I find the concept of em-dashes rather convenient, and I find myself at positions against LLMs for menial tasks such as writing blog posts, so cheers!)
+
+Contact:
+
+Mail -> venkatraodechiraju@gmail.com
diff --git a/content/index.md b/content/index.md
index 67a1ce9..e70e3b7 100644
--- a/content/index.md
+++ b/content/index.md
@@ -1,5 +1,4 @@
+++
-date=27/10/2026
title=Page Generated by Lavendar
description=This page is generated by lavendar
+++
diff --git a/content/posts/drum-sequencer.md b/content/posts/drum-sequencer.md
new file mode 100644
index 0000000..459498c
--- /dev/null
+++ b/content/posts/drum-sequencer.md
@@ -0,0 +1,40 @@
++++
+title = "Making a Drum Sequencer"
+date = 2026-05-27
++++
+
+I always looked at Teenage Engineering and thought it was pretty cool and given I have a sem break right now, I thought I can make one too. shouldn't be hard right?
+and after i started composing music, Techno was a genre I always wanted to try but i couldn't, and then an idea popped up, maybe I can create a suite of instruments
+
+> a Synth
+
+> a Drum Sequencer
+
+> a Vocoder
+
+and start making techno on them? Sounds nice innit?
+<br>
+
+# The Design
+I wanted the design to look a little retro 80's esque, and I wanted it to be little simpler (because I will have suite of appliances to generate different sounds, so would rather have one that is simple and does it job well)
+and I drew a few sketches and ended with something that looks very nice
+<div style="display: flex; justify-content: center;">
+ <img src="/dq_sketch.png" alt="Drum Sequencer Rough Sketch" style="transform: rotate(-90deg); width: 50%;" />
+</div>
+
+# The Prototyping
+with the _beautifully_ crafted picture in hand, now the plan is to prototype
+
+
+I needed around 16 Buttons -- which I am going to pull of some keyboards i archived (They paid off innit?).
+
+I might need to get some more potentiometers and find a way to make a matrix the LEDs and Buttons, Once That is done, Getting the whole thing shouldn't be that tough (atleast I hope it isn't)
+
+
+<!-- -- 28 May 02:00 AM -->
+
+<!-- I am about to order stuff from flyrobo and i found this website called [ifuturetech](https://ifuturetech.org) which i am really unsure is legitimate, but yes. I might order from it, the total cost excluding the MicroProcessor and the Speaker (which i might borrow from a friend for prototyping) come around to 616. -->
+
+<!-- Including the speaker and the MCU let's call it a even 900? and then the chassis -- with a good cnc machine and alumium -- would roll everything up to a nice 1500 - 1700? That still is cheaper than Teenage Engineering or any SOTA, selling it for around 2400-2500 should make up some good profit. this is getting exciting. -->
+
+<!-- I look forward to any outliers that would increase the cost by 10x -- i don't see a reason something like this would but yes. -->
diff --git a/content/posts/hello.md b/content/posts/hello.md
new file mode 100644
index 0000000..11b7136
--- /dev/null
+++ b/content/posts/hello.md
@@ -0,0 +1,6 @@
++++
+title = "Hello, World"
+date = 2026-05-24
++++
+
+a (hopefully) final revamp of the website, given it's not very ugly to look at now, maybe i'll start writing more here? i ain't sure about that and yes, i'll be copying all the content from the previous website here, so i'll not lose what was
diff --git a/content/posts/not-all-hackathons-are-built-the-same.md b/content/posts/not-all-hackathons-are-built-the-same.md
new file mode 100644
index 0000000..e38ad43
--- /dev/null
+++ b/content/posts/not-all-hackathons-are-built-the-same.md
@@ -0,0 +1,6 @@
++++
+title = "Not all Hackathons are built the same"
+date = 2026-08-17
++++
+
+not all hackathons are the same, ffs, some of them are pretty fuckin dumb
diff --git a/src/main.rs b/src/main.rs
index 448e704..32f3340 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,35 +1,44 @@
#![allow(unused)]
+use anyhow::Result;
use markdown;
use std::env;
use std::fs;
-use std::path::PathBuf;
+use std::path::Path;
+use walkdir::WalkDir;
struct File {
file_name: String,
- parent_directory: String,
date: String,
+ toc: bool,
+ header: bool,
title: String,
description: String,
content: String,
}
-fn meta_data_extractor(content: &str) -> (String, String, String) {
+fn meta_data_extractor(content: &str) -> (String, String, String, bool, bool) {
let lines = content.lines();
let mut date: String = "".to_string();
let mut title: String = "".to_string();
let mut desc: String = "".to_string();
-
+ let mut toc: bool = true;
+ let mut header: bool = true;
for line in lines {
let meta_data = line.split('=').collect::<Vec<&str>>();
- match meta_data[0] {
+ match meta_data[0].trim_start().trim_end() {
"date" => date = meta_data[1].to_string(),
"title" => title = meta_data[1].to_string(),
"description" => desc = meta_data[1].to_string(),
- &_ => println!(""),
+ // "toc" => println!("{}", meta_data[1].to_string().trim_start().trim_end()),
+ // "header" => println!("{}", meta_data[1].to_string().trim_start().trim_end()),
+ "" => (),
+ &_ => println!(
+ "Header not found |{}|",
+ meta_data[0].trim_start().trim_end()
+ ),
}
}
-
- return (date, title, desc);
+ return (date, title, desc, toc, header);
}
fn markdown_to_html(path: String, content: String) -> File {
@@ -50,35 +59,54 @@ fn markdown_to_html(path: String, content: String) -> File {
let mut date: String;
let mut title: String;
let mut description: String;
-
- (date, title, description) = meta_data_extractor(meta_data);
+ let mut toc: bool;
+ let mut header: bool;
+ (date, title, description, toc, header) = meta_data_extractor(meta_data);
// println!("{meta_data}\n\n");
let html = markdown::to_html(&content[end + 7..]);
- let file_name = std::path::Path::new(&path).file_name().unwrap();
+ let file_name = std::path::Path::new(&path).display().to_string();
+
return File {
- file_name: file_name.to_str().unwrap().to_string(),
- parent_directory: path,
+ file_name: file_name,
date: date,
title: title,
description: description,
content: html,
+ toc: toc,
+ header: header,
};
}
-fn main() {
+fn get_html_from_file(path: &Path) -> File {
+ // println!("{}", path.display());
+ let contents_read = fs::read_to_string(path).unwrap();
+ let f: File = markdown_to_html(path.display().to_string(), contents_read);
+ println!("file_name: {}\ncontent:\n{}\n", f.file_name, f.content);
+ println!("-------------------------------------");
+ f
+}
+
+fn main() -> Result<()> {
// let contents_path = std::path::Path::new("./content/index.md");
- let path = "./content/index.md";
- // let path = std::env::current_dir()
- // .unwrap()
- // .into_os_string()
- // .into_string();
+ // let path = "./content/";
+ let content_path = Path::new("content/");
+
+ for file in WalkDir::new("content/").into_iter().filter_map(|e| e.ok()) {
+ let file_name = file.file_name().to_string_lossy();
+ if file_name.ends_with(".md") {
+ // println!("{}", file.path().display());
+ get_html_from_file(file.path());
+ }
+ }
+
// println!("File parent_directory: {}", path);
- let contents_read = fs::read_to_string(path).unwrap();
- let f: File = markdown_to_html(path.to_string(), contents_read);
- println!(
- "file_name: {}\npath:{}\ncontent:\n{}\n",
- f.file_name, f.parent_directory, f.content
- );
+ // let contents_read = fs::read_to_string(path).unwrap();
+ // let f: File = markdown_to_html(path.to_string(), contents_read);
+ // println!(
+ // "file_name: {}\npath:{}\ncontent:\n{}\n",
+ // f.file_name, f.parent_directory, f.content
+ // );
+ Ok(())
}