This commit is contained in:
xinglie.lkf
2019-10-10 14:42:09 +08:00
parent d3a7ac8408
commit c884ba74c3
315 changed files with 2926141 additions and 1990527 deletions

View File

@@ -835,15 +835,18 @@ let splitStrains = () => {
if (poetReg.test(f)) {
let file = path.basename(f);
let list = JSON.parse(rank.read(f));
let aims = [];
let aims = JSON.parse(rank.read(`../strains/json/${file}`));
let index = 0;
for (let e of list) {
if (!e.strains) {
throw new Error(`strains does not exists ${e}`);
}
aims.push(e.strains);
delete e.strains;
let strain = aims[index];
aims[index] = {
strains: strain,
id: e.id
};
index++;
//delete e.strains;
}
rank.write(`../json/${file}`, JSON.stringify(list, null, 4));
//rank.write(`../json/${file}`, JSON.stringify(list, null, 4));
rank.write(`../strains/json/${file}`, JSON.stringify(aims, null, 4));
}
});