It started with Peter and the Wolf.
I’ve been wanting to play with Markoved text for some time, using books available in the public domain, easily accessible via Gutenberg. The idea in my head was to create a Twitter bot that would mash Peter Pan together with Call of the Wild (although later I realized that Beowulf would be the better option) and tweet lines from the merged books. As I dug into this project, I realized that the mash-up text wasn’t really interesting enough to hold its own as a bot, but I did like combining different texts to see the results. After while I realized that the *more interesting* challenge would be to build an app where any two (or more) Gutenberg texts can be combined. Behold, the #notbot!
(And yes, I got my Peter and the Wolf in there.) Go play, and then come back and I will show you how I built it:
Look, I made a thing!
I took a giant leap this week in my knowledge base, learning and launching my first Rails application. It tracks robots that you would like to build. If you don’t build robots, it has no real practical purpose other than meeting the objectives of the assignment.
For those who don’t know, Rails is… how to describe this. It’s frequently paired with Ruby and it’s a thing you stick your Ruby code into to make it a lot more complicated. Kinda. I still don’t really see the point. It connects your code to a database so you and other people can store things. In theory you could design and run a weblog from a Ruby on Rails app instead of using, say, WordPress (hey that’s not a bad idea). (Except that any entry would probably take 50 hours and like 17 file updates.)
Suffice it to say, I have a lot to learn still about Rails.
But my app works! Go add a robot! This completes the three application assignments, so I’ll tinker this weekend and submit on Monday. I am hoping to gain official acceptance before August 10th, which is the scholarship application deadline.
Some thoughts on Rails:
OK, you want to talk bots? Let’s talk bots! First, let’s go back…
WAAAAAY back. A few weeks ago, I got a nice mention on Twitter from a procrastinating grad student who found my tutorial and used it to set up Ecce , a Publilius Syrus twitterbot (I had to wikipedia that).
finishing the bot
how you have to finish the bot…
how you watch the rest of the world from a window–
while you finish the bot
mapping out a .py
what you feel for twitter’s API
what you feel when errors that come through heroku go
“tweet status update failed on third try…”
My bot is now deployed and fully-functioning out in The Cloud, thanks to Joel!
>>Ok I have a twitter bot and I want to run it but not from my personal computer, help
The above link tells the story of how I went from here (functioning bot, living on my laptop) to here (functioning bot, living on GitHub/running on heroku). First, you’ll need to install heroku and follow the directions to get started, here. After that, follow Joel’s directions and you’re golden.
I hope you didn’t have other things to do today.
This is part 2 of the tutorial.
Part 1: Build a Twitter Bot with Python
Part 3: Top Bot