data

package
v0.1.67 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Backups        pathways.AbsDir = "backups"
	Input          pathways.AbsDir = "input"
	LocalContent   pathways.AbsDir = "local-content"
	MatchedContent pathways.AbsDir = "matched-content"
	Output         pathways.AbsDir = "output"
	Redux          pathways.AbsDir = "redux"
)
View Source
const (
	GetContentErrorsProperty   = "get-content-errors"
	DecodeErrorsProperty       = "decode-errors"
	MatchContentErrorsProperty = "match-content-errors"
	ReduceErrorsProperty       = "reduce-errors"

	CurrentElementsProperty  = "current-elements"
	AddedElementsProperty    = "added-elements"
	RemovedElementsProperty  = "removed-elements"
	PreviousElementsProperty = "previous-elements"
	SourceURLProperty        = "source-url"
)
View Source
const (
	Id                       = "id"
	URL                      = "url"
	Recipe                   = "recipe"
	Encoding                 = "encoding"
	Title                    = "title"
	Category                 = "category"
	ContainerSelector        = "container-selector"
	TextContent              = "text-content"
	ElementsSelector         = "elements-selector"
	ElementReductionSelector = "element-reduction-selector"
	ElementAttribute         = "element-attribute"
)
View Source
const DefaultNovusRootDir = "/usr/share/novus"

Variables

This section is empty.

Functions

func AbsAtomPath

func AbsAtomPath() (string, error)

func AbsCookiesPath

func AbsCookiesPath() (string, error)

func AbsSourcesPath added in v0.1.63

func AbsSourcesPath() (string, error)

func AllAbsDirs added in v0.1.63

func AllAbsDirs() []pathways.AbsDir

func AllProperties added in v0.1.63

func AllProperties() []string

func LoadRecipes

func LoadRecipes() (wits.SectionKeyValue, error)

func SourcesIdPropertyValues added in v0.1.60

func SourcesIdPropertyValues(sources []*Source) map[string]map[string][]string

func SourcesIds

func SourcesIds(src ...*Source) []string

Types

type QuerySelectors

type QuerySelectors struct {
	ContainerSelector        string
	TextContent              string
	ElementsSelector         string
	ElementReductionSelector string
	ElementAttribute         string
}

func NewQuerySelectors

func NewQuerySelectors(kv wits.KeyValue) *QuerySelectors

func (*QuerySelectors) IsValid

func (qs *QuerySelectors) IsValid() error

func (*QuerySelectors) Override

func (qs *QuerySelectors) Override(another *QuerySelectors)

type Source

type Source struct {
	Id       string
	URL      *url.URL
	Recipe   string
	Encoding string
	Title    string
	Category string
	Query    *QuerySelectors
}

func LoadSources

func LoadSources() ([]*Source, error)

func SourceById

func SourceById(id string, src ...*Source) *Source

func (*Source) IsValid

func (src *Source) IsValid() error

Jump to

Keyboard shortcuts

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