Archiving my Twitter/X history

For many years I was an active user of Twitter/X @markwilsonit. I shared links, ideas, photos from events, commentary on technology and the industry, and some personal chit-chat too. Over time that added up to more than 70,000 tweets.

But the platform changed. Eventually it reached the point where continuing to use it no longer felt compatible with my values, so I stopped posting there, and made the tweets private.

Historical records

That left me with a problem though. Buried in those tweets is a lot of history – links to blog posts, conversations with people I respect, and snapshots of what was happening in the industry at the time. Twitter/X lets you download an archive of your data, but it also contains items that should remain personal to the user, like direct messages - so it can’t be published directly.

I wanted to build a small static website that turns the archive into something searchable and browsable that I could share more widely. There were some scripts around for converting Twitter archives to websites, but they didn’t seem to work for me when I tried a couple of years ago – maybe the archive format changed since they were written.

Vibe coding a script to create my own archive site

I ended up “vibe coding” (with ChatGPT) a small Python script that converts the Twitter data export into a static Twitter archive site. It’s intentionally simple: a static page; and a lightweight search index using JavaScript and JSON. All the tweets remain exactly as they were written (although with expanded URLs where t.co short links were in place), but now they’re accessible outside Twitter/X.

Rather than keep the script to myself, I’ve published it on GitHub so anyone else can do the same with their own data. If you’re curious about how it works – or you’d like to build your own archive – the code and documentation are available in this GitHub repository.

Just be aware that I downloaded my archive in August 2024 – Twitter/X archive formats have changed over time so, if it doesn’t work for you, you might need to tweak it.