Commit dadfdcd1 authored by David BAELDE's avatar David BAELDE

Chord: workaround + proper file output

parent fcac8d36
......@@ -9,14 +9,19 @@ site/matrix.json: ../../xslt/matrix.xsl build.xml index.html numqueries xpp.css
ant
chord.inner.svg: site/matrix.json phantom.js chord.css
phantomjs phantom.js "file://$(PWD)/site/index.html" > chord.inner.svg
phantomjs phantom.js "file://$(PWD)/site/index.html" chord.inner.svg
chord.svg: chord.inner.svg chord.css
echo '<?xml version="1.0" standalone="no"?>' > $@
echo '<svg id="chord" width="650" height="650"><defs><style type="text/css"><![CDATA[' >> $@
cat chord.css >> $@
echo ']]></style></defs>' >> $@
sed -e 's/<svg[^>]*>//g' chord.inner.svg >> $@
# Remove opening <svg>
# + remove buggy NS[1..6] namespaces that show up on some systems...
sed -e 's/<svg[^>]*>//' -e 's/NS.:/xlink:/g' chord.inner.svg >> $@
chord.pdf: chord.svg
inkscape $< --export-pdf=$@
clean:
rm -f chord.inner.svg chord.svg chord.pdf
......@@ -2,6 +2,7 @@
// example usage: phantomjs phantom.js 'http://www.lsv.fr/~schmitz/xpparser/xpathmark/' > chord.svg
"use strict";
var system = require('system');
var fs = require('fs');
var args = system.args;
var page = require('webpage').create();
......@@ -17,7 +18,7 @@ page.open(args[1], function (status) {
var markup = page.evaluate(function(){
return document.getElementById('links').innerHTML;
});
console.log(markup);
fs.write(args[2],markup,'w');
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