Justin starts a blog

Text

Hacking the Peek into the TwitterPeek

So I know that the standard Peek already has some support for Twitter via PeekApps, but since that’s in closed beta I decided to roll my own. I’ve optimized my setup so that only mentions and DMs come through, and so that replies “just work”.

First I setup a gmail box for my incoming tweets to go to, and then set that up as my peek address. Ok pretty simple so far.

Then I wrote a script called twitterpeek which polls for mentions and DMs, formats them just right for the peek, and forwards them to my special gmail box. This just runs in a cron once every few minutes.

Next I whipped up the converse script, peektwitter. This takes incoming messages sent to a special address, parses them, and forwards them on to Twitter. I take advantage of the way my peek formats replies to include all the pertinent information to send the tweet. This one is a bit trickier to set up, since you’ll need to configure an MTA (I use postfix) to use this as a filter for your special address.

Now I’ve got a nice little Twitter device. Since it’s only sending me mentions and DMs I can turn on the notifications full blast. I’ll continue to do my everyday following via Tweetie, and use this for conversations on the go.

Posted on Monday, January 11 2010. Tagged with: twitterhackpeek
Justin starts a blog

nyc. hacker. blip.tv. vegan. drunkard.

Previous Next