Giter Site home page Giter Site logo

hot-takes's Introduction

hot-takes

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.

Adding/editing hot takes

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 the languages array
  • {technology} - a random value from the technologies array
  • {tld} - a random value from the tlds array
  • {thing} - a random language or technology
  • {oneWordThing} - like {thing}, but compressed to one word by stripping spaces. Eg "FreeSoftwareFoundation" instead of "Free Software Foundation"
  • {anything} - a random element from languages ∪ 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 the people array
  • {company} - a random value from the companies array
  • {group} - a random value from the people or companies array
  • {problem} - a random value from the problems 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.

Running the bot

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.

hot-takes's People

Contributors

bristermitten avatar ivan8or avatar

Stargazers

 avatar

Watchers

 avatar Kostas Georgiou avatar

Forkers

ivan8or

hot-takes's Issues

This bot is very annoying

Whenever I search for information about any language, this bot always pops up, it doesn't contribute anything, please stop it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.