title: Exporting D3.js graphs to static SVG files, programmatically
body: <p>I'm generating a large number of D3 graphs programmatically. They currently consist of HTML with SVG, CSS, and JS.</p>
  
  <p>I would like to export these graphs to plain SVG programmatically. I'm having trouble figuring out how to do this. </p>
  
  <p>The closest solution I found is this: <a href="https://stackoverflow.com/questions/8435537/convert-javascript-generated-svg-to-a-file">Convert JavaScript-generated SVG to a file</a> -- 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.</p>
  
  <p>I'd prefer to use Python, but at this point I am open to any tools/programming language.</p>