anitogo

package module
v0.0.0-...-9913701 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorTokenNotFound                    = errors.New("token not found in tokens.tokens slice")
	ErrorMatchingTokenNotFound            = errors.New("a matching token was not found")
	ErrorInvalidIndexDerived              = errors.New("the provided parameters resulted in an invalid index being derived, and thus a valid slice could not be returned")
	ErrorRuneNotFoundInString             = errors.New("the specified rune was not found in the specified string")
	ErrorTokenizationProducedNoTokens     = errors.New("tokenization produced no tokens")
	ErrorInvalidEpisodeNumber             = errors.New("the provided episode number string does not represent a valid episode number")
	ErrorUnrecognisedOrdinal              = errors.New("unrecognised ordinal provided")
	ErrorKeywordManagerMapsNotInitialized = errors.New("keywordManager has uninitialised maps and thus entries could not be added to them")
	ErrorKeywordNotFound                  = errors.New("requested keyword was not found")
	ErrorPlaceholder                      = errors.New("this is a placeholder error")
)

Errors used throughout package

View Source
var TokenizerDefaultOptions = TokenizerOptions{
	AllowedDelimiters:  "_.&+,|",
	IgnoredStrings:     []string{},
	ParseEpisodeNumber: true,
	ParseEpisodeTitle:  true,
	ParseFileExtension: true,
	ParseReleaseGroup:  true,
}

TokenizerDefaultOptions provides sane default parser configuration options

Functions

This section is empty.

Types

type AnimeFile

type AnimeFile struct {
	AnimeSeason         []uint
	AnimeSeasonPrefix   string // S
	AnimeTitle          string
	AnimeType           []string // S
	AnimeYear           uint
	AudioTerm           []string // S
	DeviceCompatibility []string // S
	EpisodeNumber       []uint
	EpisodeNumberAlt    uint
	EpisodePrefix       string // S
	EpisodeTitle        string
	FileChecksum        string //S
	FileExtension       string
	FileName            string
	Language            []string // S
	Other               []string // S
	ReleaseGroup        string   // S
	ReleaseInformation  []string // S
	ReleaseVersion      uint     // S
	Source              []string // S
	Subtitles           string   // S
	VideoResolution     string   //S
	VideoTerm           []string // S
	VolumeNumber        uint
	VolumePrefix        string //S
	Unknown             string
	// contains filtered or unexported fields
}

AnimeFile describes a file that we are being asked te parse the name of

type TokenizerOptions

type TokenizerOptions struct {
	AllowedDelimiters  string
	IgnoredStrings     []string
	ParseEpisodeNumber bool
	ParseEpisodeTitle  bool
	ParseFileExtension bool
	ParseReleaseGroup  bool
}

TokenizerOptions configures the tokenizer's behaviour

Jump to

Keyboard shortcuts

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