this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

tweeted -> posted

alice 6579ba81 33edefbf

+6 -6
+1 -1
.gitignore
··· 129 129 .yarn/install-state.gz 130 130 .pnp.* 131 131 132 - tweeted.txt 132 + posted.txt
+5 -5
index.ts
··· 15 15 }); 16 16 17 17 const lines = fs.readFileSync('songofsongs.txt', 'utf8').split('\n'); 18 - const already_tweeted = fs.readFileSync('tweeted.txt', 'utf8').split('\n'); 19 - let possible_output = lines.filter((line) => !already_tweeted.includes(line)); 18 + const already_posted = fs.readFileSync('posted.txt', 'utf8').split('\n'); 19 + let possible_output = lines.filter((line) => !already_posted.includes(line)); 20 20 if (possible_output.length === 0) { 21 - fs.rmSync('tweeted.txt'); 21 + fs.rmSync('posted.txt'); 22 22 possible_output = lines; 23 - fs.appendFileSync('tweeted.txt', '\n'); 23 + fs.appendFileSync('posted.txt', '\n'); 24 24 } 25 25 const post = possible_output[Math.floor(Math.random() * possible_output.length)]; 26 26 ··· 31 31 // createdAt: new Date().toISOString(), 32 32 // }); 33 33 34 - fs.appendFileSync('tweeted.txt', post + '\n'); 34 + fs.appendFileSync('posted.txt', post + '\n');