markov chain twitter bot, reads a twitter archive and generates new tweets from that
Install python package requirements with
$ pip install -r requirements.txt
- At first login to your twitter account and go to https://twitter.com/settings/account
- Request your twitter archive and wait for the mail that it is complete
- Download the twitter archive zip file
- Import the archive file by calling
python nitoahc.py --import /path/to/archive.zip
Now you can generate new tweets by calling python nitoahc.py --print
- Create a new twitter app at https://apps.twitter.com
- Make sure you allow the app to post
- Get your keys from the "Keys and Access Tokens" tab (you need "Consumer Key (API Key)" and "Consumer Secret (API Secret)")
- Fetch oauth tokens:
$ python nitoahc.py --twitter-key <key> --twitter-secret <secret> --auth
Please visit:
https://api.twitter.com/oauth/authenticate?oauth_token=xxx
And restart this script with --pin <Pin> after authenticating.
$ python nitoahc.py --pin <pin>
Now send a tweet by calling python nitoahc.py --tweet