Skip to content

Commit

Permalink
Agrego opción de lenguage a cmd-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoefe committed Nov 28, 2016
1 parent 5a71bea commit 6d0f469
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/txt-to-sql-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ program
.option('-p, --prepare', 'Analyzes input and generates input.yaml')
.option('-f, --fast', 'Uses streams to process input')
.option('-e, --export-defaults', 'Exports defaults to txt-to-sql-defaults.yaml')
.option('-l, --lang [es]', 'Language of statistics','es')
.parse(process.argv);


Expand All @@ -31,6 +32,7 @@ cmdParams.input = program.input ? program.input : program.args[0];
cmdParams.prepare = program.prepare;
cmdParams.fast = program.fast;
cmdParams.exportDefaults = program.exportDefaults;
cmdParams.lang = program.lang;

// numero de lineas a leer para analizar entrada
var fastBufferingThreshold = 50;
Expand Down Expand Up @@ -162,7 +164,7 @@ Promise.resolve().then(function() {
}
}).then(function() {
if(params.stats) {
process.stdout.write("\n"+txtToSql.stringizeStats(params.stats));
process.stdout.write("\n"+txtToSql.stringizeStats(params.stats, cmdParams.lang));
}
});
}
Expand Down

0 comments on commit 6d0f469

Please sign in to comment.