Twitter Bot

For fun, I decided to create a bot that randomly tweets bird noises such as ‘cheep’ ‘tweet’ ‘quack’ etc. I can imagine it would get annoying incredibly quickly so I have thought about making it tweet very infrequently (once a week-ish maybe?). There is some generation with the bird call i.e. sometimes one or two calls and a large list of calls to choose from (although getting something other than ‘Tweet’ should be uncommon).

It was suggested that I make the bot tweet at sunrise/sunset which I thought was a cool idea and I may pursue it. I have looked for existing library’s to calculate these times on a day by day basis but all the (Java) librarys I found were not even close to accurate. It looks like its easiest to implement my own sunrise/sunset library; for the moment and I have an algorithm to implement and I could make use of some existing code I just need to convert.

If you want to follow my bot, it would love to have some friends and you can do so here. The Twitter Bots wiki page is here.

WhereAmI Plugin Update

So far I have made a small PHP script for displaying where I am based upon a timetable (More info at WhereAmI.) Its still not a WordPress widget because I haven,t sorted out how to call the code within widgets.

I have all the information stored in a CSV file, but I might change this at some point. Its nice having the ability to edit it with Excel, but for some reason it doesn’t like to save Comma-Separated Value files with commas… you have to keep telling Excel you want them, go figure. This was one of my first attempts at actually coding in PHP rather than changing variables in an existing script. It went quite well, however It took me a little while to realise the epoch isn’t represented as midnight on Jan 1 1970 for my apparent system time, but rather time zone adjusted… It was all a little odd. One of the features I am thinking about adding to the script after I widgitise it, is the ability to override the current value e.g. quickly set it to ‘out of the office’. This could possibly be set with an expiry before going back to the timetable. A PHP interface for setting the timetable could be nice too.