avatar

OSX app for blog post

OSX app for blog post

It has been a bit too cumbersome to make posts because I always have to navigate around the Hugo directory and remember how to write out the front matter of Markdown files. Here’s what a typical structure looks like for a Hugo blog post:

---
title: "OSX app for blog post"
date: 2025-02-18T20:59:38
draft: false
tags: ["fluff"]
image: "images/2025_02_18.jpeg"
---
{Body}

So I made an app using AppleScript that creates a Markdown file in the blog content directory, fills out a front matter template, and opens the file in Sublime. Check it out:

Expand Script
set blogDir to "/Users/xxxx/blog/content/posts/"
set imageDir to "images/" -- Hugo expects images here

-- Generate date stamp
set dateStamp to do shell script "date +%Y_%m_%d"

-- Initialize counter
set counter to 1
set fileName to dateStamp & "-Untitled.md"
set filePath to blogDir & fileName

-- Check if the file exists, and increment the counter
repeat while (do shell script "test -e " & quoted form of filePath & "; echo $?") = "0"
	set counter to counter + 1
	set fileName to dateStamp & "-Untitled-" & counter & ".md"
	set filePath to blogDir & fileName
end repeat

set imageFile to imageDir & dateStamp & ".jpeg" -- Assumes image matches the date

-- Create the Markdown file
do shell script "echo '---
title: \"\"
date: '$(date +%Y-%m-%dT%H:%M:%S)'
draft: false
tags: [\"fluff\"]
image: \"" & imageFile & "\"
---
' > " & quoted form of filePath

-- Open in Sublime Text
tell application "Sublime Text"
	open filePath
end tell

Works Great!


Testing Unity Web Project Export

Here’s a quick test of a Unity Web project. GitHub Pages doesn’t seem to support Content-Encoding, so I can only build uncompressed for now. That means it’s an 80MB load instead of 6MB (Brotli). You might want to flip the ringer switch on the side of your phone to hear the audio.

But this is pretty cool! I’ll make a half-decent level next. Let me know if you have any issues or know how I can get Brotli compression to work here.


Article Illustration 7

Article Illustration 7

Somewhere in Sweden 2002


Article Illustration 6

Article Illustration 6

So many attempt trying to find a abstracted version on Kojima that both was simple and captured his appearance. Never done drawings like this before.


Article Illustration 5

Article Illustration 5

It’s the big shell.


Article Illustration 4

Article Illustration 4

It’s the Dead Cells, this was all free hand and took forever.


Article Illustration 3

Article Illustration 3

Another trace but pretty nice to do something a bit low effort after work. Also I am getting better at using procreate.


Article illustration 2

Article illustration 2

This took a while, decided to trace over the T2 frame after a few freehand attempts.


Article Illustration 1

Article Illustration 1

Still debating whether to commission someone or try to draw these article illustrations myself. This was pretty fun, inspired by 22irum, I’ve never drawn in this style before.


Inktober 01

Inktober 01

Ok, drew something, trying not to think too much about it. It’s about “forming habits” right.