Mastotool

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.

Mastotool

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

% sudo pip3 install lxml

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

To make a backup:
% ./Mastotool.py -m -b http://example.com/@username -s username.json

To display that backup:
% ./Mastotool.py -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.