Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
convert2mermaid is a Node.js CLI tool that converts diagrams from various formats into Mermaid.js syntax. The tool currently supports Visio (.vsdx) files and is designed to be extensible for other formats like DrawIO and Excalidraw.
Sign in to like and favorite skills
convert2mermaid is a Node.js CLI tool that converts diagrams from various formats into Mermaid.js syntax. The tool currently supports Visio (.vsdx) files and is designed to be extensible for other formats like DrawIO and Excalidraw.
vsdx-js npm package (version 1.1.1) ✅parseData() routes to appropriate parser based on file extensionDiagram interfacegenerateMermaidCode() converts Diagram to Mermaid syntaxinterface Diagram { Shapes: Shape[]; Settings?: string; }
interface Shape { Id: string; ShapeType: string; // Used for Mermaid shape mapping Label: string; Style: Style; IsEdge: boolean; FromNode: string; // For edges/connectors ToNode: string; // For edges/connectors }
interface Style { FillForeground: string; FillBackground: string; TextColor: string; LineWeight: number; LineColor: string; LinePattern: number; Rounding: number; BeginArrow: number; BeginArrowSize: number; EndArrow: number; EndArrowSize: number; LineCap: number; FillPattern: number; }
parseVisioFile, VisioFile, VisioShape types)/src/parser/ directory (e.g., drawioParser.ts)Shape interfaceparseData() switch statement in parser.tssupportedFileTypes array in index.tsShapeType stringsgetMermaidShapeByValue() in flowchartShapes.ts maps shape types to Mermaid syntaxStyle interfacegetStyleStatement() in scribe.ts converts styles to Mermaid CSS/tests/ directorynpm run build node ./dist/index.js -i <inputfile> [-o <outputfile>] [-d flowchart] [-f mmd]