Skip to content

Commit

Permalink
add the diagram-rendering bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
metazool committed Aug 28, 2024
1 parent 9a68ea4 commit b54f5a5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/render_diagrams.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# Copilot generated script to render diagrams as SVG

# Set the directory path
DIR="team/governance/diagrams/"
SITE="_site/"


# Loop through each dot file in the subdirectory
for dotfile in "$DIR"*.dot; do
# Get the base name without extension
base_name=$(basename "$dotfile" .dot)
dir_path="_site/${DIR}"
mkdir -p $dir_path
output="$dir_path$base_name.svg"

# Render the dot file to SVG
dot -Tsvg "$dotfile" -o $output

# Print a success message
echo "Rendered $dotfile to $output"
done



0 comments on commit b54f5a5

Please sign in to comment.