I'm generating a large number of D3 graphs programmatically. They currently consist of HTML with SVG, CSS, and JS.
I would like to export these graphs to plain SVG programmatically. I'm having trouble figuring out how to do this.
The closest solution I found is this: Convert JavaScript-generated SVG to a file -- but the problem is that I need to do it programmatically, rather than by using a tool like Chrome Developer Tools or SVG Crowbar which requires manual clicking/saving.
I'd prefer to use Python, but at this point I am open to any tools/programming language.