gparse

package
v0.0.0-...-bc4c757 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeUrl

func NormalizeUrl(u *url.URL) (outputUrl *url.URL, err error)

Types

type Heading

type Heading struct {
	Level int
	Text  string
}

type Image

type Image struct {
	AltText string
	Value   string
}
type Link struct {
	Url  string
	Text string
}

type Page

type Page struct {
	Text     string
	Links    []Link
	Headings []Heading
	Title    string
	Lang     string
	Kind     string
	Images   []Image
}

func ParseGemtext

func ParseGemtext(text string, base *url.URL) (result Page)

func ParsePage

func ParsePage(body []byte, base *url.URL, contentType string) (result Page, err error)

func ParsePlain

func ParsePlain(text string) (result Page)

Jump to

Keyboard shortcuts

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