parse

package
v1.0.0-rc.8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Codecs = makeMatcher(codecMap)

Codecs is a list of parseable codecs

View Source
var Qualities = makeMatcher(qualityMap)

Qualities list all possible qualities to parse

View Source
var Sources = makeMatcher(sourceMap)

Sources lists all prossible sources to parse

Functions

func CleanName

func CleanName(name string) string

CleanName returns the media name cleaned from punctuation

func Codec

func Codec(name string) codec.Tag

Codec parses the codec from a file name

func Duration

func Duration(str string) (time.Duration, error)

Duration takes a textual representation of a duration (e.g. 2h38m) and returns the parsed duration from the time package. An error is returned if the input was invalid (i.e. could not be parsed into a duration)

func Filename

func Filename(filename string) string

Filename returns the filename of the file without extension

func Group

func Group(name string) string

Group parses and returns the release group

func Identity added in v1.0.0

func Identity(str string) string

Identity returns a string where special characters are removed. The returned string is suitable for use in an identity string

func Language

func Language(lang string) (language.Tag, error)

Language returns a language taken when given the english word for a language (e.g. english). If the string is not a known language an error is returned

func Miscellaneous added in v1.0.0

func Miscellaneous(name string) misc.List

Miscellaneous returns a list of miscellaneous media tags from a string

func PhoneticNumber

func PhoneticNumber(num int) string

PhoneticNumber converts an integer into a human readable string

func Quality

func Quality(name string) quality.Tag

Quality finds the quality of the media

func Source

func Source(name string) source.Tag

Source parses the source from a filename

func Tags

func Tags(name string) []string

Tags returns a string as tags split by non-word characters

Types

This section is empty.

Jump to

Keyboard shortcuts

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