|
|
|
|
|
|
|
import os |
|
import json |
|
|
|
|
|
|
|
if not os.path.isfile(os.path.join(os.path.dirname(os.path.realpath(__file__)),"config.json")): |
|
|
|
config = { |
|
"autoUpdate": True, |
|
"branch": "main", |
|
"openAI_API_Key": "sk-#########################################" |
|
} |
|
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)),"config.json"), "w") as f: |
|
json.dump(config, f, indent=4) |
|
|
|
|
|
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)),"config.json"), "r") as f: |
|
config = json.load(f) |
|
|
|
|
|
if "autoUpdate" not in config: |
|
config["autoUpdate"] = False |
|
|
|
|
|
if "version" not in config: |
|
config["branch"] = "main" |
|
|
|
|
|
if config["autoUpdate"] == True: |
|
try: |
|
from .update import update as update |
|
currentPath = os.path.dirname(os.path.realpath(__file__)) |
|
|
|
update.update(currentPath,branch_name=config["branch"]) |
|
except ImportError: |
|
print("Failed to auto update `Quality of Life Suit` ") |
|
|
|
|
|
|
|
from .src.QualityOfLifeSuit_Omar92 import NODE_CLASS_MAPPINGS as NODE_CLASS_MAPPINGS_SUIT |
|
try: |
|
from .src.QualityOfLife_deprecatedNodes import NODE_CLASS_MAPPINGS as NODE_CLASS_MAPPINGS_DEPRECATED |
|
except ImportError: |
|
NODE_CLASS_MAPPINGS_DEPRECATED = {} |
|
|
|
|
|
__all__ = ['NODE_CLASS_MAPPINGS_SUIT', 'NODE_CLASS_MAPPINGS_DEPRECATED', 'NODE_CLASS_MAPPINGS'] |
|
NODE_CLASS_MAPPINGS = { |
|
**NODE_CLASS_MAPPINGS_SUIT, |
|
**NODE_CLASS_MAPPINGS_DEPRECATED |
|
} |