archive

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateZipTo

func CreateZipTo(inputDir string, destDir string) (dest string, err error)

Create ZIP File of inputDir, and output the zip to destDir.

This function is a variant of CreateZip(), purpose to provide flexibility.

func RenameZip

func RenameZip(absPath string, opt RenameOption) error

Rename zip file to cbz file.

Developer can wrap behavior by:

RenameZip(absPath, NoWrap()) // No Wrap method
RenameZip(absPath, UseDefaultWrap()) // Default wrap with .cbz filename
RenameZip(absPath, UseCustomWrap("someFolder")) // Wrap with custom folder name

func SoftDeleteComic

func SoftDeleteComic(originDir string, trashBin string) error

Soft delete original comic directory, by move it to given trash bin path. i.e. Given param "C:/foo/bar" and "C:/dest", "C:/foo/bar" will be renamed to "C:/dest/bar"

Types

type RenameOption

type RenameOption renameOption

Option for rename .cbz files. Only one option can passed at a time.

func NoWrap

func NoWrap() RenameOption

Not use any wrap method, only single .cbz file will be created.

func UseCustomWrap

func UseCustomWrap(folder string) RenameOption

Custom wrap folder name, which allow different with .cbz filename.

func UseDefaultWrap

func UseDefaultWrap() RenameOption

Use default wrap option, which use .cbz filename as wrap folder.

The reason for this wrap is to designed for komga exports, when only one book is available, this filepath format would be better for komga:

{bookName}/{bookName}.cbz

Jump to

Keyboard shortcuts

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