There is a new feature in town 😅
You can export your dev.to posts, you'll receive an email with an attached zip file containing a JSON with all your posts.
How do I do that?
You go to https://dev.to/settings/misc and select export, but I also prepared some screenshots so bear with me:
then after submitting the form this happens:
and after a little while you get an email like this one in your inbox:
This is an example of what's inside the file:
I'm a developer, how did you accomplish that?
The feature is quite simple in a sense:
- you request the export
- the backend takes note of that
- a background job starts, collects the posts, converts data and metadata in json
- creates a zip file in memory and adds the json file to the zip
- the zip file gets attached to the email
- the email is sent
Some backstory about this feature
A few months ago, prompted by a feature request, I started working on a pull request to do the above. Then I forgot all about it, then I submitted it but it wasn't that great because I didn't know that much about the code (still don't really :D) and because it could have been better in general.
My PR nonetheless started a conversation with @ben, @maestromac and @jess and after a refactoring and another round of reviews (yay for pull requests!) what has been merged today is something... just better.
What about the rest of the data?
I know the dev.to team is aware of that, this is just a first step.