Commit 6f24ca73 authored by l2m2's avatar l2m2

upload

parent 45fdca6a
var _fs = require("fs");
var _hocon = require("topsin.hocon");
var _ = require("lodash");
var bi_dir = "D:/workspace/toplinker/gitlab/topsin/topreport/src/client/modules";
var d = _fs.listDir(bi_dir, -1);
d = _.filter(d, {"name": "lang.conf"});
var en = {};
var zhcn = {};
var zhtw = {};
_.forEach(d, function(item){
var temp = JSON.parse(_hocon.parseFile(item.path));
var fuck = /.*\/(.*)\/lang\.conf$/.exec(item.path)[1];
en[fuck] = _.mapValues(temp, 'en');
zhcn[fuck] = _.mapValues(temp, 'zhcn');
zhtw[fuck] = _.mapValues(temp, 'zhtw');
});
_fs.writeFile("D:/en.json", JSON.stringify(en, null, ' '));
_fs.writeFile("D:/zhcn.json", JSON.stringify(zhcn, null, ' '));
_fs.writeFile("D:/zhtw.json", JSON.stringify(zhtw, null, ' '));
\ No newline at end of file
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