htmlx

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTextFromHTMLFile

func ExtractTextFromHTMLFile(name string, charsets ...string) (string, error)

func ExtractTextFromHTMLNode

func ExtractTextFromHTMLNode(node *html.Node) string

func ExtractTextFromHTMLString

func ExtractTextFromHTMLString(html string) (string, error)

func FindElementNode

func FindElementNode(n *html.Node, tag atom.Atom) *html.Node

func FindElementNodes

func FindElementNodes(n *html.Node, tag atom.Atom) (ns []*html.Node)

func GetMetas

func GetMetas(n *html.Node) map[string]string

func GetTitle

func GetTitle(n *html.Node) string

func HTMLFileTextify

func HTMLFileTextify(w io.Writer, name string, charsets ...string) error

func HTMLReaderTextify

func HTMLReaderTextify(w io.Writer, r io.Reader) error

func HTMLStringTextify

func HTMLStringTextify(w io.Writer, html string) error

func ParseHTMLFile

func ParseHTMLFile(name string, charsets ...string) (*html.Node, error)

func Stringify

func Stringify(n *html.Node) string

func Textify

func Textify(n *html.Node, w io.Writer) error

Types

type Textifier

type Textifier struct {
	// contains filtered or unexported fields
}

func NewTextifier

func NewTextifier(w io.Writer) *Textifier

func (*Textifier) Textify

func (tf *Textifier) Textify(n *html.Node) error

Jump to

Keyboard shortcuts

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