Skip to content

siongui/html2rst

Repository files navigation

Development Environment: Ubuntu 16.04 LTS and Go 1.6.2.

Goal: Convert HTML to reStructuredText in Golang. (not fully implemented)

Install

$ go get -u github.com/siongui/html2rst

Usage

See example:

package main

import (
  "github.com/siongui/html2rst"
  "net/http"
)

func main() {
  //resp, err := http.Get("http://nanda.online-dhamma.net/")
  //resp, err := http.Get("https://siongui.github.io/zh/2016/03/14/pillow-useful-items-for-me-notes/")
  resp, err := http.Get("http://myweb.ncku.edu.tw/~lsn46/Tipitaka/Sutta/Khuddaka/Khuddaka-patha/Khuddaka-patha.html")
  if err != nil {
      panic(err)
  }
  defer resp.Body.Close()

  print(html2rst.HtmlToRst(resp.Body))
}

See gae directory.

UNLICENSE

Released in public domain. See UNLICENSE.

References