CLI tool to animate data-flow arrows in SVG diagrams and export a GIF.
Project description
Animate Diagram
CLI tool to animate data-flow arrows in SVG diagrams and export a GIF. This project was created by Codex.
Notes:
- Works with Excalidraw diagrams today.
- Other SVG sources are not fully tested but may work.
How It Works
The tool detects arrow groups in the SVG (as Excalidraw exports them), infers the arrow direction, and applies a dashed stroke animation only to the arrow bodies. Each frame is rendered to PNG and then assembled into an animated GIF.
Before (source SVG):
After (animated GIF):
Build and Run
Requires Python 3.9+.
- Install dependencies:
pip install -e .
- Install Chromium for the default renderer:
playwright install chromium
- Run the CLI:
python -m animate_diagram path/to/diagram.svg output.gif
Or via the console script:
animate-diagram path/to/diagram.svg output.gif
Useful flags:
animate-diagram input.svg output.gif --frames 12 --dash-length 6 --gap-length 6 --step 2 --duration 80
Renderer selection (default is Chromium for better font fidelity):
animate-diagram input.svg output.gif --renderer chromium
animate-diagram input.svg output.gif --renderer cairosvg
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file animate_diagram-0.1.0.tar.gz.
File metadata
- Download URL: animate_diagram-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa487b402771a4084c582fc8fc1b548f96f99874b87be5a602e2c5463a4efed3
|
|
| MD5 |
cf6e001c5b3f15d7f42e29fa0dc989d9
|
|
| BLAKE2b-256 |
4066885350f5228fd83bd1cb982661c8d6a38e1d4187ee71aac2e4e606dee2bc
|
File details
Details for the file animate_diagram-0.1.0-py3-none-any.whl.
File metadata
- Download URL: animate_diagram-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
212322acdb2ad2f1b0efd21b785b8002c43e27e7e1e3f60b592c00be904d9458
|
|
| MD5 |
308fb1d4abbf8e2eba6758324bd14534
|
|
| BLAKE2b-256 |
b976c767ec6acdac6ced04bc553a8003c8f8741efc1bfa389e5842a7d6f60dbc
|