common

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version     = "v0.9.5"
	ReadingBook *book.Book
	Srv         *http.Server
	Config      = settings.ServerConfig{
		Port:                  1234,
		Host:                  "DefaultHost",
		StoresPath:            []string{},
		SupportFileType:       []string{".zip", ".tar", ".rar", ".cbr", ".cbz", ".epub", ".tar.gz", ".tgz", ".tar.bz2", ".tbz2", ".tar.xz", ".txz", ".tar.lz4", ".tlz4", ".tar.sz", ".tsz", ".bz2", ".gz", ".lz4", ".sz", ".xz", ".mp4", ".webm", ".pdf", ".m4v", ".flv", ".avi", ".mp3", ".wav", ".wma", ".ogg"},
		SupportMediaType:      []string{".jpg", ".jpeg", ".jpe", ".jpf", ".jfif", ".jfi", ".png", ".gif", ".apng", ".bmp", ".webp", ".ico", ".heic", ".heif", ".avif"},
		ExcludePath:           []string{".comigo", ".idea", ".vscode", ".git", "node_modules", "flutter_ui", "$RECYCLE.BIN", "System Volume Information", ".cache"},
		MaxScanDepth:          4,
		MinImageNum:           3,
		ZipFileTextEncoding:   "",
		OpenBrowser:           true,
		UseCache:              true,
		CachePath:             "",
		ClearCacheExit:        true,
		UploadPath:            "",
		EnableUpload:          true,
		EnableDatabase:        false,
		ClearDatabaseWhenExit: true,
		EnableTLS:             false,
		Username:              "comigo",
		Password:              "",
		DisableLAN:            false,
		DefaultMode:           "scroll",
		LogToFile:             false,
		ConfigSaveTo:          "RAM",
		ConfigFileUsed:        "",
	}
)
View Source
var RamBookList []*book.Book

Functions

func AddBooksToStore added in v0.8.1

func AddBooksToStore(bookList []*book.Book, path string)

AddBooksToStore 添加一组书到书库

func SaveConfig added in v0.9.5

func SaveConfig()

func SaveResultsToDatabase added in v0.9.5

func SaveResultsToDatabase() error

SaveResultsToDatabase 4,保存扫描结果到数据库,并清理不存在的书籍

func ScanAndGetBookList added in v0.7.1

func ScanAndGetBookList(storePath string, reScanFile bool, RamBookList []*book.Book) (newBookList []*book.Book, err error)

ScanAndGetBookList 扫描路径,取得路径里的书籍

func ScanStorePath added in v0.9.5

func ScanStorePath(reScanFile bool) error

ScanStorePath 3、扫描配置文件指定的的书籍库

func SetTempDir

func SetTempDir()

SetTempDir 设置临时文件夹,退出时会被清理

Types

This section is empty.

Jump to

Keyboard shortcuts

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