Commit 4b3a6b41 authored by Sylvain Schmitz's avatar Sylvain Schmitz

to be further tested, but we should be able to extract automatically the D3.js...

to be further tested, but we should be able to extract automatically the D3.js output as SVG (and then render to PDF using inkscape foo.svg --export-pdf=bar.pdf)
parent 91940f09
// extract SVG from chord graph webpage
// example usage: phantomjs phantom.js 'http://www.lsv.fr/~schmitz/xpparser/xpathmark/' > chord.svg
"use strict";
var system = require('system');
var args = system.args;
var page = require('webpage').create();
page.open(args[1], function (status) {
// Check for page load success
if (status !== "success") {
console.log("Unable to access network");
phantom.exit();
} else {
window.setTimeout(
function(){
var markup = page.evaluate(function(){
return document.getElementById('links').innerHTML;
});
console.log(markup);
phantom.exit();
}, 400)
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment