FediRenderer – A much needed Mastodon tool
Long wished for, a way to view user data Backups
'FediRenderer' — a project for a much needed new tool for viewing User Backup Exports from Mastodon instances in the Fediverse.
See a backed up toot as displayed by the viewer?
We have a working FediRenderer below. And some background as well. Plus, very detailed, illustrated instructions for new users.
Sharing this in hope we can find people who value the idea and could take part in it in any way – contributing, suggesting, etc.
We have a working version, but what is it ?
Many details in messages below — but the basic idea is to be able to use the Backup Data Archive, which Mastodon instances offer to all users.
And which, until now, we had no way to access or use much at all.
A series of direct messages, sent to friends with a discussion of a project I am very interested in — and which maybe you might be as well?
In a hurry? Jump straight to a working version. Or ^—top of page
Backgrounder
This is regarding the User Data backup files that mastodon can create. And which are mostly useless, since we didn't have ANY software so far capable of accessing and making useful to a user.
Eugen R. covered the project's legal obligation, by providing a copy of the user data as required by the European GDPR regulations.
Wrote in my Tech blog about it, but no tool existed. ^—top of page
How is it useful ?
This tool is the first step into making backups useful — I have thousands of posts at some instance, which I do not intend to remain on.
With the backup on hand, and a Viewer tool, I could retrieve toots, text, and media — and repost any of them, anywhere else I desire. Done manually, they will be full new posts, new timestamps, new instance and user ID.
There are no technical limits and implications as in a full or selective automated restore process, which is indeed very complex, and not possible at the moment. ^—top of page
And an earlier direct message, which introduced the idea
Sent on Nov 22, 9:40 AM :
This is a much needed and until now non-existent viewer utility for the Mastodon user data export files. I have dreamed about one, and never found it.
A young software engineer friend already sent me a first test version — a working Fediverse Backup Archive Viewer, which I'm awed by!
This friend is not a Fediverse user, and the protocols and data formats were all new to him.
Took about 4 hours, from my email with my desired features and info, plus the backup file; to his reply email with a working first Fediverse viewer.
A couple of snapshots attached. ^—top of page
FediRenderer Toot display from backup archive
A couple of perfectly presented Toots, as viewed by FediRenderer – both have all the links live, a time stamp linked to the original instance's Toot URL, and a media attachment displayed.
The sleeping cat. Original post :
Two ladies in bed. Original post :
Isn't this wonderful ?? 😄😎 ^—top of page
Latest developer email bring a working version
And instructions on how to install and use it.
Download a copy here : FediRenderer project, version 1.0.0. Or see it on GitHub here.
Hey R., I'm glad you found it useful. I fixed a couple bugs, here's the source if you want to play with it and add more features.
To run it you need node.js installed, and from the command line run
npm install
once inside that directory to install the library dependencies.Then
node run.js <yourExportedDirectory>
...where
<yourExportedDirectory>
is the path to your unzipped backup directory containing outbox.json.Let me know if there are any issues with running it! I haven't tested it on Windows.
And that's it. 😉 Terse, unlike me. ^—top of page
How to use this tool for Windows users
The first step you need is to install Node JS, if you don't have it already. A couple of detailed, illustrated pages show how — not hard at all:
- Geeks for Geek's Installation of Node.js on Windows
- or WikiHow's How to Install Node.js on Windows
Or got straight to the Node JS source :
The first step to install Node.js on windows is to download the installer. Visit the official Node.js website and download the .msi installer file according to your system environment (32 or 64-bit).
Getting your Mastodon Backup
This is done via the Mastodon Preferences area :
The command is at this location:
https://instance.name/settings/export
- Once you click the button, the server will go to work – and it could take a while to complete the task.
- Leave the tab open, and go do something while the processing happens.
- You should get a notification email from the instance, when the archive is ready for download as well. .
- When completed, download it to your own system. Unzip it to a desired location. .
- Using a simple name for the folder, will make it easier to navigate to it. Eg, 'C:\Fediverse' or similar. Here are the extracted files from a small backup: .
Viewing the backup data – First step
We need to unzip the FediRenderer Tool on the same folder.
Use your Archive viewer tool, open the downloaded copy of the FediRenderer Project tool. It is a small archive, and only a few small files are inside.
You need to extract these into our working folder, c:\Fediverse , as well.
Second step – update and install needed pieces
Let's open the backup location, via a command line.
- Open a command line, and go to that location. 'Windows key' — 'cmd' — 'Enter key'.
- Then go to the location —
cd \Fediverse
(if using the example name above).
Now we need a one time command, to update the Node JS libraries needed for the viewer to work. Enter this command : npm install
. This results :
Third step – create the Viewable HTML
And now we are ready to use the FediRenderer. Enter this command:
node run.js <yourExportedDirectory>
— here, the yourExportedDirectory is where we placed our instance's extracted (unzipped) backup files. If using my suggestion, it's :
node run.js C:\Fediverse
, and enter key. Like this :
Fourth step – opening the outbox.html file
If all went well, your last command above created a new file, outbox.html
.
This file is pure HTML, and can be opened in any Browser – Firefox, MS Edge, Opera, Chrome, etc.
A quick way to open is, from inside the browser window to press 'Control-O' (the file Open command), and give it the path : c:\Fediverse\outbox.html
Viewing the HTML Account Backup file
And once opened in the browser, the full list of all the Toots in your backup archive will be displayed as a large HTML file. Example :
The red underlines here were added, just to signal those are live links:
- to any included URL;
- to the Timestamp in the Toot's left bottom — which will open the original toot, from its home instance;
- to any fediverse username shown in the toot as well.
And you can see any image that a toot contained originally. At the moment, only one image is shown if there are multiple ones in it. ^—top of page
Desired Features and additions ?
We could take on and improve the project. There are many very talented programmers in our fediverse, and I hope some will see the value of this tool — and take part on developing it.
From my desired features, I would mention :
- Ability to export any selected Toot's content, the text from it, with any enhanced text format (Markdown, HTML).
- If this could be copied to the clipboard, a new toot could be created in another tab, on our desired instance for it.
- Maybe this could also be offered to save to a text file (and toot's associated media, if any), for later use.
A huge kudo to the talented programmer who took my request and produced this version – much appreciated. Thank you! ^—top of page
Follow Blog via your Fediverse/Mastodon account :
@rgx@write.tedomum.net
This page created entirely in MarkDown language. Thank you for reading, feel free to comment about this post – reach me at my Writer's Lounge.