sepia Illustration of an Indian elephant with background structures and a smaller scene with another elephant and men. t from Dictionnaire universel d'histoire naturelle 1847

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:

  1. A bash script pulls down all my previous toots to a sqlite database.
  2. Another script updates the database.
  3. A php file provides a search and display.
  4. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.