I use cliptwit to post the contents of my clipboard to twitter ever hour from 9-5. In addition to the short python script, this requires the tweepy python library and a cron task.
Note that this only works on linux, and that I have only tested on Ubuntu 10.04. Clipboard access would work differently on windows, and windows doesn't come with cron.
Follow these instructions, also mentioned in the authentication howto link.
- Follow the steps here to grant access to your account
- Copy
local_keys.py.template
tolocal_keys.py
- Enter the {consumer, access} {keys, secrets} in local_keys.py; be sure not to check this in
Mine looks like:
00 09-17 * * * DISPLAY=:0 /workspace/cliptwit/clip.py
A good cron reference is here, and most importantly, this link explains why you need DISPLAY=:0
, and why cron won't work with X without it.