#!/bin/bash # Script to convert piped mermaid text to a mermaid.live URL # Usage: cat mermaid.md | ./mermaid-to-url.sh # or: echo "graph TD; A-->B" | ./mermaid-to-url.sh # This script delegates to the Python version for proper compression # Get the directory where this script is located SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Call the Python script python3 "$SCRIPT_DIR/mermaid-to-url.py"