config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version      = "v0.2.3"
	OutputFolder = "Pictures/gowall"

	OCRSchemaFile      = "schema.yml"
	WallOfTheDayUrl    = "https://www.reddit.com/r/wallpaper/top/"
	HexCodeVisualUrl   = "https://lawlesscreation.github.io/hex-color-visualiser/"
	UpscalerBinaryName = "realesrgan-ncnn-vulkan"
	PngquantBinaryName = "pngquant"
	EnvFilePath        = ".gowall/.env"
)

Variables

View Source
var (
	EnableImagePreviewingDefault = true
	InlineImagePreviewDefault    = false
	ImagePreviewBackend          = ""
	ThemesDefault                = []themeWrapper{}
)
View Source
var GowallConfig = defaultConfig()
View Source
var SupportedImageExtensions = map[string]bool{
	".png":  true,
	".jpeg": true,
	".jpg":  true,
	".webp": true,
}
View Source
var SupportedTextExtensions = map[string]bool{
	".pdf": true,
}

Functions

func CreateDirectory added in v0.2.1

func CreateDirectory() (dirPath string, err error)

func GetInt added in v0.2.2

func GetInt(key string, defaultValue int) int

func GetString added in v0.2.2

func GetString(key string, defaultValue string) string

func LoadConfig added in v0.2.1

func LoadConfig()

Types

type EnvConfig added in v0.2.2

type EnvConfig struct {
	// OpenAI & OpenAI compatible services
	OPENAI_BASE_URL                       string
	OPENAI_MAX_RETRIES                    int
	OPENAI_API_KEY                        string
	OPENROUTER_API_KEY                    string
	OPENAI_API_COMPATIBLE_SERVICE_API_KEY string

	// Ollama
	OLLAMA_HOST string

	// Docling
	DOCLING_BASE_URL string

	// Mistral
	MISTRAL_API_KEY string

	// Gemini
	GEMINI_API_KEY string
}

func GetEnvConfig added in v0.2.2

func GetEnvConfig(envFilePath string) *EnvConfig

type GlobalSubCommandFlags added in v0.2.1

type GlobalSubCommandFlags struct {
	OutputDestination string
	InputDir          string
	InputFiles        []string
	Format            string
}

type Options added in v0.1.6

type Options struct {
	EnableImagePreviewing  bool           `yaml:"EnableImagePreviewing"`
	InlineImagePreview     bool           `yaml:"InlineImagePreview"`
	ImagePreviewBackend    string         `yaml:"ImagePreviewBackend"`
	ColorCorrectionBackend string         `yaml:"ColorCorrectionBackend"`
	OutputFolder           string         `yaml:"OutputFolder"`
	Themes                 []themeWrapper `yaml:"themes"`
	EnvConfig              *EnvConfig
	EnvFilePath            string `yaml:"EnvFilePath"`
}

Jump to

Keyboard shortcuts

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