3.1.21. waf_tools.drawio
Integration of the draw.io diagram editor into the Waf build system.
This waf tool configures the drawio-desktop application
(https://github.com/jgraph/drawio-desktop/releases) so that .drawio
diagram files can be exported to SVG format as part of the Waf build process.
The tool registers a file extension handler for .drawio files. When a
task generator includes .drawio files, a drawioToSvg task is
automatically created that invokes the draw.io CLI to produce SVG output.
Note
The .drawio source files must not be empty. The drawio-desktop CLI
cannot export empty files and will fail with Error: Export failed: <path>.
3.1.21.1. Usage
The tool is loaded in
waf_tools.sphinx_build.configure()and configured byfind_drawio():# in sphinx_build.py def configure(ctx): ctx.find_drawio()
In a build script, declare a task generator with
.drawiosource files:def build(bld): bld( source=bld.path.ant_glob("**/*.drawio"), )
3.1.21.2. Dependencies
drawio-desktop (
draw.ioon Windows,drawioon Linux)
Functions
|
Create a |
|
Find the drawio-desktop executable and set default CLI options. |
Classes
|
Task that converts a |