html2text

package module
v0.0.0-...-491ddf8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2015 License: MIT Imports: 5 Imported by: 1

README

html2text

An html to text converter written in Go. This library will strip the html tags from the source and perform clean up on the text. This includes things like adding new lines correctly and appending on urls from links.

Build Status

Install

go get github.com/sgoertzen/html2text

Usage

import "github.com/sgoertzen/html2text"

func main() {
	t := html2text.Textify("<div>hello</div>")
	log.Println(t)  // Outputs "hello"
}

More Examples

See the included html2text_test.go file for more usage examples.

Enhancements

If you encounter html that doesn't work properly please open an issue with the specific html and desired text.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Textify

func Textify(body string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL