addons

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MARKER = ".wow_addon_cli"

Variables

View Source
var CLIENT_SUFFIXES = []string{
	"_Wrath",
	"_TBC",
	"_Vanilla",
	"_Mainline",
	"_Cata",
	"-WOTLKC",
	"-BCC",
	"-Classic",
}
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 {
	// config strings
	Git  string
	Zip  string
	Url  string
	Name string

	// hydrated later
	UniqueName string
}

func (AddonEntry) CloneSubdirName added in v1.2.0

func (entry AddonEntry) CloneSubdirName() 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) DestZip

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

func (Conf) DownloadUniqueDir added in v1.2.0

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

A unique download path subdir to put artifacts in

type TOCFile added in v1.2.0

type TOCFile struct {
	Path        string
	Dir         string
	Basename    string
	DirBasename string
	Depth       int
}

func BuildTOCFromFile added in v1.2.0

func BuildTOCFromFile(path string) (*TOCFile, error)

func (TOCFile) AddonNameNoClientSuffix added in v1.2.0

func (toc TOCFile) AddonNameNoClientSuffix() string

NameNoClientSuffix returns the toc addon name with the extension removed and the client suffix trimmed

type TOCFileGroup added in v1.2.0

type TOCFileGroup struct {
	TOCFiles []TOCFile
}

func GroupTOCFiles added in v1.2.0

func GroupTOCFiles(tocs []TOCFile) ([]TOCFileGroup, error)

GroupTOCFiles takes toc file structs and collects them into lists based on their common matching dirs

func (TOCFileGroup) AddonName added in v1.2.0

func (grp TOCFileGroup) AddonName() (string, error)

func (TOCFileGroup) Dir added in v1.2.0

func (grp TOCFileGroup) Dir() (string, error)

type UnpackCandidate

type UnpackCandidate struct {
	TOCFilePath    string
	TOCFilePathDir string
	Depth          int
	Title          string
}

Jump to

Keyboard shortcuts

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