RSS Git Download  Clone
Raw Blame History
#!/usr/bin/env node

var xml2json = require('../');
var pkg = require('../package.json');

var xml = '';

var args = process.argv.slice(2)
var arg = args[0]

if (arg == '--version') {
	console.log(pkg.version)
	process.exit(0)
}

process.stdin.on('data', function (data) {
	xml += data;
});

process.stdin.resume();

process.stdin.on('end', function () {
	json = xml2json.toJson(xml)
	process.stdout.write(json + '\n')
});