From 53d46f83d53473c9a9868fca4f970fd1634aa943 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Mon, 13 May 2024 00:25:54 +0900 Subject: [PATCH] feat: cm-cli - export_custom_node_ids --- cm-cli.py | 13 +++++++++++-- glob/manager_core.py | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cm-cli.py b/cm-cli.py index 17e35d6..981ced9 100644 --- a/cm-cli.py +++ b/cm-cli.py @@ -469,13 +469,19 @@ def disable_node(node_name, is_all=False, cnt_msg=''): print(f"{cnt_msg} [ SKIPPED] {node_name:50} => Not installed") +def export_custom_node_ids(): + with open(sys.argv[2], "w", encoding='utf-8') as output_file: + for x in custom_node_map.keys(): + print(x, file=output_file) + + def show_list(kind, simple=False): for k, v in custom_node_map.items(): - node_path = os.path.join(custom_nodes_path, k) - if v[1]: continue + node_path = os.path.join(custom_nodes_path, k) + states = set() if os.path.exists(node_path): prefix = '[ ENABLED ] ' @@ -730,6 +736,9 @@ elif op == 'install-deps': elif op == 'clear': cancel() +elif op == 'export-custom-node-ids': + export_custom_node_ids() + else: print(f"\nInvalid command `{op}`") diff --git a/glob/manager_core.py b/glob/manager_core.py index ec5688d..57400d8 100644 --- a/glob/manager_core.py +++ b/glob/manager_core.py @@ -23,7 +23,7 @@ sys.path.append(glob_path) import cm_global from manager_util import * -version = [2, 31, 1] +version = [2, 32] version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))