kaora-1/mermaid-svg-gen
0
Mermaid to SVG App
This application converts Mermaid.js code into high-quality SVG files using a headless browser (Playwright). This ensures that the generated SVG is exactly what you would see in a browser, with proper text rendering compatible with PowerPoint.
Prerequisites
How to Run
- Build the Docker image:
docker build -t mermaid-svg-app .- Run the container:
docker run -p 8000:8000 mermaid-svg-app- Access the application: Open your web browser and go to http://localhost:8000.
Run Locally (without Docker)
If you prefer to run it directly with Python:
- Create a virtual environment:
python -m venv venv
.\venv\Scripts\Activate- Install dependencies:
pip install -r requirements.txt
playwright install chromium- Run the server:
uvicorn main:app --reloadUsage
- Paste your Mermaid code into the text area.
- Click "Generate SVG".
- Save the downloaded
diagram.svg. - Drag and drop the SVG into PowerPoint.
- Right-click the image in PowerPoint and select "Convert to Shape" (optional, for maximum editability), or just keep it as an SVG.
