utils

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfiguredPaths added in v1.2.4

func GetConfiguredPaths() []string

Return all folders configured by the user in the configuration file.

func GetImagesList added in v1.3.1

func GetImagesList() []string

This returns the image list. The difference from ListImagesRecursivelly is that this does not have to search again through the folders in order to improve performance for the fuzzy engine.

func MustWriteConfig added in v1.4.0

func MustWriteConfig(config Config)

Creates the config folder and the config.json if is not created yet. This function may pannic if cannot modify/create the configuration file.

func RefreshImagesList added in v1.4.1

func RefreshImagesList()

Goes trought the configured folders recursivelly and list all the supported image files.

func ResizeImage added in v1.3.1

func ResizeImage(image string) string

Resize the image to create a thumbnail. If a thumbnail already exists just do nothing.

Types

type Config added in v1.4.0

type Config struct {
	Paths []string `json:"Paths"`
}

func NewConfig added in v1.4.0

func NewConfig() Config

func (Config) WithPaths added in v1.4.0

func (c Config) WithPaths(paths []string) Config

Jump to

Keyboard shortcuts

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