He's so close to me / Leaning in, I feel his breath. / Knee him in the groin
3
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Lataa
"--------------------------------------------------------------------------------

+ maybe just merge all the state, so I can go crazy with it in the future?

config = JSON.parse(fs.readFileSync('./state.json', 'utf8')),
save_config_files = () => (
fs.renameSync('./state.json', './backups/last.json'),
fs.writeFileSync('./state.json', JSON.stringify(config, null, 2))),

TODO:
  • copy the file to newton from datavault when done
  • accounts > config.accounts 1:1
  • config.byteframe. > config.
  • config.twitter. > config. (rename some props maybe)
  • friendsLog Move into the account structure?
  • profile commenter Move into the account structure?

    fs.readdirSync('.').filter((file) =>
    file.indexOf('state-') == 0).forEach((file) =>
    config[file.slice(6,-5)] = JSON.parse(fs.readFileSync('./' + file, 'utf8'))),
    save_config_files = () =>
    Object.keys(config).forEach((item, index) => (
    fs.renameSync('./state-' + item + '.json', './backups/last-' + item + '.json'),
    fs.writeFileSync('./state-' + item + '.json', JSON.stringify(config[item], null, 2)))),
"