After a while, you need to be able to back up your Mastodon content, and there is currently no way to get anything except your follow/block/mute lists.

So I whipped out Python and made a kind of brute-force scraper.


Unzip it, make sure you have a recent version of Python installed, install lxml:

% sudo pip3 install lxml

% ./ -help
Usage: [COMMAND]...\n%s
-m      Mirror media (calls wget)
-b URL      Backup from URL ''
-l FILENAME Load from JSON file
-d      Display all posts
-s FILENAME Save to JSON file

To make a backup:
% ./ -m -b -s username.json

To display that backup:
% ./ -l username.json -d

BSD license, so don’t blame me if it eats your pet iguana. Email me if you have bugs to report, or fix it yourself. Please only use this on your own data.