My federated brain-dump

Sun, 28 Jan 2024 20:31 UTC

Interesting day! I gave myself a challenge - make a bot for #Hubzilla that can post new items from a #RSS feed. I know, Hubzilla already has cool functionality like (a) follow a RSS feed and (b) ‘mirror’ that feed as posts. But I wanted a bit more control and less strain on the Hub.

I started off with some #Python magic which included using cURL to make the POST. A few posts in, I ran into the forgotten special characters - ‘, “, $, & etc that cURL needs to be escaped. Right…let’s escape these and test again! Nope! Could not budge, could not win. I ended up with weird-looking posts with some crazy formatting issues.

Later, I learned about the ‘requests’ module - we’d never met. Turns out this thing can do all the parsing and take care of special characters.

So, there we are. The bot is live - and running along nicely.

Follow it…it auto-follows back so boost your follower count.