Twitter bot

Mar. 2nd, 2011 10:25 am
jodi: (Default)
I decided to start learning Python by creating a Twitter bot. I have an online diary, that I have been keeping for over a decade now, and I decided that I would output lines from it as tweets, so that I could keep in touch with my younger self. If you want to see it in action: Echochild.

Things I found odd to start with in Python )

There are quite a few Python to Twitter packages, but in the end, I decided upon Tweepy.Installing Tweepy )

I formatted the diary entries, using Vi, so that there is just one sentence per line.

I got the appropriate authorisation tokens from Twitter: consumer token, consumer secret, etc.

Due to access restrictions, I am unable to run cron jobs or leave things running in the background, so concluded that being able to tweet just by going to a web page would do. Not quite automatic, but still, will do for now.

I then created a CGI script in the joshthecoder-tweepy-fcaff74 directory.CGI script )

The next thing to do is make it actually reply to people!

Arduino

Jan. 16th, 2011 10:28 pm
jodi: (Default)
When I first got an Arduino, I made the LED blink and read about all the cool things I could do with it in Making Things Talk and in various Instructables. I also heard about all the exciting things people at BarCamps were doing with Ardunios, but still I ignored mine.

Today, I actually plugged it in again, and yes, again all I have done is make the LED flash, but now it flashes when people say certain things on Twitter. (I read Adrian McEwan's How to Build a Twitter-monitoring Alertuino and used the Alertuino code.) A flashing LED is not quite as fun as bubbles being automatically blown, but it is a start.

I thought about making an end of the world detector, but people talk about the end of the world far too frequently on Twitter. Maybe I need to add a Geiger counter?

More Arduino related ideas: Top 40 Arduino Projects of the Web. Botanicalls Twittering Plants would be useful as I have a tendency to over water my plants. High speed photography would help me create awesome photos.

April 2014

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Syndicate

RSS Atom

Expand Cut Tags

No cut tags