A python script to output the top ten Twitter trending topics (based on WOEID) to Growlnotify
Put twitrend.py
and acc_keys.txt
in your path, ensure the script is executable, and call it from e.g. a shell script, or cron:
twitrend.py | growlnotify -a Twitter -t Twitter Trends
If calling from cron, bear in mind that the script runs in your home directory, and will look for acc_keys.txt
there. Its log file will also be written there.
The -a
switch assumes you have the Twitter app installed.
Requires the Tweepy library, and OAuth credentials for your Twitter account.
If you don't know how to obtain these, download and run the script found here.
acc_keys.txt
should have the following format:
consumer key
consumer secret
access key
access secret