Build Scripts - Flow Diagrams¶
This section contains detailed flow diagrams for the build and documentation helper scripts in the /scripts directory.
Quick Overview¶
The OctoPrint-Uptime project uses several helper scripts to automate documentation and build tasks:
- Overview Diagram High-level relationship between scripts and their outputs
Individual Scripts¶
Documentation & Diagram Generation¶
- generate-diagrams.sh Generates UML class and package diagrams
- Uses
pyreverse(frompylint) for Python AST analysis - Renders with Graphviz (
dot) or falls back to ImageMagick + potrace -
Outputs SVG diagrams to
docs/reference/diagrams/ -
generate-jsdocs.sh Generates JavaScript API documentation
- Uses
jsdoc-to-markdownfor JSDoc comment extraction - Generates Markdown documentation for
octoprint_uptime/static/js/**/*.js - Outputs to
docs/api/javascript.md
Platform Support¶
- win-bash-wrapper.sh — Utility script that re-executes Bash scripts under Git Bash on Windows
- Used by build scripts to ensure consistent behavior across platforms
- No separate diagram (helper script, used internally by other hooks)
Translation utilities¶
- translation_utils.py Shared helpers for translation scripts
Git hooks¶
- check_translations_sync.sh Read-only translations sync check
- pre-commit Pre-commit runner with venv + logging
- post-commit Post-commit hook runner
- prettier-hook.sh Prettier formatter helper
- shellcheck-hook.sh ShellCheck lint helper
For more information about these scripts, see Scripts README.