Local Toot Archive

I used to love Martin Hawksey’s tweet archive which I used for quite a while and mirrored on the web.

Yesterday I was reading Alan’s post: My Digital Cleanup: IFTTT – CogDogBlog which explains how he now archives toots with make.com a sort of ifttt replacement. This sounds very useful. I’ve quite often failed looking for old toots with the mastodon interface.

This made me think a bit. I’d been playing with json to sqlite for my flickr photos, On this Flickr Day. I wondered if I could do this with my toots too.

Turns out I could take a very similar approach:

A bash script pulls down all my previous toots to a sqlite database.

Another script updates the database.

A php file provides a search and display.

The search can be viewed in the browser using a simple php server.

There are a few things that could be improved.

I’ve not used any authentication. So I just get public toots and boosts. That is all I want.

The web page produced is pretty simple, if there is no search it shows all my toots. This is just over 1000 I probably need some pagination.

I’ve a version running on my raspberry pi. Search Toots this is organised slightly differently from the one I run locally on my mac. The scripts & database are not directly in the public_html directory.

I’ve put the files on github: troutcolor/localtoots in case anyone is interested.

I had a bit of AI help, bouncing ideas, tidying things up & especially all of the getting the files on git hub. I’ve done this so rarely I’d no recall of how to do it.

Featured Image: n92_w1150 | Dictionnaire universel d’histoire naturelle :. P… | Flickr Public domain by Biodiversity Heritage Library