Browse Source

更新到2019年9月12日

tags/v2.5
枫谷剑仙 6 years ago
parent
commit
0e7166ab16
2 changed files with 15 additions and 9 deletions
  1. BIN
      images/cards/CARDS_056.PNG
  2. +15
    -9
      monsters-info/extract_CHT.js

BIN
images/cards/CARDS_056.PNG View File

Before After
Width: 1024  |  Height: 1024  |  Size: 360 kB Width: 1024  |  Height: 1024  |  Size: 389 kB

+ 15
- 9
monsters-info/extract_CHT.js View File

@@ -25,19 +25,25 @@ fs.access(outJSON,function(err){
{
var filepath = path.join(sourceFolder, filename);//合并当前文件的路径
var htmlText = fs.readFileSync(filepath, 'utf-8'); //使用同步读取
var searchName = /<h2 .+>\s*?([\s\S]+)\s*?<\/h2>/igm.exec(htmlText);
var searchName = /<h2 .+>\s*?([\s\S]*)\s*?<\/h2>/igm.exec(htmlText);
try
{
var mname = searchName[1].replace("\n","");
var mname = searchName[1].trim();
mname = mname.replace("探偵","偵探"); //把日语的探侦都换成侦探
var m = {
id:searchID[1],
name:mname,
}
monArr.push(m);
if (monArr.length % 100 == 0)
if (mname.length>0)
{
var m = {
id:searchID[1],
name:mname,
}
monArr.push(m);
if (monArr.length % 100 == 0)
{
console.log("已添加 " + monArr.length + " 个数据");
}
}else
{
console.log("已添加 " + monArr.length + " 个数据");
console.log(filename + "的中文名为空。");
}
}catch(e)
{


Loading…
Cancel
Save