string split from right
This commit is contained in:
+9
-3
@@ -384,7 +384,7 @@ class StringEditNodeOBP:
|
||||
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING")
|
||||
RETURN_NAMES = ("text", "split_1", "split_2", "edited_text", "merged_text")
|
||||
FUNCTION = "edit_text"
|
||||
CATEGORY = "🎤MW/MW-Audio-Tools"
|
||||
CATEGORY = "🎤MW/MW-OneButtonPrompt"
|
||||
OUTPUT_NODE = False
|
||||
|
||||
def edit_text(self, text, split_tag="", paste_edit_text="", form_right=False):
|
||||
@@ -399,8 +399,14 @@ class StringEditNodeOBP:
|
||||
parts = text.split(split_tag, 1)
|
||||
str_2, str_3 = parts[0].strip(), parts[1].strip()
|
||||
|
||||
return (str_1, str_2, str_3, str_4, str_5)
|
||||
|
||||
return (str_1, str_2, str_3, str_4, str_5)
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(cls, text, **kwargs):
|
||||
import hashlib
|
||||
m = hashlib.sha256()
|
||||
m.update(text.encode('utf-8'))
|
||||
return m.digest().hex()
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"LoadPrompt": LoadPrompt,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "onebuttonprompt-mw"
|
||||
description = "A node that assists in one click generation of prompts (for image and video generation, etc.) in Comfyui."
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
license = {file = "LICENSE"}
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user