Python rot and bringing in the old blog

I've been working on a little project for a few evenings now: folding my old domain and old blog into this one.

The old blog was built with a static site generator called Felix Felicis (yeah, it makes me wince now, too). I got to write posts in Markdown, then run a Python program to build all the HTML that I'd then rsync on over to my OpenBSD server hosting

Honestly, I might even still be using it today, if it weren't for Python rot.

I used to adore Python, oh my gosh. Before I started at Atomic Object, I actually called myself "a Python developer". I wrote reasonably complex software in it, I loved the community, and all the rest.

And all that's good and well, but Python has, for some time now, had a problem keeping old software running. Felix Felicis is, sadly, now one of those things that's just too old to run anymore.

Getting back in the saddle

For a bit, I was using Pipenv to keep track of the dependencies Felix Felicis needed, and manage the environment. Somewhere along the line, it just stopped being able to build an environment with Python 2.7, which Felix Felicis was written for.

I went digging to grab the absolute last version of Felix Felicis, and decided to try out Poetry instead.

I can't even remember everything I ran into in its entirety. I was trying all sorts of Python 3 versions to find one that would work. I was downgrading setuptools so the 2to3 conversion that was required would still work.

Eventually I came across a set of steps that would work:

  1. Install Python 3.7.16 (which is kind of old already) with pyenv.
  2. Tell Poetry explicitly to construct a virtualenv with the Python binary from deep inside the .pyenv folder in my home directory.
  3. Use Poetry to get a shell into the virtualenv.
  4. Don't ask Poetry to install yet—instead, use pip to do an end-run around Poetry and install the "liquidluck" package.
  5. Now ask Poetry to install, which downgrades a few things pip put there.

I've probably lost many of you, but anyone who's used Python in somewhat-modern times is probably groaning a little, possibly involuntarily. The tl;dr is that Felix Felicis has Python-rotted thoroughly.

A new host

But I got it working. And I had a site I could rsync over to my new OpenBSD host that I was staging over at OpenBSD Amsterdam.

I have been running my website on an OpenBSD server at Vultr for a very long time. I maintained it mostly by hand, pulling it forward through many upgrades with very well-engineered tools. I don't even remember how many versions I've come through, but I will say there's no "OpenBSD rot" that I've ever come across.

But I was managing it all by editing config files, and I had no way to really rebuild if I ever needed to. So I found OpenBSD Amsterdam, absolutely adoring how they were a big contributor to the OpenBSD Foundation, and booked a new server there.

I then set about trying like heck to remember how to use Ansible, and started constructing a playbook to build up the new server from the ground up.

At the moment, my playbook will set up some system pieces, drop dotfiles in my home directory, and set up the website including getting its certificate from Let's Encrypt. It's really nice, if a bit slow.

The only thing I didn't include was rsyncing the content into place.

Unrelatable content

After juggling domain names around a bit to point over at the new host, I switched over to the import task.

This blog is managed in Listed, which means all my content needs to first live in Standard Nptes. So I reverse-engineered the Standard Notes import format, and kicked off a deeply iterative process of converting the Felix Felicis content to Listed content.

("But it's all Markdown!" you say. Thing is, Markdown isn't really a standard, per se, as much as it is an aspirational idea. I had a lot of work to do to make everything look nice in Listed.)

As I was bringing content over, though, I was wincing. Me in 2012… well. They had some very strong and unnuanced ideas about the world, and especially tech.

But, you know, there was also a lot of excitement for what I was doing. I was giving talks, I was spinning out new software projects… I was, honestly, learning though doing.

And that was worth a lot, even if the content from that era isn't, on its face.

I'm still undecided what I'm going to do.

Where from here?

So, all the content is in, I've written redirect rules that the OpenBSD server serves up to repoint posts to Listed, and I've done a lot of work with an import script as well as direct content edits.

I also had a number of PDF files that were on the old site that Listed won't host. I looked briefly at an S3 bucket, but then realized that CloudFlare is already doing some stuff for me, and they have their R2 service that I could use to store a few files.

Looks like it's probably gonna be free for me for a good long time. I might pull the few photos I have on Imgur out and put them in R2 instead. I just need a nicer workflow to add stuff there.

But, also… I noticed one of the posts mentioning an old "journal" I'd completely forgotten about. I went digging in my archives and… yeah… I've got more content, this time in HTML.

I might bring it over. We'll see.

You'll only receive email when they publish something new.

More from Mattie B
All posts