Three-hour WeekendProject when I couldn't sleep last night.

Posted 2022-12-18 | Back to blog index

Three-hour WeekendProject when I couldn't sleep last night.

Hacked together a script to generate a simple blog by scraping my Mastodon profile and extracting any thread starting in a post with the mb (micro-blog) hashtag.

It feels nice being able to persist some of the more "evergreen" content that would just disappear in a long timeline otherwise.

Pretty handy that Mastodon lets you edit posts so I could go back and add the hashtag to the posts I want to preserve!

http://kalleboo.com/microblog/index.html

There is some basic text processing in there to try to generate nicer post titles (try to get the first sentence, or pre-comma sentence fragment) and to massage the text to be less social-media-ey (strip hashtags from the end of the post, strip the from hashtags inside the post)

One thing I learned when running this is that some of the photos I've posted have ended up being uploaded as png files instead of JPEG, causing some massive file-size inflation! I wonder what Mastodon client is doing that.

Back to blog index