← all projects

automation2020

Letters of John and Abigail Adams Twitterbot

https://github.com/mas-4/johnandabigail

This project was inspired by a photo that made the rounds of Twitter in the wake of the protests in June 2020. The photo was of John Trumbull's famous painting of the signing of the Declaration of Independence with red dots over the faces of all the slave-owning founding fathers. Only 8 or 9 of the several dozen men in the photo could boast never having owned slaves and John Adams was smack dab in the middle with his face as apparent as ever.

I've always been a bit of a John Adams fanboy so I decided to put my Python to work making a twitterbot that would tweet lines from the letters of John and Abigail Adams, a lovely repository of romantic correspondence.

The bot tweets out fairly regularized sentences in threads that correspond to each letter in chronological order, and then repeats. I used tweepy for the Twitter interfacing, AWS's Lambda to run the program, and AWS's DynamoDB to keep track of where the bot is. The actual letters are hosted on a static site of json files on Netlify. That simplified some of the deployment for various reasons I can't recall now.

$ skyblue --version
skyblue 1f55086 (compiled by cprime b148357)
$ skyblue -i src -o build
skyblue: 37 pages and 24 files -> build
# 2026-10-18, 15:27 UTC, 223 ms. Two small scripts: the candle and the light switch.