From 2681c613477d66a76c8a0062b10e14b4f93d29f5 Mon Sep 17 00:00:00 2001 From: brayevalerien Date: Fri, 25 Jul 2025 12:53:52 +0200 Subject: [PATCH] first commit --- .github/workflows/publish.yml | 26 ++++++++++++++++++++++++++ __init__.py | 5 +++++ pyproject.toml | 14 ++++++++++++++ splitstring.py | 14 ++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 __init__.py create mode 100644 pyproject.toml create mode 100644 splitstring.py diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..71a7e4d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Publish to Comfy registry +on: + workflow_dispatch: + push: + branches: + - main + - master + paths: + - "pyproject.toml" + +permissions: + issues: write + +jobs: + publish-node: + name: Publish Custom Node to registry + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'brayevalerien' }} + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Publish Custom Node + uses: Comfy-Org/publish-node-action@v1 + with: + ## Add your own personal access token to your Github Repository secrets and reference it here. + personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} \ No newline at end of file diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..546bf70 --- /dev/null +++ b/__init__.py @@ -0,0 +1,5 @@ +from .splitstring import SplitString + +NODE_CLASS_MAPPINGS = { + "Split String": SplitString, +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4763fc7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[project] +name = "comfyui-splitstring" +description = "Very specific node for spliting a string with 12 lines into 12 individual strings.k" +version = "1.0.0" +license = {file = "LICENSE"} + +[project.urls] +Repository = "https://github.com/brayevalerien/ComfyUI-SplitString" +# Used by Comfy Registry https://comfyregistry.org + +[tool.comfy] +PublisherId = "val" +DisplayName = "ComfyUI-splitstring" +Icon = "" \ No newline at end of file diff --git a/splitstring.py b/splitstring.py new file mode 100644 index 0000000..ff19711 --- /dev/null +++ b/splitstring.py @@ -0,0 +1,14 @@ +class SplitString: + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "string": ("STRING",), + } + } + + RETURN_TYPES = ("STRING",) * 12 + FUNCTION = "split_string" + + def split_string(self, string: str): + return (*string.split("\n\n")[:12],)