Initial commit

This commit is contained in:
Eugene
2026-07-17 00:31:36 +02:00
commit d38647157e
10 changed files with 508 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
class ConsoleLogNode:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"text": ("STRING", {"forceInput": True}),
"prefix_label": ("STRING", {"default": "LOG TEXT"}),
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("text",)
FUNCTION = "log_text_to_terminal"
CATEGORY = "TextRandomizer/Debug"
def log_text_to_terminal(self, text, prefix_label):
cyan_start, yellow_start, color_reset = "\033[96m", "\033[93m", "\033[0m"
# Check if the incoming data is a batch list or a single string
if isinstance(text, list):
print(
f"\n{cyan_start}[ℹ️ {prefix_label} - BATCH COUNT: {len(text)}]{color_reset}"
)
for idx, item in enumerate(text):
print(f'{cyan_start} [{idx + 1}]:{yellow_start} "{item}"{color_reset}')
print("")
else:
# Fallback for standard single string inputs
print(f"\n{cyan_start}[ℹ️ {prefix_label}]{color_reset}")
print(f'{yellow_start}"{text}"{color_reset}\n')
return (text,)