From 66a2ca872db483a39ea15ebeee700a8c5e99ca89 Mon Sep 17 00:00:00 2001 From: robin Date: Sat, 16 May 2026 19:37:35 +0200 Subject: [PATCH] feat: data parsing --- build.zig | 7 + data/blog/building-this-site.md | 4 +- data/blog/creating-a-colorscheme.md | 30 ++-- data/blog/neovim-artio-picker.md | 4 +- data/blog/neovim-native-configuration.md | 4 +- data/notes/artio-live-mode-toggle.md | 1 - data/notes/artio-released.md | 1 - data/notes/aspen-released.md | 1 - data/notes/ebil-released.md | 1 - data/notes/evergarden-npm-release.md | 1 - data/notes/evergarden-site-release.md | 1 - data/notes/evergarden-sublime-text-release.md | 1 - data/notes/evergarden-userstyles-release.md | 1 - data/notes/lylla-sections.md | 1 - data/notes/mimi-released.md | 1 - data/notes/site-zig-minimal.md | 1 - data/tools/ivy.md | 2 +- data/tools/lynn.md | 2 +- gen/lua_modules.zig | 3 +- lua/maivi/init.luau | 21 ++- lua/maivi/pages/notes.luau | 3 +- lua/maivi/partials/note.luau | 8 +- src/data.zig | 133 ++++++++++++++++++ src/lua.zig | 37 ++--- src/main.zig | 2 +- src/root.zig | 68 +-------- src/tar.zig | 4 +- src/time.h | 2 + 28 files changed, 212 insertions(+), 133 deletions(-) create mode 100644 src/data.zig create mode 100644 src/time.h diff --git a/build.zig b/build.zig index fd53bca..71ed8d0 100644 --- a/build.zig +++ b/build.zig @@ -42,6 +42,13 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, }); + const time = b.addTranslateC(.{ + .root_source_file = b.path("src/time.h"), + .target = target, + .optimize = optimize, + }); + mod.addImport("time", time.createModule()); + const exe_options = b.addOptions(); mod.addOptions("opts", exe_options); diff --git a/data/blog/building-this-site.md b/data/blog/building-this-site.md index 125a216..26b4ddc 100644 --- a/data/blog/building-this-site.md +++ b/data/blog/building-this-site.md @@ -2,8 +2,8 @@ title = "building this site" date = 2025-01-22 modified = 2026-01-07 -description = "my tiny adventure in static site generation" -tags = ["site"] +desc = "my tiny adventure in static site generation" +tags = site, +++ ## static site generation diff --git a/data/blog/creating-a-colorscheme.md b/data/blog/creating-a-colorscheme.md index b82860b..a01de41 100644 --- a/data/blog/creating-a-colorscheme.md +++ b/data/blog/creating-a-colorscheme.md @@ -1,8 +1,8 @@ +++ title = "creating a colorscheme" date = 2025-03-12 -description = "a small guide based on my own experiences" -tags = ["colorscheme"] +desc = "a small guide based on my own experiences" +tags = colorscheme, +++ ever since I started using open source applications and code editors I got @@ -13,7 +13,7 @@ same styles and colors. naturally I got inspired by the thousands of colorschemes out there and created my own, and then my next one, and then my next one. I have to admit that my first few attempts lacked… a certain touch. while it was really fun to change -my applications to use a palette that *I* created, the end result was pretty +my applications to use a palette that _I_ created, the end result was pretty bad. apparently, selecting random colors without thinking about their relationship to eachother isnt the best recipe for creating a coherent color scheme. @@ -46,9 +46,9 @@ two ways to go about this. method one is shifting the lightness of your background color up and shifting the saturation all the way down. using this method, you get a quite analogous neutral palette. these palettes are perfect for when you want to add other colors that pop. the second - method is the same as the first one but follows up by shifting the hue of your - foreground color by 180 degrees. this method will result in a complementary - neutral palette, which makes your final colorscheme look quite vibrant. +method is the same as the first one but follows up by shifting the hue of your +foreground color by 180 degrees. this method will result in a complementary +neutral palette, which makes your final colorscheme look quite vibrant. next up is creating your neutral shades. this can simply be done by incrementally changing the components of your background color until they reach @@ -56,29 +56,29 @@ the value of your foreground color. ### how to select colors -look in your reference material for a *single* color that you find +look in your reference material for a _single_ color that you find representative of your concept. next, crank up the lightness and saturation until you're content with your color. this color will be the main color used for syntax. for the rest of your palette, use the same saturation and lightness but move - the hue over about 60 to 90 degrees each time. by selecting colors that - differ only in *one* component, either hue or lightness or saturation, you - create a palette that looks quite harmonious. +the hue over about 60 to 90 degrees each time. by selecting colors that +differ only in _one_ component, either hue or lightness or saturation, you +create a palette that looks quite harmonious. ### adjusting your colors you might notice that some of your colors look a little off. this is because saturation and lightness in the hsl (or hsv) color space is not perceptually uniform. this means that, to the human eye, colors with the same saturation and -lightness don't *look* like they have the same saturation and lightness. to the +lightness don't _look_ like they have the same saturation and lightness. to the human eye, a blue or purple will look darker than a green or yellow. you have to take this into account while creating your colorscheme. if you have a palette that is generally pretty vibrant but some colors look - washed out, try decreasing their brightness and increasing their saturation. - the inverse can be said for a pastel palette: do some colors look darker or - dirtier? try increasing their lightness and decreasing their saturation. +washed out, try decreasing their brightness and increasing their saturation. +the inverse can be said for a pastel palette: do some colors look darker or +dirtier? try increasing their lightness and decreasing their saturation. in general, there are a few rules for a coherent palette: your reds and oranges will have a higher saturation than your other colors, whereas your blues and @@ -88,7 +88,7 @@ greens will have a lower saturation. to further help you on your journey I have selected a collection of resources I discovered while researching colorschemes. the end result of these resources -might not look like something *you* would want to create. nevertheless, it's +might not look like something _you_ would want to create. nevertheless, it's important to look at the choices these developers made and think about how you could apply their ideas to your own work. diff --git a/data/blog/neovim-artio-picker.md b/data/blog/neovim-artio-picker.md index f8d8133..942fe77 100644 --- a/data/blog/neovim-artio-picker.md +++ b/data/blog/neovim-artio-picker.md @@ -1,8 +1,8 @@ +++ title = "creating a native-feeling neovim picker" date = 2026-03-21 -description = "working on a neovim general picker using the ui2 framework and native features" -tags = ["neovim", "plugin"] +desc = "working on a neovim general picker using the ui2 framework and native features" +tags = neovim,plugin +++ ## preface diff --git a/data/blog/neovim-native-configuration.md b/data/blog/neovim-native-configuration.md index ef9847e..8445531 100644 --- a/data/blog/neovim-native-configuration.md +++ b/data/blog/neovim-native-configuration.md @@ -1,8 +1,8 @@ +++ title = "tending your editor config: building sylvee & lynn" date = 2025-08-13 -description = "my adventure building a native-first neovim experience" -tags = ["neovim", "config"] +desc = "my adventure building a native-first neovim experience" +tags = neovim,config +++