kensanata / mastodon-archive

Archive your statuses, favorites and media using the Mastodon API (i.e. login required)
https://alexschroeder.ch/software/Mastodon_Archive
GNU General Public License v3.0
362 stars 33 forks source link

Generate tarball compatible to Mastodon's export #83

Open IzzySoft opened 1 year ago

IzzySoft commented 1 year ago

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 commented 1 year ago

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?

kensanata commented 1 year ago

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

IzzySoft commented 1 year ago

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).

TheLastBilly commented 8 months ago

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

kensanata commented 8 months ago

Ah, nice!