This is my own version of a Twitter bot, using Markov Chains to create tweets and post them to a Twitter account.
You can see an example of it running at https://twitter.com/kalenai_ebawks.
This bot is designed to be run simply on a timer of some sort, such as a cron job. Here are the basic steps to get it up and running:
- Make sure your environment is setup to run Python 3 files and install everything from requirements.txt.
- Start up a PostgreSQL database, if you don't already have one running.
- Create an account for your Twitterbot.
- Make a new Twitter app for your bot account on https://apps.twitter.com/.
- Enter the necessary information in the config.py file.
- Download your full Twitter archive from the source account and place the tweets.csv file in the data folder.
- Run the bot_setup.py file to build your transition matrix table and initially train your database.
- Run your bot by running twitterbot.py.
- Make sure you set LIVE_TWEET in the config to True once you're ready to start actually posting!
This is my first larger project I've built from scratch. I learned a lot and feel like it's fairly solid, but I would love to hear any feedback or suggestions!