Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softprops/devtogo
π©π½βπ»π a dev.to tool for the road
https://github.com/softprops/devtogo
blogging devto
Last synced: 3 months ago
JSON representation
π©π½βπ»π a dev.to tool for the road
- Host: GitHub
- URL: https://github.com/softprops/devtogo
- Owner: softprops
- License: mit
- Created: 2020-06-11T18:44:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T04:21:07.000Z (almost 2 years ago)
- Last Synced: 2024-09-14T10:36:26.292Z (4 months ago)
- Topics: blogging, devto
- Language: Rust
- Size: 117 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
π©π½βπ»π
devtogo
a dev.to tool for the roadπ§³
devtogo is a cli for publishing offline markdown files to dev.to.
## πΎ install
### π» [Homebrew](https://brew.sh/) (osx)
```sh
$ brew install softprops/tools/devtogo
```### π¦ [Cargo](https://doc.rust-lang.org/cargo/)
```sh
$ cargo install devtogo
```### π’ [GitHub Releases](https://help.github.com/github/administering-a-repository/about-releases)
Using a version from this repo's [GitHub Releases page](https://github.com/softprops/devtogo/releases),
substitute a VERSION below with a valid release version```sh
$ 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](https://dev.to/). These files follow the same formatting rules documented in [dev.to's editor guide](https://dev.to/p/editor_guide).
At a bare minimum you'll want to declare a **`title`** in a [frontmatter section](https://jekyllrb.com/docs/front-matter/) of your markdown file.
```md
---
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](https://dev.to/settings/account)
```sh
$ export DEVTO_API_KEY='som3R@ndOmAp1K3y'
```The most basic usage is to run the program inside the directory containing your target article content
```sh
$ 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 it's a new article. When it can, it compares local and remote 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 revert a published an article if neededTo be more explicit you can provide a source argument which provides a path where content
is stored.```sh
$ 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.```sh
$ devto --dryrun
```You can always review the posts uploaded in [your dev.to dashboard online](https://dev.to/dashboard)
Doug Tangren (softprops) 2020