Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoNewAssets = errors.New("no new assets")
Functions ¶
This section is empty.
Types ¶
type AssetListMode ¶
type AssetListMode int
AssetListMode specifies whether to retrive full asset list or diff only.
const ( FullAssets AssetListMode = iota DiffAssets )
Enum values for AssetListMode.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client communicating with WF API.
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
NewClient creates a new client with the supplied configuration. If the configuration is nil, use DefaultClientConfig.
func (*Client) FetchAssetsFromAPI ¶
FetchAssetsFromAPI fetches metadata from API then download and extract the assets archives.
type ClientConfig ¶
type ClientConfig struct { Version string Mode AssetListMode Workdir string Concurrency int Region ServiceRegion }
ClientConfig is the configuration for the client.
func DefaultClientConfig ¶
func DefaultClientConfig() *ClientConfig
DefaultClientConfig generates a default configuration.
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor parses and extracts WF assets.
func NewExtractor ¶
func NewExtractor(config *ExtractorConfig) (*Extractor, error)
NewExtractor creates a new extractor with the supplied configuration. If the configuration is nil, use DefaultExtractorConfig.
func (*Extractor) ExtractAssets ¶
ExtractAssets extracts assets from downloaded files.
type ExtractorConfig ¶
type ExtractorConfig struct { SrcPath string DestPath string PathList string NoDefaultPaths bool Concurrency int Indent int FlattenCSV bool Eliyabot bool }
ExtractorConfig is the configuration for the extractor.
func DefaultExtractorConfig ¶
func DefaultExtractorConfig() *ExtractorConfig
DefaultExtractorConfig generates a default configuration.
type ServiceRegion ¶ added in v0.7.0
type ServiceRegion int
const ( RegionJP ServiceRegion = iota RegionGL RegionKR RegionCN )
Enum values for ServiceRegion.
type Spriter ¶ added in v0.9.0
type Spriter struct {
// contains filtered or unexported fields
}
Spriter extracts and crops WF sprites.
func NewSpriter ¶ added in v0.9.0
func NewSpriter(config *SpriterConfig) (*Spriter, error)
NewSpriter creates a new spriter with the supplied configuration. If the configuration is nil, use DefaultSpriterConfig.
func (*Spriter) ExtractSprite ¶ added in v0.9.0
ExtractSprite extracts and processes sprite assets.
type SpriterConfig ¶ added in v0.9.0
type SpriterConfig struct { SrcPath string DestPath string SpritePath string Scale float32 Concurrency int Eliyabot bool }
SpriterConfig is the configuration for the spriter.
func DefaultSpriterConfig ¶ added in v0.9.0
func DefaultSpriterConfig() *SpriterConfig
DefaultSpriterConfig generates a default configuration.