ugoira

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: GPL-3.0 Imports: 21 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 *models.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)

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 models.UgoiraFramesJson) map[string]int64

Map the Ugoira frame delays to their respective filenames

Types

type UgoiraArgs

type UgoiraArgs struct {
	Context       context.Context
	UseMobileApi  bool
	ToDownload    []*models.Ugoira
	Cookies       []*http.Cookie
	UgoiraProgBar progress.Progress
}

type UgoiraFfmpegArgs

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

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