Twitter bot to post programming hot takes. These are randomly generated using templates inspired by various sources. None of the hot takes are meant to be taken seriously, and most are borderline incomprehensible.
All the hot takes can be found in hotTakeData.json. The data is separated into different categories, which are randomly selected when generating a hot take.
Some data will reference images, which can be found in img/. None of the images are mine, and all credit goes to their respective owners.
All the takes are stored in hotTakeData.json. Most of this data should be fairly self-explanatory.
In takes
fields, the following placeholders can be used:
{language}
- a random value from thelanguages
array{technology}
- a random value from thetechnologies
array{tld}
- a random value from thetlds
array{thing}
- a randomlanguage
ortechnology
{oneWordThing}
- like{thing}
, but compressed to one word by stripping spaces. Eg "FreeSoftwareFoundation" instead of "Free Software Foundation"{anything}
- a random element fromlanguages ∪ technology ∪ people ∪ companies
{oneWordAnything}
- like{anything}
, but compressed to one word by stripping spaces. Eg "FreeSoftwareFoundation" instead of "Free Software Foundation"{person}
- a random value from thepeople
array{company}
- a random value from thecompanies
array{group}
- a random value from thepeople
orcompanies
array{problem}
- a random value from theproblems
array{year}
- a random integer between 1500 and 2022{age}
- a random number between 1 and 50{bigNumber}
- a random number between 2 and 100000{percentage}
- a random number between 1 and 100
To generate a take, firstly a random element from the takes
array is selected.
Then, the placeholders are replaced with random values from the other arrays as described above.
Any images from a selected take or placeholder value are appended and uploaded as part of the Tweet, with a maximum of 4 Image usage is encouraged to make the Tweets more engaging.
Copy .env.template to .env
and fill in the values. These can be obtained from the Twitter Developer
Portal.
For documentation on what the values mean, see src/config.ts.
Then, run npm install
to install dependencies, and npm build
to compile the bot. Finally, run npm start
to run the
bot.