Title: My BlueSky account, and a posts eraser script
Slug: my-bluesky-account-and-a-posts-eraser-script
Date: 2024-06-01 15:35:00
Author: Kartones
Lang: en
Tags: Development, Social Networks, Tools, Python
og_image:
Description: Announcement of my BlueSky account, plus a script to delete posts from that social network after X days.



After deleting my Twitter account [almost a year ago](https://blog.kartones.net/post/deleted-my-twitter-account/), I've kept only [a Mastodon account](https://fosstodon.org/@kartones). I like it, but I feel it is not going to conquer the world and replace Twitter, so I wanted to experiment with other networks. The "nearest" one, now with public access, is [BlueSky](https://bsky.app/). I still need to read why they decided to re-implement all protocols from scratch, instead of adopting Mastodon's, but it is not surprising, and as a user I don't care that much.

Anyway, I now have an account there, [@kartones.bsky.social](https://bsky.app/profile/kartones.bsky.social), and following my traditions, I wanted messages to disappear after a few days. A bit of experimentation with the [AT Protocol for Python](https://atproto.blue/en/latest/) later, I had ready a simple script to do so: [https://github.com/Kartones/python/tree/master/bluesky-purge](https://github.com/Kartones/python/tree/master/bluesky-purge)

You need to create [an App password](https://bsky.app/settings/app-passwords), and then just fill [a config.py file](https://github.com/Kartones/python/blob/master/bluesky-purge/config.py.sample) with your handle, that password you just created, and the number of days you wish to keep your BlueSky posts around (by default, 5).

I am using it and seems to work well, but it is a minimal implementation, without even pagination. The `atproto` package is at `0.0.47` so fingers crossed they don't break too much in the near term.

I'll also update soon the blog to be able to "Comment on BlueSky", as thankfully there are "[Action Intent Links](https://docs.bsky.app/docs/advanced-guides/intent-links)", that is, a non-javascript way to go to the post creation page with some pre-populated text (URL-encoded in the link).