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!
- 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
- 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
go get -u github.com/coxley/quip2md/...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