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.
Top comments (19)
This is such a great step towards our commitment to data portability and fostering a healthy relationship with everyone on platform.
DEV is a partner to each and every community member, and has a special relationship to those who trust us to co-publish their work. It's not like people will need their data in this format all the time, but when they want it, they should get it.
Great work rhymes.
Nice! Is there any plans to have any of this data in
dev.to/rhymes/changelog-export-pos...
What do you mean? Title and creation date are in the export.
ps. didn't know there was a JSON metadata endpoint for the post :D
Is any of the export data going to be added to the endpoint (like markdown/reaction count)?
I don't know, you should ask the team or open a feature request. Didn't know it existed 😂
I... also didn't it existed. It's looks like a remnant
rails scaffold
that never got removed. Thanks to Rails magic it generates a whole endpoint because the file exists.I panicked for a second because this is the kind of thing that could result in a data leak but things look okay.
And yeah, I think it makes sense for that page to expose relevant data.
Whoops, logged into wrong account there.
They say any advertising is good advertising but I don't think you want your website being "advertised" by Troy Hunt 😉 haha
I don't think it is a good idea!
snake game
Is there any solution for it?
snake game
Nice going! Awesome
first issue
task. I hope to see more integrations and asset migration options in the future for dev.to. People like you make it possible.Really great feature!
Even I don't need it right now, I like the idea behind and the open relationship between dev.to and the members.
This really enhances the platform a lot in my opinion, so thank you :)
Thank you Robin, you capture the central idea exactly.
I hope, I or whomever will contribute next, we'll be able to expand and refine this feature in the near future
This is awesome. I plan to use it regularly. Thank you for your work!
Thanks Rhymes. That is pretty useful.
This is awesome! Out of curiosity, would you be willing to share your use-case for the export?
I just implemented the first feature because I was interested in learning a bit more about the source code.
I don't currently have a use case, but I know various users have asked for the possibility to export. It's the first step in a possible migration path.
After all the content is yours...
Totally, makes sense, just curious
Ohh this is a great step. I will help us a lot.
blogul-lui-gian.com/