Complete Migrations of Bookwyrm Accounts across instances #2980
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to implement #1012. It introduces new export and import functionality, that allows users to export their entire account and all associated media in a self-contained tar file.
Archive structure
The tar.gz archive contains three parts:
archive.json
: Containing the user settings, names and books used by the user.avatar.png
/avatar.jpg
: A user's avatar image if presentcovers/
: the book covers used by the userImplementation
This project was implemented in collaboration during the first Guild Alpha Sprint.
We decided to use a custom JSON archive as the basis of this proposal, as @hughrun had already done work on that, which we used as a base.
On this we added:
archive.json
archive.json
into a tar archiveDue to time constraints we couldn't implement everything needed. Here are the tasks, that we know of, that still need work:
Hopefully with our work as a base, the remainder can be undertaken by BookWyrm itself to bring this PR to completion.
Screenshots
Known Bugs
test_export_user.py
ErrorsExportUserViews.test_download_export_user_file
is throwing:bookwyrm.models.bookwyrm_export_job.BookwyrmExportJob.DoesNotExist: BookwyrmExportJob matching query does not exist.
ExportUserViews.test_export_user_get
is throwing:Exception: line 367 column 5 - Warning: inserting implicit <p>
Contributors:
Special thanks to @Ryuno-Ki and @circlebuilder