I want to generate one DrawIO file with multiple pages, one TreeDiagram per page. The problem here is that TreeDiagram instantiates its own File and Page object right in the constructor.
I'm currently doing something like
def generate_page(start_node) -> Page:
<instantiate a new TreeDiagram>
return tree_diagram.page
def write_file():
base_diagram = TreeDiagram(file_path="", file_name="something.drawio")
del base_diagram.page.file
for page_name, start_node in stuff.items():
page = generate_page()
page.diagram.name = page_name
page.file = base_diagram.file
base_diagram.write()
What I'd like is I think two-fold, for the TreeDiagram constructor:
Optional passing in of a File object. This is mutually exclusive with the pair of file_name/file_path.
Optional passing in of a page name
As before I'm happy to make the PR but since you say you want an issue and discussion first, here you go.
I want to generate one DrawIO file with multiple pages, one TreeDiagram per page. The problem here is that TreeDiagram instantiates its own File and Page object right in the constructor.
I'm currently doing something like
What I'd like is I think two-fold, for the TreeDiagram constructor:
Optional passing in of a File object. This is mutually exclusive with the pair of file_name/file_path.
Optional passing in of a page name
As before I'm happy to make the PR but since you say you want an issue and discussion first, here you go.