This is an open-source / learning version of the code that powers http://twitter.com/pk2dna.
Read more about it here: Building a Macabre 45-year Twitter Bot
This involves a linux-like environment, a text editor, and a twitter account. Here's what you do:
- Download your genetic blueprint from 23andMe
- Create a Twitter App (for
python-twitter
auth) at http://apps.twitter.com - Get a server somewhere for this repo. Clone and plop it up there.
- (assumes Ubuntu)
- Run
pip install -r requirements.txt
- Put your genetic blueprint data file from 23andMe into
/data
- be sure to trim any unwanted comments/lines of text before you begin!
- Drop your client key/secret and access token key/secret into
twitter_settings.sample.py
and rename totwitter_settings.py
- Add
watch -n[time in seconds] /your/path/to/pk2dna/postAndTrimFirstLineOfGenome.sh 2> /your/path/to/pk2dna/watch_errors.txt
to/etc/rc.local
reboot
your server, and watch the tweets roll in!- If you'd like to have less fun, you can run
source /etc/rc.local
- See if there are python execution errors by running
python postAndTrimFirstLineOfGenome.py
orpython postGenomeStatus.py
from the command line. - If you don't want to execute, but you want to compile, run
python -m py_compile postGenomeStatus.py postAndTrimFirstLineOfGenome.py
. This will show you syntax errors w/out tweeting. - Also, check
[path/to/pk2dna/]watch_errors.txt
to see if watch ran into any issues