mastodon-archive icon indicating copy to clipboard operation
mastodon-archive copied to clipboard

Generate tarball compatible to Mastodon's export

Open IzzySoft opened this issue 2 years ago • 5 comments

As the Readme points out, since Mastodon v2.3.0 it's possible to get an export of ones account every 7 days. There are several viewers available for that meanwhile, my favorite being mav-z: its output is very nice if you simply want to browse your toots, it gives you some nice graphical stats (see the screenshot there) and more (try it out yourself, works out-of-the-box from a cloned repo). But generating and waiting for such an export becoming available when all the needed data is there locally on my machine already is a bit "inconvenient".

Thus it would be very nice if we could simply generate such an archive locally, based on the data mastodon-backup already has collected. We discussed this already a little and you sounded open to the idea – so I thought I create an issue for it to get it going. Maybe you find some time yourself to work on it – or maybe someone stumbling on this issue is willing and can provide a fitting PR. I just hope it will happen somehow :smiley:

IzzySoft avatar Nov 04 '22 18:11 IzzySoft

Maybe this could simply utilize what mastodon-archive meow already provides? Going by the Readme:

Meow is a viewer for Mastodon export files […] It can also process your archives created with this tool. Meow runs locally in your browser and needs access to your archive. This is accomplished by serving the archive via a local web server.

So does Meow support the format of mastodon-backup – or is mastodon-backup feeding Meow with an archive compatible to the export? In the latter case, this would just needed to be saved locally, right?

IzzySoft avatar Nov 04 '22 19:11 IzzySoft

Meow supports the format of mastodon-backup, as far as I remember.

kensanata avatar Nov 06 '22 15:11 kensanata

A raw glance at the corresponding code seems to confirm that, yes – my Python is a bit rusty (not rust, that's not even present here :speak_no_evil: :see_no_evil:) so I thought I better ask. Thanks!

OK, that verified: then we'd need to create that bundle. The necessary data should be in the JSON created by mastodon-archive, so it's "just" some time to invest – which hopefully someone finds (due to my rusty Python and time constraints, I won't be able to).

IzzySoft avatar Nov 06 '22 17:11 IzzySoft

Just in case anybody might still be interested on this, I'm working on a command line option for exporting backups on a format that mastodon-data-viewer understands. Right now is more of a hack, but ideally it will get to the point where the exported files are complaint with the Mastodon API

https://github.com/TheLastBilly/mastodon-archive/tree/outbox-export

TheLastBilly avatar Feb 03 '24 01:02 TheLastBilly

Ah, nice!

kensanata avatar Feb 03 '24 08:02 kensanata