utils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 7 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 ListImagesRecursivelly added in v1.3.1

func ListImagesRecursivelly()

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

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 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