edgegraph.output.plantuml.render_to_image

edgegraph.output.plantuml.render_to_image#

edgegraph.output.plantuml.render_to_image(src, out_file, plantuml='plantuml')#

Accept string PlantUML source, and create an image.

This function accepts a string and a desired output filename, and invokes PlantUML to create the image from the given PlantUML sourcecode.

See also

  • This function works smoothly with render_to_plantuml_src(). Feed that function’s output into this one!

  • The is_plantuml_installed() function can tell you if PlantUML is installed on your system at runtime – it may be beneficial to check that function before trying to call this one.

For this function to work, PlantUML must be installed on the system. Only PNG output is supported at this time. Specifying an output filename not ending in "png" will raise an exception.

Parameters:
  • src (str) – The PlantUML sourcecode to create a diagram from.

  • out_file (str) – The output filename you want the image to appear at.

  • plantuml (str) – The command to invoke PlantUML with.

Raises:

ValueError – If the specified filename is invalid.