ugoira

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UGOIRA_ACCEPTED_EXT = []string{
	".gif",
	".apng",
	".webp",
	".webm",
	".mp4",
}

Functions

func ConvertUgoira

func ConvertUgoira(ugoiraInfo *Ugoira, imagesFolderPath string, ugoiraFfmpeg *UgoiraFfmpegArgs) error

Converts the Ugoira to the desired output path using FFmpeg

func DownloadMultipleUgoira

func DownloadMultipleUgoira(ugoiraArgs *UgoiraArgs, ugoiraOptions *UgoiraOptions, config *configs.Config, reqHandler httpfuncs.RequestHandler, progBarInfo *progress.ProgressBarInfo) []error

Downloads multiple Ugoira artworks and converts them based on the output format

func GetUgoiraFilePaths

func GetUgoiraFilePaths(ugoireFilePath, ugoiraUrl, outputFormat string) (string, string)

Returns the ugoira's zip file path and the ugoira's converted file path

func MapDelaysToFilename

func MapDelaysToFilename(ugoiraFramesJson UgoiraFramesJson) map[string]int64

Map the Ugoira frame delays to their respective filenames

Types

type Ugoira added in v1.1.0

type Ugoira struct {
	Url      string
	FilePath string
	Frames   map[string]int64
}

type UgoiraArgs

type UgoiraArgs struct {
	UseMobileApi bool
	ToDownload   []*Ugoira
	Cookies      []*http.Cookie
	MainProgBar  progress.ProgressBar
	// contains filtered or unexported fields
}

func (*UgoiraArgs) SetContext added in v1.1.0

func (u *UgoiraArgs) SetContext(ctx context.Context)

type UgoiraFfmpegArgs

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

type UgoiraFramesJson added in v1.1.0

type UgoiraFramesJson []struct {
	File  string  `json:"file"`
	Delay float64 `json:"delay"`
}

type UgoiraOptions

type UgoiraOptions struct {
	DeleteZip    bool
	Quality      int
	OutputFormat string
}

UgoiraDlOptions is the struct that contains the configs for the processing of the ugoira images after downloading from Pixiv.

func (*UgoiraOptions) ValidateArgs

func (u *UgoiraOptions) ValidateArgs() error

ValidateArgs validates the arguments of the ugoira process options.

Should be called after initialising the struct.

Jump to

Keyboard shortcuts

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