PDA

View Full Version : Dev Tracker Twitter feed


Archived Post
10-03-2009, 12:39 PM
EDIT: Well, I've put it up with all tags & details in for now since title/extract seemed to generally fit pretty well anyway. Cronjob is currently on a 5 minute refresh and any posts it finds at that interval it'll tweet immediately.

Follow @co_devtrack (http://twitter.com/co_devtrack) if you want the dev post stream on twitter.

---

Hi all, I've been knocking up a little script to copy dev tracker posts to a twitter account this afternoon. Mostly for my own benefit but I'm sure some others will find it useful too. ;)

Got a couple of questions for the community before I'm finished up and making it public though.

As you probably know, Twitter is limited to 140 characters per tweet. So, I need some help deciding what to cram into this limit;

1. Topic title - I think I probably need this so the reply excerpt makes more sense...
2. Reply excerpt - Well obviously I need this one! :p
3. URL - Likewise, needed. It'll be a j.mp url so it'll be as short as possible.
4. #champs (http://twitter.com/#search?q=%23champs) hashtag, should I include this in each tweet since it seems to be a convention for CO mentions?
5. Poster - should I include something like #cryptic_daeke, #cryptic_coderanger, etc. hashtags in the tweets too so people can just follow individual devs if they like? I wouldn't use it myself but I'm guessing others might want to concentrate on a poster or two...

Is all that info useful or should I drop some of it (namely - topic or one/both hashtags)?

Also, what shall I cut back on first if my proposed tweet is too long? Topic title? Post extract? Or should I take half the overflow off of each of those?

Lastly, what sort of lag on dev posts -> twitter would you think is reasonable? Poll dev tracker once every 5 minutes and post any and all new dev posts to the stream?

Any and all input appreciated, thanks people! :D

Archived Post
10-03-2009, 03:39 PM
That's pretty awesome!

I like the idea of including the Dev's hash tag, but the more stuff you include, the less space you have for actual message content. I'd like to see a shortened title, shortened response, and the two hash tags (even though I don't use them, but I know it'll be easier for others to find with them there).

5 minute intervals should be plenty. It's not like the devs here are THAT active.

Archived Post
10-03-2009, 04:21 PM
I like the idea of including the Dev's hash tag, but the more stuff you include, the less space you have for actual message content.

Yeah, but the search page doesn't have much of the post content anyway. From my limited testing on the first page of results I didn't have to cut much out (except for with the long tag #cryptic_supercrypticdave). I suppose I _could_ go off to the relevant thread and scrape more of the post out but I'm not sure it's worth it...

5 minute intervals should be plenty. It's not like the devs here are THAT active.

True. :p Shorter refresh means a 'smoother' stream though. If I checked once per hour and Daeke's been on a posting rampage since my last check then when the hour was up you'd get a sudden flood of new posts.

Archived Post
10-03-2009, 04:35 PM
Awesome idea!
How do we go about getting this stickyed?

Archived Post
10-05-2009, 10:23 AM
Well, it seems to have been working fine so far today with devs posting. *touch wood* ;)

I'll keep an eye on it anyway but shout if you spot something amiss (Forum/game PM, tweet, carrier pidgeon, whatever).

Archived Post
10-07-2009, 09:55 AM
Couple of tweets got missed yesterday, highlighting a bug in the script. That's fixed and I added the missing tweets into the stream manually.

I've made some further improvements to it today; before if multiple things to post were found all the j.mp URLs were worked out at the start and then it'd go about tweeting them. The problem with this was if something went wrong at the j.mp link generation stage (which it does on and off, sometimes I get a non JSON response from their API) then none of the new tweets would be posted.

I've changed it now so the j.mp URLs are worked out individually just before tweeting each message, that way if it fails on say 3 of 5 then 1 & 2 will have been tweeted and 3-5 (+ any new ones) will be sent in the next batch.

If the non JSON responses from the j.mp API start happening too much I might see about implementing a '3 retries before I give up' on all API calls (j.mp, twitter, prowl) but for now it generally fails one round and works the next so it's only an extra 5 minute delay (usually).

Archived Post
10-08-2009, 09:16 AM
and, of course, in improving the logic/flow over making j.mp URLs yesterday I introduced a new bug allowing the script to miss some tweets again. Doh! Really should be fixed this time, honest. ;)