updateloop

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 32 Imported by: 0

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

func FxModule added in v1.0.0

func FxModule() fx.Option

func ParseToGalleries added in v1.6.0

func ParseToGalleries(server ark.Server, root string) ([]gallery.Gallery, error)

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

func (s *Service) AttemptUpdate(ctx context.Context)

AttemptUpdate attempts to update the resources.

func (*Service) Loop added in v1.0.0

func (s *Service) Loop(ctx context.Context)

Jump to

Keyboard shortcuts

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