library

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArchiveExtensions = regexp.MustCompile(`\.(?:zip|cbz|rar|cbr)$`)
View Source
var ImageExtensions = regexp.MustCompile(`\.(?:jpe?g|png|webp|bmp|gif|tiff)$`)
View Source
var MetaExtensions = regexp.MustCompile(`\.(?:json|txt)$`)

Functions

func Extract7z

func Extract7z()

func ExtractPDF

func ExtractPDF()

func GenerateThumbnails

func GenerateThumbnails(pages bool, force bool)

GenerateThumbnails generates thumbnails for covers and pages in parallel.

func InitCache

func InitCache()

func PathExists

func PathExists(pathTo string) bool

func ReadAll added in v0.3.0

func ReadAll(fsys fs.FS, filename string) ([]byte, error)

func ReadArchiveImages added in v0.3.0

func ReadArchiveImages(archivePath string, galleryUUID string, onlyCover bool)

ReadArchiveImages reads given archive ands generates thumbnails for found images. If onlyCover is true, only covers are generated and the name of cover is saved to db, otherwise covers are generated.

func ReadGallery

func ReadGallery(archivePath string, uuid string) ([]string, int)

func ReadJSON

func ReadJSON(jsonFile string) ([]byte, error)

ReadJSON returns the given JSON file as bytes.

func ScanArchives

func ScanArchives()

func Similarity

func Similarity(a string, b string) float64

func UniversalExtract

func UniversalExtract(dst string, archivePath string) ([]string, int)

UniversalExtract extracts media files from zip, cbz, rar, cbr, tar (all its variants) archives. Plain directories without compression are also supported. For 7zip and PDF see Extract7z and ExtractPDF respectively.

Types

This section is empty.

Jump to

Keyboard shortcuts

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