Skip to content

Commit

Permalink
[#674] Add script for generating png files from mmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mengdaming committed Sep 11, 2024
1 parent cb96436 commit eb7bf5a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions variants-doc/generate_png.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

echo "Installing mermaid-cli"
npm update -g @mermaid-js/mermaid-cli || echo "Failed to install mermaid-cli. Aborting"

for mmd_file in ./*.mmd; do
png_file="${mmd_file%.mmd}.png"
echo "- Generating ${png_file} from ${mmd_file}"
mmdc --input "${mmd_file}" --output "${png_file}" --theme dark --backgroundColor transparent
done

0 comments on commit eb7bf5a

Please sign in to comment.