I must admit, I’ve been inspired somewhat by Adam Curry and his crazy NoAgendaStream bot in this quest. I like the idea of using Twitter for “something more”.
So I’ve set about to create my own Twitter bot. I already have a web server that is always on, and now that server has it’s own Twitter account at twitter.com/Selphiebot. At the moment, it doesn’t do anything too exciting. Actually, as I write this it does nothing. I’m writing this sort of as I go along with the set up, partially just as a note taking device.
The other inspiration for this is my desire to easily download embedded files by putting the URL from the code. My browser always wants to auto play them and there generally isn’t a link to right click and “save as”.
My first goal on this note will be to enable Selphie to attach to wget and download files that I feed it via direct message. I’m also going to set it up to output the server’s uptime every 24 hours, mostly so Selphie has something to say. Heck, maybe I’ll go ahead and set it up to output every hour.
The first hurdle I’ve run into is that Selphie’s version of Ubuntu (Gutsy) went out of service ten days ago and I can’t get apt-get to work or any updates. So as I write this now, Selphie updates itself in the background to Hardy.
Here’s what I see needing to do, I plan to use Curl &Bash Scripts which I have zero experience with. I want to set up Curl to check periodically for new @ tweets. When it sees a new tweet, it should parse out what the @tweet says. Initially it’ll just say (more or less) if(URL)then(download).
I’ve already got thoughts for other options. I’m thinking if(torrent)then(OpenWithTorrentProgram). Also maybe if(youtube)then(DownloadWithListentoYoutube.com). For now, I need to simple download any URL passed to it with @ or DM. For now, the bot is public but if spam starts building up I’ll make it private. Alternately, I’ll set the bot to only work if I send into to it.
These are all future plans. For now I‘ve got it set up to tweet the uptime of the server as read from a text file. I’ve been having some trouble getting the scheduler to work properly unfortunately.
I’ve also gotten the basics of a preliminary conditional tweet system worked out. The next step will be to set the bot up to parse out the tweets it receives. That is however a post for another day. I’ve let this one stew long enough.