@RealTrumpTalk on Twitter!
FollowTrumpTalk
Using markov-chains to parse tweets by @realDonaldTrump and create tweets using what he says. It will post a new tweet every 30 minutes, which has a 40% chance of mentioning a user, and a 75% chance of including a hashtag. Every 12 hours, the database of tweets will be refreshed and re-parsed to stay up to date.
Dependencies
Setup
- Clone the repository, or in some way get the code.
- Create a Twitter account to use for the script.
- Go to https://apps.twitter.com and create a new app. Fill in the information and find your consumer key and secret.
- Generate your access key and access secret below.
- Open up your favorite editor and make a new file called
credentials.py
and copy in the variables below.
consumer_key = "Your_key"
consumer_secret = "Your_secret"
access_key = "Token_key"
access_secret = "Token_secret"
Replace the values within the quotes with the appropriate values you just got from your Twitter app.
6. (Optional) If you want to use a different account than @realDonaldTrump, you just need to go into main.py
and change all instances of realDonaldTrump
to whatever username you would like to use.
Running
In terminal, run python main.py
Depending on how your system is configured, you may need to run it as root with sudo python main.py
, which will prompt you for your password.
Contributing
If you find a bug, know a better way of doing something, or want to add a feature, please feel free to open a pull request and I will take a look.