This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
TwitToMast/multi.js
Penelope Gomez / Pogmommy 79f46b803a Update multi.js
change variable for more universal application
2023-02-07 20:25:09 -07:00

15 lines
No EOL
519 B
JavaScript

const args = process.argv;
const defArgs = ["node","path","name","tweetCount","0","write","printHeader"]
for (var i = 0; i < 2; i++) {args.shift();}
const config = require('fs').readFileSync("./usernameslist.txt").toString().split(/[\r\n]+/);
for (let name of config) {
var pArgs = [...args];
pArgs.splice(0, 0, name);
for (var i = 3; i < 7; i++) {
if (typeof pArgs[i-2] == 'undefined') {
pArgs.push(defArgs[i]);
}
}
console.log("pArgs: " + pArgs);
require('child_process').fork('./TwitToMast.js',pArgs);
}