DEV Community

Cover image for Introducing a new tool - How to back your DEV Post
Dhairya Shah
Dhairya Shah

Posted on

Introducing a new tool - How to back your DEV Post

Hello folks πŸ‘‹

What's up friends, this is SnowBit here. I am a passionate young developer having the intention to become a successful developer.

Today, I am here with an amazing tool for my fellow writers on this platform. Probably, you all write articles and post on DEV.to and want to keep a backup of your posts and articles on GitHub and doing that manually becomes somewhat tedious work.

Here comes DEV Backup that backup/saves any post on DEV Community in your GitHub Repository in just a few clicks. Let's give it a try 🌟 - DEV Backup


Thank you for reading, have a nice day!

Top comments (11)

Collapse
 
andypiper profile image
Andy Piper • Edited

I can see how this could be a really useful tool for some people.

I noticed a few issues:

  • if the repository you specify for saving to does not exist, the backup fails, but the front-end reports that it was a success. The JS console shows the 404 error for the repository, though. There's no guidance text to say that the repository must already exist, the success message is not accurate, and no way to have the code create one without extending the PAT scopes.
  • this only backs up the markdown content of the post, not any attached media.
  • the file does not have a very identifiable name in the GitHub repository.

Also, I have some suggestions!

  • allow the repository to be created
  • allow this to backup all of my posts, not one-by-one (maybe use the Forem API, I don't know what the code is doing currently)

Maybe if you share the code on Gitlab or GitHub, others could help you out with some of these ideas.

Collapse
 
dhairyashah profile image
Dhairya Shah

Thank you for feedback!
code is now public - github.com/codewithsnowbit/dev-backup

Feel free to contribute in the project πŸ™‚

Collapse
 
andypiper profile image
Andy Piper

I'll take a look, thanks for sharing!

Thread Thread
 
dhairyashah profile image
Dhairya Shah

Sure!

Collapse
 
dhairyashah profile image
Dhairya Shah

managed to fix some of your suggested issues.

Thank you!

Collapse
 
yoansj profile image
Yoan

Great project ! Could be cool if you could make a web extension to make the process even faster. Kinda like the Notion extension that allows you to save any webpage inside your notion database πŸ‘

Collapse
 
dhairyashah profile image
Dhairya Shah • Edited

Great idea! πŸ™‚

Collapse
 
tqbit profile image
tq-bit

Looks like a cool idea. If you're currently learning about APIs, you might be curious about Forms's dev API: developers.forem.com/api

Collapse
 
odapx profile image
Odap

great idea, tho there's some bugs that can be prevented, I'll defienetly try to contribute to this.

Collapse
 
andypiper profile image
Andy Piper

Interesting, I'd like to know how this works, is the code available?

Collapse
 
dhairyashah profile image
Dhairya Shah

In brief

  • I get post data from dev.to using API and
  • then push the post content (markdown) to GitHub using GitHub Rest API

that is how it works πŸ™‚