From 7d76521a0170f0a762f82afcd4bf264b176563c6 Mon Sep 17 00:00:00 2001 From: AlekPet Date: Thu, 7 May 2026 12:27:00 +0300 Subject: [PATCH] update IDENode + Implemented features save, rename, remove file code + Implemented checking save filename and extensions + Update visual style buttons and structure + Other smaller feature + Update version --- .gitignore | 3 +-- IDENode/README.md | 22 +++++++++++++++++++ pyproject.toml | 2 +- .../css/idenode/ide_node_styles.css | 2 +- web_alekpet_nodes/ide_node.js | 2 +- .../javascript/{add.json => add.json.example} | 0 .../python/{add.json => add.json.example} | 0 7 files changed, 26 insertions(+), 5 deletions(-) rename web_alekpet_nodes/lib/idenode/codes/javascript/{add.json => add.json.example} (100%) rename web_alekpet_nodes/lib/idenode/codes/python/{add.json => add.json.example} (100%) diff --git a/.gitignore b/.gitignore index cb6234f..e1c1e73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ __pycache__ settings_nodes/ -web_alekpet_nodes/lib/idenode/**/*.json -!web_alekpet_nodes/lib/idenode/**/add.json \ No newline at end of file +web_alekpet_nodes/lib/idenode/**/*.json \ No newline at end of file diff --git a/IDENode/README.md b/IDENode/README.md index 16a26e7..0b5328b 100644 --- a/IDENode/README.md +++ b/IDENode/README.md @@ -44,3 +44,25 @@ Workflow link: [Workflow ai_translate_opus-mt_idenode_workflow.json](https://git **Updated version IDENode load code** ![Screenshot IDE Node Load Code](https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/raw/master/IDENode/IDENode_load_code.png) + +**Note:** There are two folders `python` and `javascipt` along the path `..\custom_nodes\ComfyUI_Custom_Nodes_AlekPet\web_alekpet_nodes\lib\idenode\codes` where the json files with the codes are saved. There are also test files `add.json.example` (remove `.example` for them to work). + +**Format JSON codes:** + +```json +{ + "language": "python", + "inputs": [ + { "name": "a", "type": "*" }, + { "name": "b", "type": "*" } + ], + "outputs": [{ "name": "result", "type": "*" }], + "code": "result = a + b" +} +``` + +**Properties:** +_language_ - python or javascript +_inputs_ - inputs (name and type) +_outputs_ - outputs (name and type) +_code_ - the code itself diff --git a/pyproject.toml b/pyproject.toml index 8d868c2..10bf2fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui_custom_nodes_alekpet" description = "Nodes: PoseNode, PainterNode, TranslateTextNode, TranslateCLIPTextEncodeNode, DeepTranslatorTextNode, DeepTranslatorCLIPTextEncodeNode, ArgosTranslateTextNode, ArgosTranslateCLIPTextEncodeNode, ChatGLM4TranslateCLIPTextEncodeNode, ChatGLM4TranslateTextNode, ChatGLM4InstructNode, ChatGLM4InstructMediaNode, ChatGLMImageGenerateNode, ChatGLMVideoGenerateNode, PreviewTextNode, HexToHueNode, ColorsCorrectNode, IDENode." -version = "1.1.5" +version = "1.1.6" license = { file = "LICENSE" } [project.urls] diff --git a/web_alekpet_nodes/css/idenode/ide_node_styles.css b/web_alekpet_nodes/css/idenode/ide_node_styles.css index aec1239..eb9949c 100644 --- a/web_alekpet_nodes/css/idenode/ide_node_styles.css +++ b/web_alekpet_nodes/css/idenode/ide_node_styles.css @@ -1,6 +1,6 @@ .ide_node_controls { padding: 0; - margin: -4px 0; + margin: 0; display: grid; gap: 10px; grid-template-areas: diff --git a/web_alekpet_nodes/ide_node.js b/web_alekpet_nodes/ide_node.js index 4aaf7d7..561c44a 100644 --- a/web_alekpet_nodes/ide_node.js +++ b/web_alekpet_nodes/ide_node.js @@ -197,7 +197,7 @@ app.registerExtension({ PYCODE: async (node, inputName, inputData, app) => { // Wrapper and codeElement const codeElementWrapper = makeElement("div", { - style: { height: "100%", marginTop: "-15px" }, + style: { height: "100%", margin: "-10px 0 10px 0" }, }); const codeElement = makeElement("pre", { diff --git a/web_alekpet_nodes/lib/idenode/codes/javascript/add.json b/web_alekpet_nodes/lib/idenode/codes/javascript/add.json.example similarity index 100% rename from web_alekpet_nodes/lib/idenode/codes/javascript/add.json rename to web_alekpet_nodes/lib/idenode/codes/javascript/add.json.example diff --git a/web_alekpet_nodes/lib/idenode/codes/python/add.json b/web_alekpet_nodes/lib/idenode/codes/python/add.json.example similarity index 100% rename from web_alekpet_nodes/lib/idenode/codes/python/add.json rename to web_alekpet_nodes/lib/idenode/codes/python/add.json.example