Matias Alejo Garcia
10 years ago
1 changed files with 24 additions and 0 deletions
@ -0,0 +1,24 @@ |
|||
#!/usr/bin/env node |
|||
|
|||
var _ = require('lodash'); |
|||
var fs = require('fs'); |
|||
var program = require('commander'); |
|||
var utils = require('./cli-utils'); |
|||
program = utils.configureCommander(program); |
|||
|
|||
program |
|||
.option('-o, --output [filename]', 'output file') |
|||
.parse(process.argv); |
|||
|
|||
var args = program.args; |
|||
var client = utils.getClient(program); |
|||
|
|||
client.getTxProposals({}, function(err, txps) { |
|||
utils.die(err); |
|||
utils.renderTxProposals(txps); |
|||
if (program.output) { |
|||
fs.writeFileSync(program.output, JSON.stringify(txps)); |
|||
console.log(' * Proposals Saved to: %s\n', program.output); |
|||
} |
|||
|
|||
}); |
Loading…
Reference in new issue