0

My aim is to draw a ER diagram for a natural language scenario. I already implemented some part of that using python. For drawing an ERD I used draw.io CSV file importing option. enter image description here

The implemented code generate the file which can draw a diagram from the above option but the problem is I want to manually copy the generated file content and paste it into the draw.io window.

enter image description here

I want to know is there any method which I can use for automatically do the copy and paste part using python or are there any methods for drawing an ER diagram easily?

Sashini Hettiarachchi
  • 1,630
  • 2
  • 10
  • 21
  • So you want to generate a csv file with python, then use draw.io to create the diagram based on that csv? If draw.io does not have any API capable of doing this, maybe try using selenium. – Maciej B. Nowak Dec 09 '19 at 10:55
  • Run your own version, https://github.com/jgraph/drawio, and programmatically insert the CSV. – Frodo Baggins Dec 10 '19 at 09:23

1 Answers1

0

Best I've came accross was editing the xml files in python: just build a diagram template with draw.io, parse the xml source file with python and BeautifulSoup and generate a new xml file. The xml tags are really straight forward to get.