Importing Tweets into Micro.blog

I wanted to import a bunch of tweets from my archive (mostly cat photos and a few other bits) but I didn’t want to have to manually go through each tweet, copy the text and download the photos. So I wrote a script to do it for me once I had the IDs (which I got with my Safari shortcut).

One thing that had annoyed me for a while is I didn’t keep a diary/note of things that happened and my thoughts during the first year of so of the pandemic but thanks to going through my archive I now have that. On a cheerier note I have a lovely collection of animals in the pets category. These additional categories were done manually (with the help of QLMarkdown) as I couldn’t think of a way to automate this.

Once I had the IDs it was a case of getting the format correctly (for example, Micro.blog will fail an import with empty categories in the YAML). I was able to take ~450 tweets, convert them to markdown and import them into Micro.blog. For example, this tweet:

becomes:

---
date: 2022-10-20T13:56:19+00:00
categories: Imported Tweets
---

"You could not live with your own failure. Where did that bring you? Back to me"

![](https://pbs.twimg.com/media/Ffg6jkDXkAARD4p.jpg)

The script isn’t perfect. It doesn’t do anything with hashtags or usernames, nor does it check if a tweet is a reply or a retweet. The project readme.md has steps for using it on your own archive.

I put together a page which links all the various Micro.blog things I’ve made (and there’s another one incoming soon I think)

🔗 Micro.blog Tools

New Shortcut for Mac and iOS: Follow Mastodon User on Micro.blog

Go from a Mastodon profile like https://mastodon.instance/@cooluser to https://micro.blog/cooluser@mastodon.instance to easily follow someone.

Pushed the first version of my own theme for Micro.blog to Github and it’s live on my site. I’m particularly happy with the post photo grid.

I used Paper as a base so credit to @amit for all the work he’s done there.

I made some tweaks to my photo page to make all the containers square and consistent. I’ve put the CSS up here if anyone else wants to do the same.

TIL about the aspect-ratio CSS rule

Couple of small updates to Micromarks this morning:

  • “Remember Domain” on the login screen so you don’t have to input your domain every time you want to login
  • A favicon because I forgot to do one initially 🙃

It works for my very specific needs so I’m not sure how useful it will be to other people but the code is on GitHub if anyone is into that kind of thing.

Having decided to move my read later needs to micro.blog, I realised the current UI doesn’t work quite how I want. Specifically hiding when deleting/unbookmarking and multi-delete, so I made a little web app to do exactly that.

🔖 Micromarks