I was fascinated by UltrViolet’s DevOps-ification of his blog, “Endgame Viable”. The sort of stuff he’s doing is the sort of stuff I do every day at work. I’m getting paid to get better at doing all of this stuff, but my own blog can’t take advantage?
That ends today. Today, I bring my old blog, West Karana, back to life, via the magic of DevOps.
One of my old banners :-)
DevOps is just a fancy way of bringing every IT position into one person – the developer.
- We don’t need an architect for our code, the developer can do it (lol)- We don’t need a QA person for our code, the developer can do it (Cypress and Karate)- We don’t need a DBA to manage our databases, the developer can do it (Liquibase)- …
Jack of all trades, master of none. I present to you the DevOps developer.
Anyway. UltrViolet made a whole new workflow where he creates documents in a text editor marked up in Markdown format, and then has scripts crawl through stuff and do magic and out spits a blog. It’s all very magical.
I’m not nearly up to that point. But, I’m sitting on years worth of SQL code that could, in theory, move my old blog, West Karana, to a new place, potentially even this blog. But there’s conflicts with newer versions of WordPress, categories, tags, all sorts of cruft. If I could just bring both blogs into Python, then I could fix all the inconsistencies and then spit out a new back end that contains both blogs.
First, though, I’d have to start writing code to turn the old SQL backup into something I could work with.
Python fragment to save a blog post as Markdown
- Open the backup SQL file- For each lineIs this a SQL insert for a new blog post?Use my SQLConsumer action to parse the line into a dictionary of column name: data pairs- Create a new “Post” object with that data- call the “Post” object to write itself to a file in Markdown format
- Is this a SQL insert for a new comment?Worry about this later
So, as a proof of concept, all the text of all the posts (sans images, comments, and meta information) is now backed up, in Markdown format, in GitHub.
Here’s a sample post from the past:
The link above goes into the actual repo, where, with a little poking around, you can find some of my very dirty, banging together at midnight, code that does the deed.
I don’t remember any of this stuff – especially the DDO stuff. I don’t remember Kasul ever playing DDO with me – and I bet if I asked him, he wouldn’t, either. But here it is, in black and white.
Next steps are to get the images loaded. I can put them into GitHub as well, or I could copy them into an AWS S3 bucket and then talk to them from there. It would be fun to put them in AWS, but then I might have to pay actual money.
But, for those who’ve been, for some reason, wanting to look at the old stuff, it’s all there, and will only be becoming more “there” as time goes on.

