utils

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidFolder

func IsValidFolder(path string) bool

IsValidFolder checks if the provided path is a valid directory

func Optimize

func Optimize(options *OptimizeOptions) error

Optimize optimizes a CBZ/CBR file using the specified converter. The new pipeline is disk-first: 1. Fast check if already converted (no extraction) 2. Extract archive to temp directory on disk 3. Convert pages file-to-file (no image data in memory) 4. Create output CBZ by streaming from disk 5. Cleanup temp files

Types

type OptimizeOptions

type OptimizeOptions struct {
	ChapterConverter converter.Converter
	Path             string
	Quality          uint8
	Override         bool
	Split            bool
	// KeepFilenames preserves the original base filename of each page inside
	// the output CBZ (with the extension swapped for format conversion)
	// instead of the historical %04d sequential naming. Off by default so
	// existing behavior is unchanged.
	KeepFilenames bool
	Timeout       time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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