mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-17 10:22:59 +08:00
feat: cm-cli - export_custom_node_ids
This commit is contained in:
parent
1646c0c627
commit
53d46f83d5
13
cm-cli.py
13
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")
|
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):
|
def show_list(kind, simple=False):
|
||||||
for k, v in custom_node_map.items():
|
for k, v in custom_node_map.items():
|
||||||
node_path = os.path.join(custom_nodes_path, k)
|
|
||||||
|
|
||||||
if v[1]:
|
if v[1]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
node_path = os.path.join(custom_nodes_path, k)
|
||||||
|
|
||||||
states = set()
|
states = set()
|
||||||
if os.path.exists(node_path):
|
if os.path.exists(node_path):
|
||||||
prefix = '[ ENABLED ] '
|
prefix = '[ ENABLED ] '
|
||||||
@ -730,6 +736,9 @@ elif op == 'install-deps':
|
|||||||
elif op == 'clear':
|
elif op == 'clear':
|
||||||
cancel()
|
cancel()
|
||||||
|
|
||||||
|
elif op == 'export-custom-node-ids':
|
||||||
|
export_custom_node_ids()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print(f"\nInvalid command `{op}`")
|
print(f"\nInvalid command `{op}`")
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ sys.path.append(glob_path)
|
|||||||
import cm_global
|
import cm_global
|
||||||
from manager_util import *
|
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 '')
|
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__), '..'))
|
comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user