Skip to content
/ pk2dna Public

A slow-release script that tweets out buffered strings + script to buffer strings from a file, FIFO

Notifications You must be signed in to change notification settings

pkarl/pk2dna

Repository files navigation

What is PK2DNA?

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

So, you'd like to tweet your genome!

This involves a linux-like environment, a text editor, and a twitter account. Here's what you do:

Get data + credentials

Configure

  • 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 to twitter_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

To run

  • reboot your server, and watch the tweets roll in!
  • If you'd like to have less fun, you can run source /etc/rc.local

Troubleshooting

  • See if there are python execution errors by running python postAndTrimFirstLineOfGenome.py or python 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

About

A slow-release script that tweets out buffered strings + script to buffer strings from a file, FIFO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published