Skip to content

Commit

Permalink
tweak graph render to output where Jekyll does
Browse files Browse the repository at this point in the history
  • Loading branch information
metazool committed Jul 11, 2024
1 parent 433ed67 commit e6e63df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/diagrams/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ title: Plankton ML - workflow diagrams

# Workflow Diagrams


![From imaging instrument to cloud storage](as_is/instrument_to_store.svg) - as is
![From imaging instrument to cloud storage](could_be/instrument_to_store.svg) - as is

Expand Down
10 changes: 7 additions & 3 deletions scripts/render_diagrams.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@

# Set the directory path
DIR="./docs/diagrams/"
SITE="_site/"

# Loop through each subdirectory
for sub_dir in "$DIR"*/; do
# Loop through each dot file in the subdirectory
for dotfile in "$sub_dir"*.dot; do
# Get the base name without extension
base_name=$(basename "$dotfile" .dot)

dir_path=${sub_dir//docs/docs\/_site}
mkdir -p $dir_path
output="$dir_path$base_name.svg"

# Render the dot file to SVG
dot -Tsvg "$dotfile" -o "$sub_dir$base_name.svg"
dot -Tsvg "$dotfile" -o $output

# Print a success message
echo "Rendered $dotfile to $sub_dir$base_name.svg"
echo "Rendered $dotfile to $output"
done
done

Expand Down

0 comments on commit e6e63df

Please sign in to comment.