audios

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExist = errors.Business("file already exist (%s)", "DE:001")

Functions

func Extract

func Extract(_ context.Context, params Params) (files.Output, error)

func Normalize

func Normalize(_ context.Context, params Params) (files.Output, error)

func WriteTags added in v0.8.0

func WriteTags(_ context.Context, tags AudioTags, source string) error

Types

type AudioTags added in v0.8.0

type AudioTags struct {
	Title   string
	Artist  string
	Album   string
	Year    int
	URL     string
	Comment string
}

func Info added in v0.8.0

func Info(_ context.Context, source string) (AudioTags, error)

func (AudioTags) FromRaw added in v0.8.0

func (t AudioTags) FromRaw(raw collection.Params) AudioTags

type Config

type Config struct {
	OutputDir string `fig:"output_dir" yaml:"output_dir" default:"audios"`
}

func (Config) Apply

func (c Config) Apply(p Params) (Params, error)

func (Config) FromRaw

func (c Config) FromRaw(raw collection.Params) (Params, error)

type Params

type Params struct {
	Source    string
	OutputDir string
}

func (Params) Filename

func (p Params) Filename() string

func (Params) SouceRelative

func (p Params) SouceRelative() string

func (Params) WithPrefix

func (p Params) WithPrefix(prefix string) string

Jump to

Keyboard shortcuts

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