parser

package module
v0.0.0-...-226d683 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Html          string        `json:"html"`
	OriginalHtml  string        `json:"html_original,omitempty"`
	Text          string        `json:"text"`
	OriginalText  string        `json:"text_original,omitempty"`
	Category      string        `json:"category"`
	Topics        []EventPage   `json:"topics"`
	PrimaryTopic  EventPage     `json:"primary_topic"`
	Sources       []EventSource `json:"sources"`
	PrimarySource EventSource   `json:"primary_source"`
	References    []EventPage   `json:"references"`
	Date          time.Time     `json:"date"`
	OriginalDate  string        `json:"date_original,omitempty"`
	Checksum      string        `json:"checksum"`
	Page          string        `json:"page"`
	Contributors  string        `json:"contributors"`
}

func Parse

func Parse(content io.Reader, options ParserOptions) ([]Event, error)

type EventPage

type EventPage struct {
	Title       string `json:"title"`
	Uri         string `json:"uri"`
	ExternalUrl string `json:"external_url"`
}

type EventSource

type EventSource struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

type ParserOptions

type ParserOptions struct {
	IncludeOriginal bool
}

Jump to

Keyboard shortcuts

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