Some Bits: Nelson's log

Another Twitter archive

Since Twitter was destroyed it’s been frustrating losing access to all the stuff I wrote. X still allows you to download an archive of your own tweets, but then there’s the challenge of making the data useful.

For awhile now I’ve been using Julia’s tweet-archive. It works great but I never loved the styling. (I never tried to improve it, either.) You can see my archive in Julia’s thing here.

Matt Haughey just vibe-coded up an alternative. I like the way it looks. It’s also got a couple of extra tricks. The code works with various old formats of Twitter exports. The Javascript has some nice functions like filtering by year. And it displays reply tweets, albeit not linked to what you’re replying to. You can see my archive in Matt’s thing here.

Matt’s code worked out of the box for me but some of the path management and permissions are a little fiddly. Here’s what I did to get it working, from a Twitter archive I pulled just yesterday.

# Download and prepare the files
mkdir /tmp/t; cd /tmp/t
unzip twitter-dump.zip
git clone https://github.com/mathowie/tweet-search-archive

# Clean up the repo a bit and link in the data
cd tweet-search-archive
rm -r tweets_media
ln -s ../data/tweets.js .
ln -s ../data/tweets_media .
sed -i 's/Your Name/Nelson Minar/; s/yourhandle/nelson/' build.py

# Build the archive
python build.py

# Copy the output to a web server and fix permissions
cp -a tweet_search.html ../data/tweets_media ~/public_html/tmp/tweets/
find ~/public_html/tmp/tweets/ -type d -exec chmod 0755 {} + -o -type f -exec chmod 0444 {} +