So earlier in the week Andy Piper wondered out loud on Mastodon if anyone had done a bookmark manager for Mastodon. I didn’t know of any but it did that thing that kicks my brain off, but not in a “write a bookmark manager” way. I use Raindrop.io to manage bookmarks and I’m not going to change … and it’s a good cross platform way of taking care of bookmarks, archiving and curating.
BUT… I did want to move bookmarks from Mastodon to Raindrop so I could sort them there. And MastRain was born. MastRain is a Go app which will connect to your Mastodon account and pull the current bookmark list. It’ll then connect to Raindrop and first it removes Mastodon bookmarks which are already in Raindrop, using the API’s check for duplicates. Once the list is cleaned up, the remaining links are imported and dropped into the Unsorted folder on Raindrop and job done. You can move them out of Unsorted and the deduplication still works. Which is nice.
Anyway, next thing I’m going to do is push it up on Fly.io and make it run regularly. But before that, I wanted it out there. I’ve used goreleaser to make binaries for -checks notes- apparently everything. All you need to do is get an API token for your Mastodon instance and for Raindrop (go here create an app and make a test token for yourself).
If you want to make it prettier or smarter, go ahead, I’m taking all pull requests and issues. The process of putting it together just reminded me how nifty a tool Go is. I used go-mastodon as a go Module to handle the Mastodon side of things. For Raindrop, it was a little trickier; no apparent Go API module, but I did find a Telegram to Raindrop bot and used the raindrop code there as a starter, then added in things like the duplicate API checker endpoint support. Actual code outside those libraries, 76 pretty readable lines. Add in that Go has two good environments to work in (VS-Code with shiny extension or Jetbrains GoLand) and this was a pleasure to put together.
Any questions? Catch me on Mastodon as @codepope@mastodon.org.uk.