parsers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Path  string
	AniDb *int64
	Name  string
}

func (Info) Describe

func (i Info) Describe() []string

func (Info) Subs

func (i Info) Subs() []util.SubDescribable

type MoviesParser

type MoviesParser struct {
	// contains filtered or unexported fields
}

MoviesParser is a parser for movie paths

func CreateMoviesParser

func CreateMoviesParser(logger *zap.SugaredLogger, movies config.Movie) (parser *MoviesParser, err error)

CreateMoviesParser creates a new movies parser

func (MoviesParser) Describe

func (p MoviesParser) Describe() []string

Describe returns information about the movie parser

func (MoviesParser) Parse

func (p MoviesParser) Parse(path, file, ext string) (res string, done bool)

Parse implements the parsing of movie information from filenames

func (MoviesParser) Subs

func (p MoviesParser) Subs() []util.SubDescribable

Subs returns the underlying descriptions of the movie parser

type ParseInfo

type ParseInfo struct {
	Name     string
	AniDb    *int64
	Season   int
	Num      string
	Ext      string
	Year     int
	Filename string
}

type Parser

type Parser interface {
	Parse(file string) (info []SeriesInfo)
	util.Describable
}

func CreateEpiParser

func CreateEpiParser(logger *zap.SugaredLogger) Parser

CreateEpiParser constructs a new epi parser

func CreateParser

func CreateParser(logger *zap.SugaredLogger, parser string) (Parser, error)

func CreateTVParser

func CreateTVParser(logger *zap.SugaredLogger) Parser

CreateTVParser creates a new tv parser

type SeriesInfo

type SeriesInfo struct {
	Season  int
	Episode int
}

type SeriesParser

type SeriesParser struct {
	// contains filtered or unexported fields
}

func CreateSeriesParser

func CreateSeriesParser(logger *zap.SugaredLogger, group config.Group) (parser SeriesParser, err error)

func (SeriesParser) Describe

func (p SeriesParser) Describe() []string

func (SeriesParser) Parse

func (p SeriesParser) Parse(path, file, ext string) (string, bool)

func (SeriesParser) Subs

func (p SeriesParser) Subs() []util.SubDescribable

Jump to

Keyboard shortcuts

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