mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-09 07:27:02 +08:00
37 lines
971 B
Python
37 lines
971 B
Python
"""
|
|
Social Toolkit Module for Red Ribbon
|
|
"""
|
|
|
|
class SocialToolkitNode:
|
|
"""Node for social media integration tools"""
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {
|
|
"required": {
|
|
"text": ("STRING", {"multiline": True}),
|
|
"platform": (["twitter", "instagram", "facebook"], {"default": "twitter"}),
|
|
},
|
|
}
|
|
|
|
RETURN_TYPES = ("STRING",)
|
|
FUNCTION = "process"
|
|
CATEGORY = "Red Ribbon/Social"
|
|
|
|
def process(self, text, platform):
|
|
# Process the text for social media
|
|
return (f"[{platform.upper()}]: {text}",)
|
|
|
|
# Dictionary of nodes to be imported by main.py
|
|
NODE_CLASS_MAPPINGS = {
|
|
"SocialToolkitNode": SocialToolkitNode
|
|
}
|
|
|
|
# Add display names for the nodes
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"SocialToolkitNode": "Social Media Toolkit"
|
|
}
|
|
|
|
# Function to be called from main.py
|
|
def socialtoolkit():
|
|
return NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS |