addons

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

Variables

View Source
var DefaultSkipCleanPrefixes = []string{
	"Blizzard_",
}

Functions

func CleanDownload

func CleanDownload(conf Conf, cleanupPaths []string) error

func Execute

func Execute(conf Conf) error

func FetchEntry

func FetchEntry(conf Conf, entry AddonEntry) ([]string, error)

func RemoveNonBlizDirs

func RemoveNonBlizDirs(conf Conf) error

func UnpackEntry

func UnpackEntry(conf Conf, entry AddonEntry) error

Types

type AddonEntry

type AddonEntry struct {
	Git        string
	Zip        string
	UniqueName string

	// these will be unpacked later
	UnpackMap  map[string]string
	UnpackList []string
}

func (*AddonEntry) Hydrate

func (entry *AddonEntry) Hydrate() error

type Conf

type Conf struct {
	DownloadPath      string
	BackupPath        string
	AddonsPath        string
	PrecleanBliz      bool
	SkipCleanPrefixes []string
	Addons            []AddonEntry `toml:"addons"`
}

func (Conf) DestDir

func (c Conf) DestDir(entry AddonEntry) (string, error)

Where to clone a git repo. Also the final directory of the decompressed archive

func (Conf) DestZip

func (c Conf) DestZip(entry AddonEntry) (string, error)

type UnpackCandidate

type UnpackCandidate struct {
	TOCFilePath string
	SrcPath     string
	DstPath     string
	Title       string
}

Jump to

Keyboard shortcuts

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