From 2a52c0a29576c7cc8e9f80b5c70580a55ad719e3 Mon Sep 17 00:00:00 2001 From: Odboy Date: Thu, 26 Dec 2024 21:05:14 +0800 Subject: [PATCH] upd --- main.go | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/main.go b/main.go index 962b4f3..6af2884 100644 --- a/main.go +++ b/main.go @@ -2,33 +2,31 @@ package main import ( "OdMediaPicker/core" + "OdMediaPicker/vars" _ "embed" "fmt" _ "image/gif" // 导入gif支持 _ "image/jpeg" // 导入jpeg支持 _ "image/png" // 导入png支持 + "os" "time" ) func main() { - rootDir := "E:\\DGD\\待整理\\hent_pic" - //rootDir, err := os.Getwd() - //if err != nil { - // fmt.Println("=== 获取当前路径异常", err) - // return - //} + rootDir, err := os.Getwd() + if err != nil { + fmt.Println("=== 获取当前路径异常", err) + return + } scanner := core.FileScanner{} - //scanner.DoScan(rootDir) - //scanner.DoFilter() + scanner.DoScan(rootDir) + scanner.DoFilter() // 整理图片并分组 - //if len(vars.GlobalImagePathList) > 0 { - // core.DoHandleImage(rootDir) - //} + if len(vars.GlobalImagePathList) > 0 { + core.DoHandleImage(rootDir) + } // 挑选文件数大于N的文件夹并转移 scanner.DoPickerDir(rootDir, 10) - //if len(vars.GlobalVideoPathList) > 0 { - // core.DoHandleVideo(rootDir) - //} fmt.Println("=== 3s后自动退出") time.Sleep(time.Second * 3) }