usecase

package
v0.0.0-...-e48dafa Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStopWalking = errors.New("stop walking")
)

Functions

func DownloadComicDir

func DownloadComicDir(src source.Source, pathFrom, pathTo string) (retErr error)

func ExtractComic

func ExtractComic(src source.Source, arch archive.Extractor, pathFrom, pathTo string) (retErr error)

func RemoveAll

func RemoveAll(ctx context.Context, dir string) error

func WalkComics

func WalkComics(src source.Source, root string, walkFn func(model.Comic) error) error

Types

type ComicAnalyzed

type ComicAnalyzed struct {
	Pages                        []PageAnalyzed
	AspectRatioAverage           float64
	AspectRatioVariance          float64
	AspectRatioStandardDeviation float64
	HueHistogram50               [51]float64
	ChromaHistogram50            [51]float64
	LuminanceHistogram50         [51]float64
}

func AnalyzeComic

func AnalyzeComic(src source.Source, dir string) (*ComicAnalyzed, error)

type HCL

type HCL struct {
	Hue       float64 // [0, 360]
	Chroma    float64 // [-1, 1]
	Luminance float64 // [0, 1]
}

type PageAnalyzed

type PageAnalyzed struct {
	model.Page
	AspectRatio              float64
	AspectRatioStandardScore float64
	HueHistogram50           [51]float64
	ChromaHistogram50        [51]float64
	LuminanceHistogram50     [51]float64
}

type PageDiagnostic

type PageDiagnostic struct {
	Index     int
	Landscape bool
}

func DiagnosePages

func DiagnosePages(pages []model.Page) (diagnostics []PageDiagnostic, _ error)

Jump to

Keyboard shortcuts

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