Skip to content

Commit

Permalink
simplifier cant process svg, just png
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMTheilig committed Jan 11, 2024
1 parent 3d2d099 commit 69b9547
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/RenderAllDiagrams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,38 +43,38 @@ jobs:
run: |
img_dir=ImplementationGuide/images/diagrams
mkdir -p $img_dir
rm -rf ImplementationGuide/images/diagrams/*.svg
rm -rf ImplementationGuide/images/diagrams/*.png
# Generate the SVGs from PUML
- name: Render PUML to SVG and Move files
# Generate the PNGs from PUML
- name: Render PUML to PNG and Move files
run: |
FileNamePaths=$(find . -path "*/imgsrc/*/*.puml" -exec dirname {} \; | sort -u)
for dir in $FileNamePaths
do
# Render SVGs from PUMLs
find $dir -name "*.puml" -exec java -jar plantuml.jar -tsvg {} \;
# Render PNGs from PUMLs
find $dir -name "*.puml" -exec java -jar plantuml.jar -png {} \;
done
# Generate the SVGs from DrawIO
- name: Render DrawIO to SVG with predefined action
# Generate the PNGs from DrawIO
- name: Render DrawIO to PNG with predefined action
uses: rlespinasse/drawio-export-action@v2
with:
path: ./Material/imgsrc/drawio/
remove-page-suffix: true
output: .
format: svg
format: png
action-mode: all

# copies the created png & svg files to the images/diagrams folder and deletes the drawio files
- name: Move SVGs to target image folder
# copies the created png & png files to the images/diagrams folder and deletes the drawio files
- name: Move PNGs to target image folder
run: |
img_dir=ImplementationGuide/images/diagrams
# Find all unique directories containing *.svg files under any /imgsrc/ folder
FileNamePaths=$(find . -path "*/imgsrc/*/*.svg" -exec dirname {} \; | sort -u)
# Find all unique directories containing *.png files under any /imgsrc/ folder
FileNamePaths=$(find . -path "*/imgsrc/*/*.png" -exec dirname {} \; | sort -u)
for dir in $FileNamePaths
do
# Move SVGs to out directory
find $dir -name "*.svg" -exec mv {} $img_dir \;
# Move PNGs to out directory
find $dir -name "*.png" -exec mv {} $img_dir \;
done
## add and commit the new generated files
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/RenderPlantUML.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sudo apt-get install -y graphviz
wget -O plantuml.jar "https://github.com/plantuml/plantuml/releases/latest/download/plantuml.jar"
- name: Render and Move SVG files
- name: Render and Move PNG files
run: |
# Find all unique directories containing *.puml files under any /imgsrc/ folder
directories=$(find . -path "*/imgsrc/*/*.puml" -exec dirname {} \; | sort -u)
Expand All @@ -32,11 +32,11 @@ jobs:
out_dir=ImplementationGuide/images/diagrams
mkdir -p $out_dir
# Render SVGs from PUMLs
find $dir -name "*.puml" -exec java -jar plantuml.jar -tsvg {} \;
# Render PNGs from PUMLs
find $dir -name "*.puml" -exec java -jar plantuml.jar -tpng {} \;

# Move SVGs to out directory
find $dir -name "*.svg" -exec mv {} $out_dir \;
# Move PNGs to out directory
find $dir -name "*.png" -exec mv {} $out_dir \;
done


Expand All @@ -57,7 +57,7 @@ jobs:
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# git add -A
# git commit -m "Add rendered PlantUML to SVG diagrams" || exit 0
# git commit -m "Add rendered PlantUML to PNG diagrams" || exit 0
# git push

- name: Commit rendered files
Expand Down

0 comments on commit 69b9547

Please sign in to comment.