Problem
You have many C4 PlantUML diagrams in nested folders that you would like to render without having to run the PlantUML cli on each one.
Solution
- Ensure that your prerequisites are met
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
find . -type f -iname "*.puml" -exec echo "Generating plantuml diagram for {}" \; -exec plantuml {} \; |
- The output will look like the below
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
┌─[user@laptop] – [~/my-project] – [Fri Feb 16, 16:58] | |
└─[$] <git:(feature-branch)> find . -type f -iname "*.puml" -exec echo "Generating plantuml diagram for {}" \; -exec plantuml {} \; | |
Generating plantuml diagram for ./project1/footer.puml | |
Generating plantuml diagram for ./project1/1 Context.puml | |
Generating plantuml diagram for ./project1/header.puml | |
Generating plantuml diagram for ./project1/2 Container.puml | |
Generating plantuml diagram for ./project2/footer.puml | |
Generating plantuml diagram for ./project2/1 Context.puml | |
Generating plantuml diagram for ./project2/header.puml | |
Generating plantuml diagram for ./project3/network.puml | |
Generating plantuml diagram for ./project4/1 Context.puml | |
Generating plantuml diagram for ./project4/2 Container.puml | |
Generating plantuml diagram for ./project5/Pilot/1 Context.puml | |
Generating plantuml diagram for ./project5/Pilot/2 Network Container.puml | |
Generating plantuml diagram for ./project5/Pilot/2 Container.puml | |
Generating plantuml diagram for ./project5/Pilot/definitions.puml | |
Generating plantuml diagram for ./project6/1 Context.puml | |
Generating plantuml diagram for ./project6/2 Container.puml | |
Generating plantuml diagram for ./project6/definitions.puml | |
find . -type f -iname "*.puml" -exec echo "Generating plantuml diagram for {} | |
Time: 33.93s user | 2.96s system | 112% cpu | 32.708 total | 336528 KiB max RSS |