packer

package
v0.0.0-...-d9242b9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() []string

Available returns a list of available packers.

Types

type Packer

type Packer interface {
	// SupportedConversion what conversion format does this packer supports
	SupportedConversion() (formats []constant.ConversionFormat)
	Save(chapter *source.Chapter) (string, error)
	SaveTemp(chapter *source.Chapter) (string, error)
}

Packer is the interface that all packers must implement.

func Get

func Get(name string) (Packer, error)

Get returns a packer by name. If the packer is not available, an error is returned.

type PageContainer

type PageContainer struct {
	// Page is a pointer to a manga page object.
	Page *source.Page
	// Image is the decoded image of the manga page.
	Image image.Image
	// Format is a string representing the format of the image (e.g., "png", "jpeg", "webp").
	Format string
}

PageContainer is a struct that holds a manga page, its image, and the image format.

func NewContainer

func NewContainer(Page *source.Page, img image.Image, format string) *PageContainer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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