Skip to content

causelovem/html2text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

html2text

Simple html to text converter.

How to install

go get github.com/causelovem/html2text

How to use

package main

import (
	"fmt"

	"github.com/causelovem/html2text"
)

func main() {
	html := `<div><h1>some text</h1></div> <p>to be <b>cleared</b> </br> from &quot;html&quot; &lt;tags&gt;</p>`

	text := html2text.HTML2Text(html)

	fmt.Println(text)
}