Closed smihael closed 6 years ago
There should be an option to automatically open rendered graphs, when running webppl from command line.
The following patch to index.js does that by default:
@@ -3,6 +3,7 @@ var $ = require('jquery'); var dependencyAnalysis = require('./dependency-analysis'); var reflection = require('./reflection'); +var open = require("open"); global.d3 = d3; @@ -1039,6 +1040,7 @@ require('fs').writeFileSync(fileName, svgText); console.log("Rendered to " + fileName); + open(fileName) util.trampolineRunners.cli()( options.callback() ) });
Can you submit a pull request for this that also only auto-opens if a certain environment variable is defined?
There should be an option to automatically open rendered graphs, when running webppl from command line.
The following patch to index.js does that by default: