Initial Enviral Design utility node pack

This commit is contained in:
LUCAS M MORGAN
2026-04-22 20:26:28 -05:00
commit 540893fc4c
6 changed files with 181 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
# These are supported funding model platforms
github: EnviralDesign
patreon: EnviralDesign
custom: https://www.paypal.com/donate?hosted_button_id=RP8EJAHSDTZ86
+21
View File
@@ -0,0 +1,21 @@
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
jobs:
publish-node:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
+43
View File
@@ -0,0 +1,43 @@
# comfyUI-enviral-design-node-pack
Small, dependency-light ComfyUI utility nodes from Enviral Design.
The goal of this pack is to keep genuinely useful glue nodes in one place
without pulling in a large third-party custom-node bundle just to get one tiny
piece of functionality.
## Included
### `Text Split (Delimiter)`
Splits an input string using a delimiter and returns:
- `part_1` through `part_8`
- `remainder`
- `count`
Behavior:
- `output_count` controls how many leading parts are emitted before overflow is
collected into `remainder`
- `strip_parts` trims whitespace around each part
- `skip_empty` removes empty parts after splitting
This node intentionally uses a fixed socket layout instead of dynamic outputs so
saved workflows stay predictable and easy to debug.
## Install
Clone this repo into `ComfyUI/custom_nodes` and restart ComfyUI.
```text
ComfyUI/custom_nodes/comfyUI-enviral-design-node-pack
```
## Donations & Support
If this saves you time, you can support the work here:
- [Patreon](https://www.patreon.com/EnviralDesign)
- [GitHub Sponsors](https://github.com/sponsors/EnviralDesign)
- [PayPal](https://www.paypal.com/donate?hosted_button_id=RP8EJAHSDTZ86)
+3
View File
@@ -0,0 +1,3 @@
from .text_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
+24
View File
@@ -0,0 +1,24 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "enviral-design-node-pack"
version = "0.1.0"
description = "Small, dependency-light ComfyUI utility nodes from Enviral Design."
readme = "README.md"
requires-python = ">=3.10"
dependencies = []
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
[project.urls]
Repository = "https://github.com/EnviralDesign/comfyUI-enviral-design-node-pack"
Documentation = "https://github.com/EnviralDesign/comfyUI-enviral-design-node-pack#readme"
Issues = "https://github.com/EnviralDesign/comfyUI-enviral-design-node-pack/issues"
[tool.comfy]
PublisherId = "enviral-design"
DisplayName = "Enviral Design Node Pack"
+85
View File
@@ -0,0 +1,85 @@
class TextSplitByDelimiter:
MAX_OUTPUTS = 8
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"text": ("STRING", {
"multiline": True,
"default": "",
"tooltip": "Input text to split."
}),
"delimiter": ("STRING", {
"default": ",",
"tooltip": "Delimiter used to split the input text."
}),
"output_count": ("INT", {
"default": 4,
"min": 1,
"max": cls.MAX_OUTPUTS,
"step": 1,
"tooltip": "How many leading parts to expose before the remainder bucket."
}),
"strip_parts": ("BOOLEAN", {
"default": True,
"tooltip": "Trim whitespace around each split part."
}),
"skip_empty": ("BOOLEAN", {
"default": True,
"tooltip": "Drop empty parts after splitting."
}),
}
}
RETURN_TYPES = ("STRING",) * MAX_OUTPUTS + ("STRING", "INT")
RETURN_NAMES = (
"part_1",
"part_2",
"part_3",
"part_4",
"part_5",
"part_6",
"part_7",
"part_8",
"remainder",
"count",
)
FUNCTION = "split_text"
CATEGORY = "EnviralDesign/text"
def split_text(self, text, delimiter, output_count, strip_parts, skip_empty):
if delimiter == "":
parts = [text]
join_delimiter = ""
else:
parts = text.split(delimiter)
join_delimiter = delimiter
if strip_parts:
parts = [part.strip() for part in parts]
if skip_empty:
parts = [part for part in parts if part != ""]
count = len(parts)
output_count = max(1, min(int(output_count), self.MAX_OUTPUTS))
visible_parts = list(parts[:output_count])
remainder_parts = parts[output_count:]
while len(visible_parts) < self.MAX_OUTPUTS:
visible_parts.append("")
remainder = join_delimiter.join(remainder_parts) if remainder_parts else ""
return (*visible_parts, remainder, count)
NODE_CLASS_MAPPINGS = {
"EnviralTextSplitByDelimiter": TextSplitByDelimiter,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"EnviralTextSplitByDelimiter": "Text Split (Delimiter)",
}