convert

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPath

func NewPath(filePath string, inputFormat format.Info, outputFormat format.Info) string

NewPath creates a new path for a file after conversion

Types

type Conversion

type Conversion struct {
	InputPath    string
	OutputPath   string
	InputFormat  format.Info
	OutputFormat format.Info
}

Conversion stores all information needed to perform a conversion

func Prepare added in v0.8.0

func Prepare(file source.File, outputFormat format.Info) Conversion

Prepare will set up a conversion job given file and output format

func PrepareAll

func PrepareAll(files []source.File, outputFormat format.Info) []Conversion

PrepareAll prepares an array of files for conversion

type ConversionResult

type ConversionResult struct {
	InputPath    string
	OutputPath   string
	InputFormat  format.Info
	OutputFormat format.Info
	Duration     int64
	Error        string
	Warning      string
	Errored      bool
	Warned       bool
	Success      bool
	Skipped      bool
	SkipReason   string
	InputSize    int64
	OutputSize   int64
}

ConversionResult stores information about a conversion like status, speed and so on

func Do

func Do(conversion Conversion) ConversionResult

Do completes a conversion given input path, output path, input format and output format

Jump to

Keyboard shortcuts

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