A few months ago, I created a little Twitter bot called @year_left. It was a fun little project that I completed in a couple of nights. I should’ve open sourced this from the start. It was probably due to imposter syndrome that I didn’t. But tonight I decided to open source it and have placed it up on GitHub for all to take a peak at what makes it work.
Aside from the code, I’ve got a cron job running daily on a Digital Ocean droplet that actually runs the code. The simple logic that triggers the code to actually tweet is if the percent is changed from the previous days. Nothing too complex. If you’ve ever wondered what makes @year_left tick or what a simple Twitter bot looks like, head on over to the source and have a peek.