Skip to content

πŸ‘©πŸ½β€πŸ’»πŸŽ’ a dev.to tool for the road

License

Notifications You must be signed in to change notification settings

davidmaceachern/devtogo

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘©πŸ½β€πŸ’»πŸŽ’

devtogo

a dev.to tool for the road🧳


devtogo is a cli for publishing offline markdown files to dev.to.

πŸ’Ύ install

🍻 Homebrew (osx)

$ brew install softprops/tools/devtogo

πŸ“¦ Cargo

$ cargo install devtogo

🚒 GitHub Releases

Using a version from this repo's GitHub Releases page, substitute a VERSION below with a valid release version

$ cd $HOME/bin
$ export VERSION=v0.1.0
$ curl -L "https://github.com/softprops/devtogo/releases/download/${VERSION}/devtogo-$(uname -s)-$(uname -m).tar.gz" \
  | tar -xz -C ~/bin

πŸ€Έβ€β™‚οΈ usage

devtogo is a cli for publishing offline markdown files to dev.to. These files follow the same formatting rules documented in dev.to's editor guide.

At a bare minimum you'll want to declare a title in a frontmatter section of your markdown file.

---
title: my very first post
---
# hello everybody

To get started, you will first need to export an DEVTO_API_KEY environment variable. You can generate yours πŸ‘‰here

$ export DEVTO_API_KEY='som3R@ndOmAp1K3y'

The most basic usage is to run the program inside the directory containing your target article content

$ devtogo

This will scan the current working directory for articles: markdown documents containing frontmatter describing metadata about the article. devtogo uses the title frontmatter field as a unique identifier to compare existing remote content.

When it can't resolve an article by title it uploads it, assuming its a new article. When it can, it local and remote compares content and uploads local copy if the content of the local copy differs.

you can use the published frontmatter to indicate if and when an article should be published by default articles are saved as drafts only you can see. Setting published to true will publish articles. If you do this by accident you can set published back to false to unpublish an article if needed

To be more explicit you can provide a source argument which provides a path where content is stored.

$ devtogo --source path/to/content

You can also experiment without actually posting your content using the --dryrun flag. This will perform all operations except for uploading your content. This may be useful for validating your content.

$ devto --dryrun

You can always review the posts uploaded in your dev.to dashboard online

Doug Tangren (softprops) 2020

About

πŸ‘©πŸ½β€πŸ’»πŸŽ’ a dev.to tool for the road

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%