app

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFormat = ConfigTemplate{
	Extractors: map[string]ConfigTemplateExtractor{
		"wwise_stream": {
			Category: "audio",
			Options: map[string]ConfigTemplateOption{
				"format": {
					PossibleValues: []string{"ogg", "wav", "aac", "mp3", "source"},
				},
			},
		},
		"wwise_bank": {
			Category: "audio",
			Options: map[string]ConfigTemplateOption{
				"format": {
					PossibleValues: []string{"ogg", "wav", "aac", "mp3", "source"},
				},
			},
		},
		"bik": {
			Category: "video",
			Options: map[string]ConfigTemplateOption{
				"format": {
					PossibleValues: []string{"mp4", "source"},
				},
			},
		},
		"texture": {
			Category: "image",
			Options: map[string]ConfigTemplateOption{
				"format": {
					PossibleValues: []string{"png", "source"},
				},
			},
		},
		"unit": {
			Category: "model",
			Options: map[string]ConfigTemplateOption{
				"format": {
					PossibleValues: []string{"glb", "source"},
				},
			},
		},
		"raw": {
			Category: "",
			Options: map[string]ConfigTemplateOption{
				"format": {
					PossibleValues: []string{"source"},
				},
			},
			DefaultDisabled: true,
		},
	},
	Fallback: "raw",
}

Functions

func ExtractorConfigHelpMessage

func ExtractorConfigHelpMessage(template ConfigTemplate) string

func ParseExtractorConfig

func ParseExtractorConfig(template ConfigTemplate, cfgStr string) (map[string]extractor.Config, error)

Types

type App

type App struct {
	Hashes map[stingray.Hash]string
	// contains filtered or unexported fields
}

func New

func New(printer *Printer) (*App, error)

func (*App) AddHashFromString added in v0.2.1

func (a *App) AddHashFromString(str string)

func (*App) AddHashesFromFile

func (a *App) AddHashesFromFile(path string) error

func (*App) AddHashesFromString

func (a *App) AddHashesFromString(str string)

func (*App) DetectGameDir

func (a *App) DetectGameDir() (string, error)

func (*App) ExtractFile

func (a *App) ExtractFile(id stingray.FileID, outDir string, extrCfg map[string]extractor.Config, runner *exec.Runner) error

func (*App) File

func (a *App) File(id stingray.FileID) (f *stingray.File, exists bool)

func (*App) MatchingFiles

func (a *App) MatchingFiles(includeGlob, excludeGlob string, cfgTemplate ConfigTemplate, cfg map[string]extractor.Config) (map[stingray.FileID]*stingray.File, error)

func (*App) OpenGameDir

func (a *App) OpenGameDir() error

func (*App) SetGameDir

func (a *App) SetGameDir(path string) error

type ConfigTemplate

type ConfigTemplate struct {
	Extractors map[string]ConfigTemplateExtractor
	Fallback   string
}

type ConfigTemplateExtractor

type ConfigTemplateExtractor struct {
	Category        string
	Options         map[string]ConfigTemplateOption
	DefaultDisabled bool
}

type ConfigTemplateOption

type ConfigTemplateOption struct {
	PossibleValues []string
}

type Printer

type Printer struct {
	// contains filtered or unexported fields
}

func NewPrinter

func NewPrinter(colorOutput bool, stdout io.Writer, stderr io.Writer) *Printer

func (*Printer) Errorf

func (p *Printer) Errorf(f string, a ...any)

func (*Printer) Fatalf

func (p *Printer) Fatalf(f string, a ...any)

func (*Printer) Infof

func (p *Printer) Infof(f string, a ...any)

func (*Printer) NoStatus

func (p *Printer) NoStatus()

func (*Printer) Statusf

func (p *Printer) Statusf(f string, a ...any)

func (*Printer) Warnf

func (p *Printer) Warnf(f string, a ...any)

Jump to

Keyboard shortcuts

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