app

package
v0.0.0-...-e3d587c Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP_VERSION = 1.0

	// TASK_TYPE_PIC TASK_TYPE_VID 任务类型(图片,视频)
	TASK_TYPE_PIC = iota
	TASK_TYPE_VID
)
View Source
const (
	// AI引擎 7个
	Realesrgan_x4plus = iota
	Realesrgan_x4plus_anime
	Realesrnet_x4plus
	RealESRGANv2_animevideo_xsx2
	RealESRGANv2_animevideo_xsx4
	RealESRGANv2_anime_xsx2
	RealESRGANv2_anime_xsx4
)

Variables

This section is empty.

Functions

func GetFileFromDir

func GetFileFromDir(p string, t string) (n []string, err error)

GetFileFromDir 通过文件扩展名筛选需要的文件

func GetTypeInfo

func GetTypeInfo(t int) (tfn []string, tname string)

Types

type App

type App struct {
	Tasklist []Task
}

func NewApp

func NewApp() *App

func (*App) AddTasks

func (AppM *App) AddTasks(task ...Task)

func (*App) ReadTaskFormDir

func (AppM *App) ReadTaskFormDir(t int)

ReadTaskFormDir 文件

func (*App) ReadTaskFormFiles

func (AppM *App) ReadTaskFormFiles(t int)

ReadTaskFormFiles ss

type Task

type Task struct {
	Inpath   string `json:"Inpath"`
	Outpath  string `json:"Outpath"`
	Scale    int    `json:"Scale"`
	Model    int    `json:"Model"`
	Uid      string `json:"Uid"`
	TaskType int    `json:"TaskType"`
	Name     string `json:"Name"`
}

func NewTask

func NewTask(p string, tType int) *Task

func NewTasks

func NewTasks(path []string, tType int) (tl []Task)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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