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
-df FORMAT  Set format for display: text (default), html
-o FILENAME Output display to file instead of stdout
-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

To display HTML:
% ./ -l username.json -df html -o username.html -d

Please only use this on your own data.

Email me or contact me on Mastodon if you have bugs to report or features you want, or fix it yourself.

BSD license, so don't blame me if it eats your pet iguana.

  • 2017-11-17: Added HTML output, removed a duplicated text node
  • 2017-07-27: Created