Skip to content

Commit

Permalink
update resultcompare automaticlly
Browse files Browse the repository at this point in the history
  • Loading branch information
zyr17 committed May 10, 2020
1 parent 4994a79 commit 9641e7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion result.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h4 class="modal-title" id="sr-description-label">{{ description.SR[0] }}</h4>

RESULTGROUP = {"order":["OVRESULT","HULERESULT","CHONGRESULT","HULEYAKURESULT","CHONGYAKURESULT","REACHRESULT","ZHUILIBEIZHUILIRESULT","LIUJURESULT","FULU1RESULT","FULU2RESULT","FULU3RESULT","FULU4RESULT","GANGRESULT","ALRESULT","STABLERANKRESULT"],"data":{"OVRESULT":["TOTALGAME","TOTALROUND","#1R","#2R","#3R","#4R","#A","HULER","ZIMOR","CHONGR","REACHR","FULUR","LIUJUTENPAIR","GAMEPROFIT","ROUNDPROFIT"],"HULERESULT":["HULER","ZIMOR","DAMAHULER","FULUHULER","HULEP","HULESU","DAMAHULEP","HULE3900R","HULE7700R","HULE11600R","HULECC","FULUHULECC","MENQINGHULECC","REACHINHULER","TANYAOHULER","PINFUHULER","CHITOIHULER","TOITOIHULER","RANSHOUHULER","AKAA","DORAA","URAA","ALLDORAA","YIPATSUHULER","OYAHULER"],"CHONGRESULT":["CHONGR","CHONGLEDAMAR","FULUCHONGR","CHONGP","CHONGSU","CHONGLEDAMAP","CHONG3900R","CHONG7700R","CHONG11600R","CHONGMYCC","CHONGHISCC","CHONGSHANTEN","CHONGLEREACHR","CHONGLEPINFUR","CHONGLECHITOIR","CHONGLETOITOIR","CHONGLETANYAOR","CHONGLERANSHOUR","REACHINCHONGR","CHONGLEOYAR","CHONGLEYIPATSUR","CHONGLEFULUR","BEIZIMOR","BEIZIMOP","BEIZIMOMYCC","ZHAZHUANGR","ZHAZHUANGP"],"HULEYAKURESULT":[],"CHONGYAKURESULT":[],"REACHRESULT":["REACHR","REACHHULEP","REACHHULESU","REACH3900R","REACH7700R","REACH11600R","REACHCC","REACHTANYAOR","REACHDORA2R","REACHDORA3R","REACHDORAA","FIRSTREACHR","HULEINREACHR","CHONGINREACHR","ZIMOINREACHHULER","REACHGOODR","REACHGOODHULER","REACHGOODHULEP","REACHGOODCHONGR","REACHGOODCHONGP","REACHGOODPROFIT","REACHBADR","REACHBADHULER","REACHBADHULEP","REACHBADCHONGR","REACHBADCHONGP","REACHBADPROFIT","REACHPROFIT"],"ZHUILIBEIZHUILIRESULT":["ZHUILIR","ZHUILIHULER","ZHUILIHULEP","ZHUILICHONGR","ZHUILICHONGP","ZHUILIPROFIT","ZHUILIGOODR","ZHUILIBADR","BEIZHUILIR","BEIZHUILIHULER","BEIZHUILIHULEP","BEIZHUILICHONGR","BEIZHUILICHONGP","BEIZHUILIPROFIT","BEIZHUILIGOODR","BEIZHUILIBADR","FURITENR","FURITENHULER","FURITENHULEP","FURITENCHONGR","FURITENCHONGP","FURITENGOODR","FURITENGOODHULER","FURITENGOODHULEP","FURITENGOODCHONGR","FURITENGOODCHONGP","FURITENBADR","FURITENBADHULER","FURITENBADHULEP","FURITENBADCHONGR","FURITENBADCHONGP"],"LIUJURESULT":["LIUJUR","LIUJUTENPAIR","LIUJUINP","LIUJUNOTENR","LIUJUOUTP","LIUJUPROFIT"],"FULU1RESULT":["FULUR1","HULEINFULUR1","FULUHULEPOINT1","FULUHULESUDIAN1","CHONGINFULUR1","FULUCHONGPOINT1","ZIMOINHULEFULUR1","FULUHULE3900R1","FULUHULE7700R1","FULUHULE11600R1","FULUCHONG3900R1","FULUCHONG7700R1","FULUCHONG11600R1","FULUDORA2R1","FULUDORA3R1","FULUTANYAOR1","FULUYAKUHAIR1","FULUCC1","FULUTANYAOHULER1","FULURANSHOUHULER1","FULUTOITOIHULER1","FULUFIRSTR1","FULUPROFIT1"],"FULU2RESULT":["FULUR2","HULEINFULUR2","FULUHULEPOINT2","FULUHULESUDIAN2","CHONGINFULUR2","FULUCHONGPOINT2","ZIMOINHULEFULUR2","FULUHULE3900R2","FULUHULE7700R2","FULUHULE11600R2","FULUCHONG3900R2","FULUCHONG7700R2","FULUCHONG11600R2","FULUDORA2R2","FULUDORA3R2","FULUTANYAOR2","FULUYAKUHAIR2","FULUCC2","FULUTANYAOHULER2","FULURANSHOUHULER2","FULUTOITOIHULER2","FULUFIRSTR2","FULUPROFIT2"],"FULU3RESULT":["FULUR3","HULEINFULUR3","FULUHULEPOINT3","FULUHULESUDIAN3","CHONGINFULUR3","FULUCHONGPOINT3","ZIMOINHULEFULUR3","FULUHULE3900R3","FULUHULE7700R3","FULUHULE11600R3","FULUCHONG3900R3","FULUCHONG7700R3","FULUCHONG11600R3","FULUDORA2R3","FULUDORA3R3","FULUTANYAOR3","FULUYAKUHAIR3","FULUCC3","FULUTANYAOHULER3","FULURANSHOUHULER3","FULUTOITOIHULER3","FULUFIRSTR3","FULUPROFIT3"],"FULU4RESULT":["FULUR4","HULEINFULUR4","FULUHULEPOINT4","FULUHULESUDIAN4","CHONGINFULUR4","FULUCHONGPOINT4","ZIMOINHULEFULUR4","FULUHULE3900R4","FULUHULE7700R4","FULUHULE11600R4","FULUCHONG3900R4","FULUCHONG7700R4","FULUCHONG11600R4","FULUDORA2R4","FULUDORA3R4","FULUTANYAOR4","FULUYAKUHAIR4","FULUCC4","FULUTANYAOHULER4","FULURANSHOUHULER4","FULUTOITOIHULER4","FULUFIRSTR4","FULUPROFIT4"],"GANGRESULT":["GANGR","DAMINGGANGR","JIAGANGR","ANGANGR","REACHANGANGR","GANGHULER","GANGHULEP","GANGCHONGR","GANGCHONGP","GANGPROFIT"],"ALRESULT":["AL#1#1R","AL#234#1R","AL#4#123R","ALALR"],"STABLERANKRESULT":["EASTSR","EASTCIL","EASTCIR","SOUTHSR","SOUTHCIL","SOUTHCIR"]}};

RESULTCOMPARE = {"description":["记录统计量和基本线比较时的比较规则。字符串为key,记录格式为`XY,<num1>,<num2>,<num3>,<num4>`或`N`","当字符串为N时,代表该统计量不能和基本线进行比较,不根据其大小对其进行分档","X可取值B/S,分别代表该统计量数值越大/越小越好","Y可取值M/D,分别代表统计量进行相互比较时使用相对大小/绝对值差距","之后为四个大小递增的实数,根据四个实数将比较结果划分为1-5五档","边界情况:若值和<numX>相等,则认为是X+1档","对于一个字符串格式key,其value为一个数组,数组元素为统计量名称","统计量名称不支持复合写法,如果在result中使用了复合写法需要对每个统计量分别设置规则","但是支持使用`AAA`匹配`AAA` `AAA0` `AAA1` `AAA2` ... `AAA9`","对于未在此出现的统计量会使用DEFAULT所在的规则来进行比较"],"N":["ALALR","EASTSR","EASTCIL","EASTCIR","SOUTHSR","SOUTHCIL","SOUTHCIR","TOTALROUND","TOTALGAME"],"BD,-0.005,-0.002,0.002,0.005":["HULEYAKU_CHANKAN","HULEYAKU_RINSHAN","HULEYAKU_HAITEI","HULEYAKU_HOUTEI","HULEYAKU_BAFUSHA","HULEYAKU_BAFUPEI","HULEYAKU_WREACH","HULEYAKU_SANSHOKUDOUKO","HULEYAKU_SANKANTSU","HULEYAKU_SHOUSANGEN","HULEYAKU_HONROUTOU","HULEYAKU_RYANPEIKOU","HULEYAKU_JUNCHAN","HULEYAKU_TENHOU","HULEYAKU_CHIHOU","HULEYAKU_DAISANGEN","HULEYAKU_SUANKO","HULEYAKU_SUANKOTANKI","HULEYAKU_TSUYISOU","HULEYAKU_RYOUYISOU","HULEYAKU_CHINROUTOU","HULEYAKU_CHUREN","HULEYAKU_JUNSEICHUREN","HULEYAKU_KOKUSHI","HULEYAKU_KOKUSHIJUSAN","HULEYAKU_DAISUSHI","HULEYAKU_SHOUSUSHI","HULEYAKU_SUKANTSU","HULEYAKU_CHINYITSU","HULEYAKU_TOITOI","HULEYAKU_SANANKO","HULEYAKU_CHANTA","HULEYAKU_YITSU","HULEYAKU_JIFUDON","HULEYAKU_JIFUNAN","HULEYAKU_JIFUSHA","HULEYAKU_JIFUPEI"],"BD,-0.01,-0.004,0.004,0.01":["HULEYAKU_YIPEIKOU","HULEYAKU_CHUN","HULEYAKU_HATSU","HULEYAKU_HAKU","HULEYAKU_BAFUNAN","HULEYAKU_CHITOITSU","HULEYAKU_SANSHOKU","HULEYAKU_HONYITSU"],"BD,-0.02,-0.008,0.008,0.02":["HULEYAKU_TANYAO","HULEYAKU_BAFUDON","HULEYAKU_YIPATSU"],"BD,-0.04,-0.015,0.015,0.04":["HULEYAKU_ZIMO","HULEYAKU_REACH","HULEYAKU_PINFU","HULEYAKU_DORA","HULEYAKU_URA","HULEYAKU_AKA"],"SD,-0.005,-0.002,0.002,0.005":["CHONGLEYAKU_ZIMO","CHONGLEYAKU_CHANKAN","CHONGLEYAKU_RINSHAN","CHONGLEYAKU_HAITEI","CHONGLEYAKU_BAFUSHA","CHONGLEYAKU_BAFUPEI","CHONGLEYAKU_WREACH","CHONGLEYAKU_SANSHOKUDOUKO","CHONGLEYAKU_SANKANTSU","CHONGLEYAKU_SANANKO","CHONGLEYAKU_SHOUSANGEN","CHONGLEYAKU_HONROUTOU","CHONGLEYAKU_RYANPEIKOU","CHONGLEYAKU_TENHOU","CHONGLEYAKU_CHIHOU","CHONGLEYAKU_DAISANGEN","CHONGLEYAKU_SUANKO","CHONGLEYAKU_SUANKOTANKI","CHONGLEYAKU_TSUYISOU","CHONGLEYAKU_RYOUYISOU","CHONGLEYAKU_CHINROUTOU","CHONGLEYAKU_CHUREN","CHONGLEYAKU_JUNSEICHUREN","CHONGLEYAKU_KOKUSHI","CHONGLEYAKU_KOKUSHIJUSAN","CHONGLEYAKU_DAISUSHI","CHONGLEYAKU_SHOUSUSHI","CHONGLEYAKU_SUKANTSU"],"SD,-0.01,-0.004,0.004,0.01":["CHONGLEYAKU_HOUTEI","CHONGLEYAKU_YIPEIKOU","CHONGLEYAKU_JIFUDON","CHONGLEYAKU_JIFUNAN","CHONGLEYAKU_JIFUSHA","CHONGLEYAKU_JIFUPEI","CHONGLEYAKU_CHANTA","CHONGLEYAKU_YITSU","CHONGLEYAKU_SANSHOKU","CHONGLEYAKU_TOITOI","CHONGLEYAKU_JUNCHAN","CHONGLEYAKU_CHINYITSU"],"SD,-0.02,-0.008,0.008,0.02":["CHONGLEYAKU_YIPATSU","CHONGLEYAKU_PINFU","CHONGLEYAKU_BAFUNAN","CHONGLEYAKU_HAKU","CHONGLEYAKU_HATSU","CHONGLEYAKU_CHUN","CHONGLEYAKU_CHITOITSU","CHONGLEYAKU_HONYITSU","CHONGLEYAKU_TANYAO","CHONGLEYAKU_BAFUDON"],"SD,-0.04,-0.015,0.015,0.04":["CHONGLEYAKU_REACH","CHONGLEYAKU_DORA","CHONGLEYAKU_URA","CHONGLEYAKU_AKA"],"BM,0.8,0.95,1.05,1.2":["AL#1#1R","AL#234#1R","AL#4#123R"],"BM,0.9,0.99,1.01,1.1":["DEFAULT"],"SM,0.9,0.99,1.01,1.1":["#3R","#4R","CHONGR","CHONGLEDAMAR","FULUCHONGR","CHONGP","CHONGSU","CHONGLEDAMAP","CHONG11600R","CHONG7700R","CHONG3900R","CHONGMYCC","CHONGHISCC","CHONGSHANTEN","HULECC","FULUHULECC","MENQINGHULECC","CHONGLEREACHR","CHONGLEPINFUR","CHONGLECHITOIR","CHONGLETOITOIR","CHONGLETANYAOR","CHONGLERANSHOUR","REACHINCHONGR","CHONGLEOYAR","CHONGLEYIPATSUR","CHONGLEFULUR","BEIZIMOMYCC","BEIZIMOR","BEIZIMOP","ZHAZHUANGR","ZHAZHUANGP","REACHCC","REACHGOODCHONGR","REACHGOODCHONGP","REACHBADCHONGR","CHONGINREACHR","REACHBADR","LIUJUNOTENR","LIUJUOUTP","CHONGINFULUR","FULUCHONGPOINT","FULUCHONG11600R","FULUCHONG7700R","FULUCHONG3900R","FULUCC","ZHUILICHONGR","ZHUILICHONGP","ZHUILIBADR","BEIZHUILICHONGR","BEIZHUILICHONGP","BEIZHUILIBADR","FURITENR","FURITENCHONGR","FURITENCHONGP","FURITENGOODCHONGR","FURITENGOODCHONGP","FURITENBADR","FURITENBADCHONGR","FURITENBADCHONGP","GANGCHONGR","GANGCHONGP","#A"],"BD,-400,-100,100,400":["REACHGOODPROFIT","REACHBADPROFIT","REACHPROFIT","LIUJUPROFIT","ROUNDPROFIT","FULUPROFIT1","FULUPROFIT2","FULUPROFIT3","FULUPROFIT4","ZHUILIPROFIT","BEIZHUILIPROFIT","GANGPROFIT","CHONGP","CHONGSU","CHONGLEDAMAP"],"BD,-1000,-300,300,1000":["GAMEPROFIT"],"SD,-400,-100,100,400":[]};
/*RESULTCOMPARE*/

var languages_list = Object.keys(I18N);

Expand Down
5 changes: 4 additions & 1 deletion src/resulthtml_generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ const fs = require('fs');

let savename = __dirname + '/resulthtml.h';
let filename = __dirname + '/../result.html';
let PAADname = __dirname + '/../PAADData.json';
let result =
`const std::string resulthtml =
`;
let text = fs.readFileSync(filename).toString().replace(/\\/g, '\\\\').replace(/"/g, '\\"').split(/\r?\n/);
let text = fs.readFileSync(filename).toString();
let PAAD = JSON.parse(fs.readFileSync(PAADname).toString());
text = text.replace(/\/\*RESULTCOMPARE\*\//, 'RESULTCOMPARE = ' + JSON.stringify(PAAD.resultcompare) + ';').replace(/\\/g, '\\\\').replace(/"/g, '\\"').split(/\r?\n/);
for (let i = 0; i < text.length; i ++ )
result += '"' + text[i] + '\\n"\n';
fs.writeFileSync(savename, result + ';');

0 comments on commit 9641e7d

Please sign in to comment.