← 返回
AI智能 中文

RegexVisualizer

Render Regulex-style railroad diagrams for a JavaScript regular expression and export the exact same SVG/PNG as the Regulex-Plus web UI (docs/index.html) "Ex...
为 JavaScript 正则表达式渲染 Regulex 风格的铁路图,并导出与 Regulex-Plus Web UI 完全一致的 SVG/PNG。
pipedream941
AI智能 clawhub v1.0.0 1 版本 99910.3 Key: 无需
★ 2
Stars
📥 1,074
下载
💾 15
安装
1
版本
#latest

概述

Regex Visualizer

Overview

Export the Regulex-Plus web visualizer output to .svg and/or .png in a single command, using the built-in web UI export logic (no re-drawing).

Quick Start

Render both SVG and PNG:

cd "$env:USERPROFILE\.codex\skills\regex-visualizer"
node scripts/render.mjs `
  --re "hello\\s+world" `
  --flags "i" `
  --out "out/hello-world"
cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs \
  --re 'hello\\s+world' \
  --flags 'i' \
  --out 'out/hello-world'

SVG only:

cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs `
  --re "^(a|b)*?$" `
  --out "out/re" `
  --svg-only

PNG only:

cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs `
  --re "^(a|b)*?$" `
  --out "out/re" `
  --png-only

Install Dependencies

This skill uses puppeteer-core (does not bundle Chromium). Install once:

cd ~/.codex/skills/regex-visualizer
npm install

Screenshot

An example export generated using the built-in web UI rendering:

  • assets/example.png
  • assets/example.svg

Behavior

  • Uses assets/regulex.html (a copy of the Regulex-Plus web UI) and loads it with #!cmd=export&flags=...&re=....
  • Waits for the page to produce the exported canvas (canvas.exportCanvas) and then writes:
  • .png from the same canvas as the web UI "Export Image" button
  • .svg from the same element used by the web UI

Notes

  • Flags are limited to what the web UI supports by default: i, m, g.
  • If the regex fails to parse, the script surfaces the same error text shown in the UI.

Resources

scripts/

  • scripts/render.mjs: Headless export to SVG/PNG via the built-in cmd=export mode.

references/

None.

assets/

  • assets/regulex.html: Copy of Regulex-Plus/docs/index.html used for rendering/export.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 16:28 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 839 📥 213,470
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,131
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,062 📥 799,811