From 35b9852487cabdb117905f42a7e0ab772bbf775e Mon Sep 17 00:00:00 2001 From: JoYo <> Date: Fri, 7 Jun 2024 02:15:14 -0400 Subject: [PATCH] print live addon stats --- banana.go | 51 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/banana.go b/banana.go index 24ca7ca..0d62512 100644 --- a/banana.go +++ b/banana.go @@ -71,20 +71,36 @@ func main() { eso_ui_list = append(eso_ui_list, eso_ui) } + var eso_live_list []EsoAddon + for _, eso_live_name := range eso_live_addon_names { + eso_live, error := eso_live_stat_init(eso_live_name) + if error != nil { + panic(error) + } + matching := "" for _, eso_ui := range eso_ui_list { - if strings.Contains(eso_live_name, eso_ui.addon_name) { + if strings.Contains(eso_live_name, eso_ui.name) { matching = eso_live_name } } if matching == "" { - addon_path := filepath.Join(args.Out_dir, "AddOns", eso_live_name) - fmt.Println("Removing inactive addon", addon_path) - // TODO os.RemoveAll(addon_path) + fmt.Println("Removing inactive addon", eso_live.path) + // TODO os.RemoveAll(eso_live.path) + continue } + + eso_live_list = append(eso_live_list, eso_live) + } + + for _, eso_live := range eso_live_list { + fmt.Printf("Live \"%s\" %s\n", eso_live.path, eso_live.version) + } + for _, eso_ui := range eso_ui_list { + fmt.Printf("EsoUI \"%s\" %s\n", eso_ui.path, eso_ui.version) } } @@ -102,7 +118,7 @@ https://www.esoui.com/downloads/info1146-LibCustomMenu.html var ( ESOUI_NAME = regexp.MustCompile(`(?:https://www.esoui.com/downloads/info[0-9]+\-)([A-Za-z]+)(?:\.html)`) ESOUI_VERSION = regexp.MustCompile(`(?: