This script is designed to be running on a cron from the command line. It uses an external library to connect to the Twitter API using my own credentials (so no need to authenticate external users), and then update my profile banner (the cover picture) with an updated countdown of my upcoming trip to Brazil.
The image itself is generated by using Imagick to pull a template PNG and, using a provided font file, write the remaining number of days on top, at a set X-Y location. The resulting blob is then base-64 encoded as per the Twitter API requirements.