Created
August 8, 2023 06:13
-
-
Save kodaka/868f952df24a318228f85d01bb81fe39 to your computer and use it in GitHub Desktop.
mermaid to the ocean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -Ceu | |
cd "$(dirname "$0")" | |
# setup | |
IN_FILE="$1" | |
OUT_DIRNAME="export_mermaid" | |
mkdir -p "$OUT_DIRNAME" | |
# mermaid-cli | |
docker run --rm -v "$(pwd)":/data minlag/mermaid-cli -i "/data/${IN_FILE}" -o "/data/${OUT_DIRNAME}/mermaid.png" | |
# oxipng | |
cd "$OUT_DIRNAME" | |
oxipng --opt 3 --interlace 0 --strip safe mermaid-*.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment