csgoh / processpiper

An open source python library to generate business process diagram using code or plain text.
https://github.com/csgoh/processpiper
MIT License
148 stars 10 forks source link

[Feat] Render SVG from text input #43

Closed nhpf closed 4 months ago

nhpf commented 4 months ago

Hi @csgoh, thank you for your work on processpiper. It's the best OSS Diagram-as-Code solution for BPMN that I've found so far.

I have a feature idea that I believe would add value to the project.

I noticed that the render() function in text2diagram.py relies on PIL, while the SVGPainter class uses DrawSVG. Then, I understand that currently there is no way to create an SVG diagram from text:

From Text From Code
PNG :heavy_check_mark: :heavy_check_mark:
SVG :x: :heavy_check_mark:

Do you think the implementation of a text2SVGdiagram solution is feasible?

csgoh commented 4 months ago

Hi @nhpf ,

Yep, I will add that to the next release. 😊

csgoh commented 4 months ago

Hi @nhpf, I have just released v0.7.0. You can now save output to SVG by using the render() method. See the change logs in wiki for more information.

nhpf commented 4 months ago

Thank you, @csgoh! It works really well!