Documentation ¶
Overview ¶
Package updateloop provide functionalities to keep the local assets up-to-date.
The operation "update" contains 3 sub-operations, and the subject of update can be either PictureArt module or Story module.
Pull. It pulls the assets from the remote API, either the HyperGryph API or the ArknightsGameData GitHub repository API. It also unpacks or decompresses the assets from the downloaded files, therefore, whether the assets are pulled from either API, the result directory structure will turn out the same.
Preprocess. It converts the pulled assets to the form which the submitter of the "submit" sub-operation can recognize. Moreover, it does some image preprocessing such as merge the alpha channel and merge the different faces onto the body for characters (合并差分).
Submit. It parses the preprocessed assets and submits them to the art service and the story service.
After the above sub-operations, all intermediate files shall be deleted to preserve the disk space.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶ added in v0.10.0
type Service struct {
// contains filtered or unexported fields
}
Service provides all functionalities of update.
func (*Service) AttemptUpdate ¶ added in v0.10.0
AttemptUpdate attempts to update the resources.