Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coxley/quip2md
Library and CLI to convert Quip HTML to Markdown
https://github.com/coxley/quip2md
Last synced: 15 days ago
JSON representation
Library and CLI to convert Quip HTML to Markdown
- Host: GitHub
- URL: https://github.com/coxley/quip2md
- Owner: coxley
- License: mit
- Created: 2018-10-03T17:49:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-03T20:18:30.000Z (about 6 years ago)
- Last Synced: 2024-08-01T03:32:50.149Z (3 months ago)
- Language: Go
- Size: 22.5 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- stars - coxley/quip2md
README
# quip2md [![GoDoc](https://godoc.org/github.com/coxley/quip2md?status.svg)](https://godoc.org/github.com/coxley/quip2md) [![Build Status](https://travis-ci.org/coxley/quip2md.svg?branch=master)](https://travis-ci.org/coxley/quip2md)
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](https://github.com/quip/quip-api/issues/8) on the
[quip-api](https://github.com/quip/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
```shell
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 advantageIf you're using the [go-quip](https://github.com/mduvall/go-quip) library,
usage might look like the following:```golang
package mainimport (
"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 MarkdownUSAGE:
quip2md [file to convert]
cat [file to convert] | quip2md
custom_program | quip2md```