Skip to content

Commit 30af422

Browse files
clean up diagrams
1 parent 2fe6e56 commit 30af422

File tree

70 files changed

+416
-697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+416
-697
lines changed

.acimov/extract_diagrams.sh

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,32 @@
11
#!/bin/bash
2-
# set -x
2+
#set -x
33

44
# requires drawio desktop and libxml2-utils
55
drawio='/mnt/c/Program Files/draw.io/draw.io.exe'
66
in='src/aec3po.drawio'
77
xml=diagrams.xml
8+
extension='png' # png or pdf
9+
output_dir='resources/diagrams/'
810
declare -a filters
911

1012
# Function to display help
1113
usage() {
12-
echo "Usage: $0 input.drawio -f filter1 -f filter2 ..."
13-
echo " input.drawio Specify the input draw.io file (mandatory)"
14-
echo " -f, --filter VALUE Specify one or more filters (optional)"
15-
echo " -h, --help Show this help message"
14+
echo "Usage: $0 [FILTER] [FILTER] ..."
15+
echo " FILTER Specify one or more filters (optional)"
16+
echo " -h, --help Show this help message"
1617
exit 1
1718
}
1819

1920
# Parse arguments
20-
if [[ -z "$1" || "$1" == "-h" || "$1" == "--help" ]]; then
21+
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
2122
usage
2223
fi
2324

24-
in=$1
25-
shift
26-
27-
while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do
28-
case $1 in
29-
-f | --filter ) shift; filters+=($1);;
30-
-h | --help ) usage;;
31-
* ) usage;;
32-
esac
25+
while [[ "$1" != "" ]]; do
26+
filters+=($1)
3327
shift
3428
done
3529

36-
# Validate mandatory argument
37-
if [[ -z "$in" ]]; then
38-
echo "Error: Input file is required."
39-
usage
40-
fi
41-
4230
# Export all tab names from the .drawio file
4331
echo "Extracting tabs" 1>&2
4432
"$drawio" --export --format xml --uncompressed -o $xml $in > /dev/null 2&> /dev/null
@@ -49,19 +37,20 @@ IFS=$'\n'
4937
tabs=($(xmllint --xpath "//diagram/@name" $xml | sed -E 's/ name="([^"]+)"/\1/g')) # an array
5038
rm $xml
5139

40+
mkdir -p $output_dir
5241
for (( i=0; i<${#tabs[@]}; i++ ))
5342
do
5443
tab="${tabs[$i]}"
5544
if [[ ${#filters[@]} -eq 0 ]]; then
5645
echo "Exporting: $tab" 1>&2
57-
"$drawio" -x -f png -s 2 -p $i -o "resources/diagrams/$tab.png" "$in" > /dev/null 2&> /dev/null
46+
"$drawio" -x -f $extension -s 2 -p $i -o "$output_dir$tab.$extension" "$in" > /dev/null 2&> /dev/null
5847
else
5948
exported=false
6049
for filter in "${filters[@]}"; do
6150
if [[ "$exported" = "false" ]]; then
6251
if [[ "${tab,,}" =~ ${filter,,} ]]; then
6352
echo "Exporting: $tab" 1>&2
64-
"$drawio" -x -f png -s 2 -p $i -o "$tab.png" "$in" > /dev/null 2&> /dev/null
53+
"$drawio" -x -f $extension -s 2 -p $i -o "$output_dir$tab.$extension" "$in" > /dev/null 2&> /dev/null
6554
exported=true
6655
fi
6756
fi

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: test
1+
name: deploy
22
on:
33
push:
44
branches:
55
- 'main' # matches main branch
66

77
jobs:
8-
test:
8+
deploy:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4

README.md

Lines changed: 2 additions & 2 deletions

images/aec3po-Alignment.png

-666 KB
Binary file not shown.

images/aec3po-Alignment2.png

-1.41 MB
Binary file not shown.

images/aec3po_v1.0.0_Modules.png

-822 KB
Binary file not shown.
-1.55 MB
Binary file not shown.

images/aec3po_v1.0.1_Modules.png

-1.54 MB
Binary file not shown.

images/aec3po_v1.0.2_Modules.png

-1.55 MB
Binary file not shown.
-1.39 MB
Binary file not shown.

0 commit comments

Comments
 (0)