One Small Step into Geminispace

Around this time last year I decided to dig out a #Gopher hole for myself. Without much else to offer, I figured my best bet for content would be a phlog built from a copy of my blog posts here on my #snac server, so I threw together a shell script to periodically grab my posts and export them as a Gopher tree. It was crude, but it's been working well.

When I first announced it, several people asked if I had any plans to make a #GeminiProtocol capsule. I wasn't really considering it at the time since I felt like I was accomplishing all I wanted to do with Gopher, but now I've decided I want to give it a shot. I installed Solderpunk's Molly Brown server (which I chose because it was the only one in Debian's repo) and, after much struggle with cert permissions, got it up and running.

For content, I went with the same thing as with Gopher: a gemlog powered by a snac-to-Gemini exporter. snac uses Markdown for formatting, which is of course very similar to Gemtext. I went back and edited my earlier blog posts to make them more Gemtext-like, which mostly meant adding header lines. The only real complication was inline links: I would need to strip them out of the Markdown source. Since I'm doing this all with shell scripts (as opposed to something like Python that'd probably work better), an actual Markdown parser wasn't really an option, so I decided to do it with a regex. The thing is, I'm not very good at writing regexes. After many, many fruitless searches trying to find an existing solution I came across a bash script that did what I wanted. The script itself was obvious vibe-coded filth, but it did contain a sed -E command that did exactly what I needed.

The exporter is a comically-inept hackjob and has a backslash-itis problem (which I imagine is coming from the JSON parser I'm using) but it does, somehow, work. Some day I'll see about redoing the whole thing in Python, but for now it's good enough.

Take a look if you're interested: gemini://gemini.n8fq.org

#blog