Thanks to visit codestin.com
Credit goes to github.com

Skip to content

coxley/quip2md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quip2md GoDoc Build Status

Quip is a cloud documentation suite which provides a web API for interacting with it. While the UI has export options for different formats, it all happens client-side. The API only returns HTML which is heavily customized to work with their styling. Unfortunately this means no markdown converter knows how to act when processing.

There's an existing issue on the quip-api repo but it doesn't seem to be a priority. That's where quip2md comes in!

Supported Features

  • Headers 1-3
  • Bold
  • Italics
  • Underline [*]
  • Strikethrough [*]
  • Inline Code
  • Hyperlinks
  • Unordered Lists
  • Ordered Lists
  • Checked Lists w/ check marks maintained
  • Nested lists w/ a-z and roman numerals on unordered lists
  • Quote Blocks w/ maintained text styling
  • Code Blocks - including adjacent ones

Caveats [*]

  • Not every Markdown renderer supports underline the same way. We use _this_
  • Not every Markdown renderer supports strikethrough. We use ~~this~~
  • Highlighted text will be converted with no styling applied

Download

go get -u github.com/coxley/quip2md/...

Usage

quip2md can be used as both a library in your Go program or from the CLI. This is done to enable any project regardless of implementation language to take advantage

If you're using the go-quip library, usage might look like the following:

package main

import (
	"fmt"

	"github.com/coxley/quip2md"
	quip "github.com/mduvall/go-quip"
)

const quip_token = "YOUR_API_TOKEN"
const quip_ref_doc = "EXAMPLE_DOCUMENT_THREAD_ID"

func main() {
	q := quip.NewClient(quip_token)
	thread := q.GetThread(quip_ref_doc)
	md, _ := quip2md.QuipToMarkdown(thread.Html)
	fmt.Println(md)

}

From the CLI:

$ quip2md --help
NAME:
   quip2md - Convert Quip HTML to Markdown

USAGE:
   quip2md [file to convert]
   cat [file to convert] | quip2md
   custom_program | quip2md

About

Library and CLI to convert Quip HTML to Markdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published