From a597c68201245e9e7b7d3d2ef62134588581ed3f Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 20 Sep 2020 18:41:08 +0200 Subject: Initial version --- bin/g2g | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bin/g2g (limited to 'bin') diff --git a/bin/g2g b/bin/g2g new file mode 100755 index 0000000..ed8e312 --- /dev/null +++ b/bin/g2g @@ -0,0 +1,22 @@ +#!/usr/bin/env node + +'use strict'; + +const GraphvizToGrafn = require('..'); + +const stdin = process.stdin; +let graphvizSource = ''; + +stdin.setEncoding('utf8'); + +stdin.on('data', function (chunk) { + + graphvizSource += chunk; +}); + +stdin.on('end', function () { + + console.log(GraphvizToGrafn(graphvizSource)); +}); + +stdin.on('error', console.error); -- cgit