data

package
v0.1.61 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

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"
)

Variables

This section is empty.

Functions

func AbsAtomPath

func AbsAtomPath() string

func AbsBackupDir

func AbsBackupDir() string

func AbsCookiesPath

func AbsCookiesPath() string

func AbsLocalContentDir

func AbsLocalContentDir() string

func AbsMatchedContentDir

func AbsMatchedContentDir() string

func AbsReduxDir

func AbsReduxDir() string

func AbsSourcePath

func AbsSourcePath() string

func ChRoot

func ChRoot(d string)

func LoadRecipes

func LoadRecipes() (wits.SectionKeyValue, error)

func Pwd

func Pwd() string

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