Behold the Archive

Behold the Archive

After posting quite the most forgettable collection of words to the blog earlier today, I found myself with a few minutes to spare this lunchtime. Rather than mindlessly scroll Facebook, Twitter, or Instagram, for some reason I ended up looking at the backup of my blog posts, and wondering how I might get them back into the published blog on the internet.

A little backstory would probably help.

For the last several years I have written nearly all of my blog posts in a simple text editor. I own a copy of Scrivener, but rarely use it – I’m not really sure why. The blog posts are written in markdown format, and saved in a year/month folder structure. I suppose half of the thinking behind it is that the archive is portable – I can load the posts into any text editor on any computer system that understands text files.

Anyway.

In the daytime I’m a “professional software developer”. While this sounds lofty and grand, it really just means I work on programming projects for companies that pay us to make their systems do things they want. This story is going somewhere, I promise.

How do you get four thousand text files – all formatted identically – into a blog? It required a bit of lateral thinking, but I got there in the end. Blogger has it’s own import and export format – you can dump the entire contents of your blog to a single XML file, and them import that into another blog. It occurred to me that if I exported what I already had, I could probably make some sense of the XML, and make my own XML file, with the four thousand missing posts in it.

And that’s exactly what I did – it took about half an hour. In the grand tradition of hacking, I took some old code I wrote to migrate posts out of WordPress, and modified it to create the mother of all Blogger import files.

You know the funny thing though? My blog has over four thousand posts in it now, but you would never know – because I have no archive page. The only way to get to them (easily) is to add the year and/or month onto the URL – something nobody will ever try. I’m loath to add an archive page to the blog, because it seems a bit “boasty” – “look all the crap I’ve written!” – which ends up questioning why I bothered importing the posts in the first place.

p.s. I wrote this instead of getting on with a sort-of-secret creative writing project. After an endless round of chores this evening (part of which included drilling holes in walls, and hanging new coat hooks), all the clever literary had gone for a metaphorical walk. Maybe tomorrow will be better.

You've successfully subscribed to Jonathan Beckett!