Turkey and stuffing, / potatoes steamy and hot, / Happy Thanksgiving!
2
   
奖励
收藏
已收藏
取消收藏
下载
"/* /////////////////////////////////////////////////////////////////////////////
//var diff = fs.readFileSync('Z:\\Work\\node-byteframe\\config-friends.diff', 'utf8').trim();
//fs.writeFileSync('Z:\\Work\\node-byteframe\\config-friends.diff', diff);
XXX change from config.friends.json to cnofig
XXX convert current diff
fs = require('fs');
diff = fs.readFileSync('2.diff', 'utf8');
console.log("[");
diff.split('\n').forEach((line) => {
if (/=\d\d\d\d/.test(line)) {
date = line.substr(0,11);
action = (line.indexOf("(add)") ? true : false);*/
//total = parseInt(line.match(/=\d\d\d\d/)[0].substr(1));
//steamid = line.match(/76561[0-9]*/)[0];
//player = line.match(/\/\/ .*/)[0].substr(3).replace('<br/>', '').replace(/\\/g, '').replace(/"/g, '');
/*console.log(' [ "2018-' + date + '", ' + action + ", " +total + " ,\"" + steamid + "\", \"" + player + '" ], ');
}
});
console.log("]");
XXX now I need to make the code to append to this array its up there OLD>>
diff += "\n" + pad(date.getMonth()+1) + "/" + pad(date.getDate()) +
"-" + pad(date.getHours()) + ":" + pad(date.getMinutes()) +
" (" + action + ")=" + friends.length +
" '<a href=/"http://gtm.steamproxy.vip/profiles/" + persona +
"/">http://gtm.steamproxy.vip/profiles/" + persona +
"</a>', // " + personas[persona].player_name.replace(
/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])/g, '') + "<br/>";
XXX then I need to go ahead and save it in the config (BUT IM MISSING AN ENTRYNOW
config['76561197961017729'].friends_diff = wasd;
XXX finally need to fix the summary test
line = line.replace(/'\<a .*profiles\//, '[/b]| ').replace(
'(add)=', " - [" + pool_elements(green_icons) + '] ').replace(
'(<font color="red">DEL</font>)=', " - [" + pool_elements(red_icons) + '] ').replace(
'</a>\', \/\/ ', "[/u] | " + pool_elements(emoticon_static[1]) + " = \"").replace(
"<br/>", "\"");
var nameLength = line.substr(line.indexOf('=')+2).length
if (nameLength > 22) {
line = line.slice(0, -(nameLength-22));
}
friend_activity += line + "
\n";
});*/
"