A simple Heroku app to display your tweets and your twitter home timeline as Github-style punchcards.
-
fetch_new_tweets.py
uses the Twitter API to fetch data about newly sent/received tweets and update the punchard data. Should be run at regular intervals, e.g. using the Heroku Scheduler. -
app.py
is a Flask app to render the punchcards using D3.
Data is stored as a lump of JSON in Redis.
An example app is running here.
-
Scheduler
-
Redis To Go
-
Create a Twitter app. Set the
TWITTER_APP_NAME
,TWITTER_CONSUMER_KEY
andTWITTER_CONSUMER_KEY_SECRET
config vars:heroku config:set TWITTER_APP_NAME=MyTwitterApp TWITTER_CONSUMER_KEY=... TWITTER_CONSUMER_SECRET=...
-
Run
python create_oath_token.py
and authorise your app to access your tweets. Follow the instructions to set the remaining config vars. -
Add Heroku add-ons:
heroku addons:add scheduler heroku addons:add redistogo
-
Push to Heroku
-
Set up fetching of new tweets as a scheduled task. Command:
python fetch_new_tweets.py
. Schedule: up to you. -
If you can't wait for the first task to run, run it manually:
heroku run python fetch_new_tweets.py
-
Open your app in a browser and check it works.