Skip to content

Commit

Permalink
Init script to automatically create figures, #636
Browse files Browse the repository at this point in the history
  • Loading branch information
tischi committed Mar 31, 2024
1 parent af52f16 commit 0aeb267
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions create_figures.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# List of modules to exclude
exclude_modules=("tool_installation" "image_inspection_and_presentation")

# Function to check if a module is in the exclude list
is_excluded() {
local e
for e in "${exclude_modules[@]}"; do [[ "$e" == "$1" ]] && return 0; done
return 1
}

# Extract the module_order and execute the command for each, excluding specified modules

i=0
i_max=3 # Set to a low number for development, otherwise set to 99999

yq e '.module_order[]' _config.yml | while read module; do
if ! is_excluded "$module"; then
i=$((i+1))
echo ${i}: ${module}
#soffice --headless --convert-to png --outdir ./figures figures/resources/"${module}".pptx
fi
if [ $i -eq $i_max ]; then
break
fi
done
Binary file modified figures/auto_threshold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/resources/auto_threshold.pptx
Binary file not shown.

0 comments on commit 0aeb267

Please sign in to comment.