Documentation ¶
Index ¶
- Variables
- type AssetListMode
- func (z *AssetListMode) DecodeMsg(dc *msgp.Reader) (err error)
- func (z AssetListMode) EncodeMsg(en *msgp.Writer) (err error)
- func (z AssetListMode) MarshalMsg(b []byte) (o []byte, err error)
- func (z AssetListMode) Msgsize() (s int)
- func (z *AssetListMode) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Client
- func (z *Client) DecodeMsg(dc *msgp.Reader) (err error)
- func (z Client) EncodeMsg(en *msgp.Writer) (err error)
- func (client *Client) FetchAssetsFromAPI(fetchComics int) error
- func (z Client) MarshalMsg(b []byte) (o []byte, err error)
- func (z Client) Msgsize() (s int)
- func (z *Client) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ClientConfig
- func (z *ClientConfig) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ClientConfig) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ClientConfig) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ClientConfig) Msgsize() (s int)
- func (z *ClientConfig) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ComicListRequestBody
- func (z *ComicListRequestBody) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ComicListRequestBody) EncodeMsg(en *msgp.Writer) (err error)
- func (z ComicListRequestBody) MarshalMsg(b []byte) (o []byte, err error)
- func (z ComicListRequestBody) Msgsize() (s int)
- func (z *ComicListRequestBody) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ComicMetadata
- func (z *ComicMetadata) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ComicMetadata) EncodeMsg(en *msgp.Writer) (err error)
- func (z ComicMetadata) MarshalMsg(b []byte) (o []byte, err error)
- func (z ComicMetadata) Msgsize() (s int)
- func (z *ComicMetadata) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Extractor
- type ExtractorConfig
- type Hasher
- type ServiceRegion
- func (z *ServiceRegion) DecodeMsg(dc *msgp.Reader) (err error)
- func (z ServiceRegion) EncodeMsg(en *msgp.Writer) (err error)
- func (z ServiceRegion) MarshalMsg(b []byte) (o []byte, err error)
- func (z ServiceRegion) Msgsize() (s int)
- func (z *ServiceRegion) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Spriter
- type SpriterConfig
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.
func (*AssetListMode) DecodeMsg ¶ added in v0.11.0
func (z *AssetListMode) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (AssetListMode) EncodeMsg ¶ added in v0.11.0
func (z AssetListMode) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (AssetListMode) MarshalMsg ¶ added in v0.11.0
func (z AssetListMode) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (AssetListMode) Msgsize ¶ added in v0.11.0
func (z AssetListMode) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*AssetListMode) UnmarshalMsg ¶ added in v0.11.0
func (z *AssetListMode) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
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.
func (Client) MarshalMsg ¶ added in v0.11.0
MarshalMsg implements msgp.Marshaler
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.
func (*ClientConfig) DecodeMsg ¶ added in v0.11.0
func (z *ClientConfig) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ClientConfig) EncodeMsg ¶ added in v0.11.0
func (z *ClientConfig) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ClientConfig) MarshalMsg ¶ added in v0.11.0
func (z *ClientConfig) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ClientConfig) Msgsize ¶ added in v0.11.0
func (z *ClientConfig) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ClientConfig) UnmarshalMsg ¶ added in v0.11.0
func (z *ClientConfig) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ComicListRequestBody ¶ added in v0.11.0
type ComicListRequestBody struct { PageIndex int `msg:"page_index"` Kind int `msg:"kind"` // 0 = char comics, 1 = guide comics ViewerID int `msg:"viewer_id"` }
func (*ComicListRequestBody) DecodeMsg ¶ added in v0.11.0
func (z *ComicListRequestBody) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ComicListRequestBody) EncodeMsg ¶ added in v0.11.0
func (z ComicListRequestBody) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ComicListRequestBody) MarshalMsg ¶ added in v0.11.0
func (z ComicListRequestBody) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ComicListRequestBody) Msgsize ¶ added in v0.11.0
func (z ComicListRequestBody) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ComicListRequestBody) UnmarshalMsg ¶ added in v0.11.0
func (z *ComicListRequestBody) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ComicMetadata ¶ added in v0.11.0
type ComicMetadata struct { Episode int `json:"episode"` Title string `json:"title"` CommenceTime string `json:"commenceTime"` }
func (*ComicMetadata) DecodeMsg ¶ added in v0.11.0
func (z *ComicMetadata) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ComicMetadata) EncodeMsg ¶ added in v0.11.0
func (z ComicMetadata) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ComicMetadata) MarshalMsg ¶ added in v0.11.0
func (z ComicMetadata) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ComicMetadata) Msgsize ¶ added in v0.11.0
func (z ComicMetadata) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ComicMetadata) UnmarshalMsg ¶ added in v0.11.0
func (z *ComicMetadata) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
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 RegionTW )
Enum values for ServiceRegion.
func (*ServiceRegion) DecodeMsg ¶ added in v0.11.0
func (z *ServiceRegion) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ServiceRegion) EncodeMsg ¶ added in v0.11.0
func (z ServiceRegion) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ServiceRegion) MarshalMsg ¶ added in v0.11.0
func (z ServiceRegion) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ServiceRegion) Msgsize ¶ added in v0.11.0
func (z ServiceRegion) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ServiceRegion) UnmarshalMsg ¶ added in v0.11.0
func (z *ServiceRegion) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
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.