Archive for June, 2009

Tweeting from an IRC bot

I have made a Guile module which is capable of being used by the IRC bot bobot++. The code is available here:

http://zedstar.org/tarballs/sneektweet-0.1.tar.gz

The readme:

sneektweet 0.1:

Wraps some C/GLib code which posts to Twitter.

setup:

Edit configure.ac to set twitter account details.

from REPL:

john@thinkpad:~/workspace/sneektweet$ guile
guile> (use-modules (twitter sneektweet))
guile> (tweet "foobar")
guile> ** Message: posted update to Twitter

todo:

Add reading updates and posting back to IRC channel. 

bobot example code:

(use-modules (twitter sneektweet))

(define (sneektweet channel message)
  (if (> (string-length message) 140)
    (bot:say channel "Your message needs to be under 140 characters in length!")
    (tweet message)))

(bot:addcommand "tweet" sneektweet #t 2 0)

Tags: , , ,

shakeyshakey

When accelerometers meet Twitter.

This programs calculates the covariance of data sampled from a Thinkpad’s accelerometers. If the covariance is over a certain threshold it posts the result to Twitter. Or more simply put, shake your laptop and make it tweet!

It is a command line program which requires a Twitter username and password to be supplied e.g.

shakeyshakey -u foo -p bar

Built and tested on Ubuntu (Jaunty Jackalope).

http://zedstar.org/tarballs/shakeyshakey_0.1.orig.tar.gz

http://zedstar.org/deb/shakeyshakey_0.1-1_i386.deb

Tags: , , ,