In the six years since I first shared an audio file on Mastodon,

Some Highlights

Post by @DavidBlue@mastodon.social
View on Mastodon

Rather embarrassingly, I only recently realized that Mastodon’s native search actually supports querying by attachment type. I’m going to blame Twitter’s search, mostly, for this mental blockage. If this is new information to you, as well, note some exciting possibilities.

The native Mastodon web search tooltip showing available search options.

(Please note that the hyperlinks embedded within the following examples will only yield results if you have an account on the mastodon.social instance and are logged in. Those on other instances need only replace this domain with their own.)

Armed with this knowledge, I asked Gemini to try creating a Python script with the following prompt:

Using the Mastodon API on mastodon.social, construct a query that outputs raw file urls to all of the audio attachments ever posted by @DavidBlue@mastodon.social.

The equivalent search query on mastodon web would be: “from:DavidBlue has:audio”

Incredibly (and unusually,) it aced the result on its very first try.

The output after a very lengthy run of this script was, indeed, a plain text list of line-separated raw urls to .mp3 files, all of which I downloaded with wget i.

However… I’d personally recommend avoiding this silly, wasteful run around by simply generating and downloading an export of your Mastodon account data, in which you will find any audio files you posted in .mp3 form.

My favorite way of actually posting these remains