medicine

command module
v0.0.0-...-d9d1e3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 11 Imported by: 0

README

MIT License Go Report Card


Come on, Medium code blocks do not support syntax highlighting... Although we can use syntax highlight by GitHubGist, it's painful when we have many code blocks.

medicine automatically converts code blocks with markdown in Medium into GitHubGist embedded links.

Table of Contents

Description

Look at an example of medicine.

Convert the code block in your Medium article

func main() {
    fmt.Println("Hello, World!")
}

into the embedded Gist!

screenshot 2018-07-31 11 22 44

Installation

$ go get github.com/micnncim/medicine

Usage

  1. Get GitHub Access Token and Medium Access Token.
  2. Prepare a Markdown file. See the following rules.
  • The first line should be Medium article title.
  • Code blocks require a filename. See the example.
  1. Run medicine <MARKDOWN_FILE> . If you run it for the first time, it requires your access tokens and saves the tokens in ~/.config/medicine/config.toml .
  2. A few seconds later, your browser opens your Medium article from the markdown file as a draft. Edit and publish it!

Example

Clone this repository and cd the path. Then, just run it!

$ medicine example.md

Author

@micnncim

License

FOSSA Status

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL