DEV Community

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

Posted on

21 9

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!

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

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 πŸ™‚

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay