RSS+uTorrent+BTC for Automated torrent downloading

Want to tell uTorrent what to do via Ruby? Read on.

First, you need to enable the uTorrent local interface in the application. Then go install btc (instructions on

Make sure Ruby is installed. And get the rss gem:

gem install rss

Then create a file called rss.rb and throw this in there:

## START FILE rss.rb
require 'rss'
require 'open-uri'
require 'cgi'
# URL to your Tracker -- Mine looked like
# https:///rss.php?feed=dl&bookmarks=on&passkey=#{PASSKEY}
# Note you need to define this or I'll raise an exception on you!
# url = "https:///rss.php?feed=dl&bookmarks=on&passkey=#{PASSKEY}"
raise "Did you define the url?" unless defined?(url)
torrent_list = `btc list`
open(url) do |rss|
  feed = RSS::Parser.parse(rss)
  puts "#{} -- Title: #{}"
  feed.items.each do |item|
    puts "Item: #{item.title}"
    if torrent_list.include? item.title
      puts "Skipping torrent, already in uTorrent"
      puts "Downloading torrent #{item.title}"
      `btc add #{}`
## END FILE rss.rb

To test, simply run this at command line:

ruby rss.rb

To automate, add a job to your cron tab. From command line (Make sure to set the directory to the right location.):

crontab -e

Add a rule to run this script every minute:

* * * * * cd /Users/ephtoaster/torrenter/ && ruby rss.rb > runs.log

My whole crontab looks like:

* * * * * cd /Users/ephtoaster/torrenter/ && ruby rss.rb > runs.log

EmberJS & EmberConf

The first official ember.js conference was held on March 25-26 in Portland, OR and my company was a sponsor. I was excited to be a sponsor because I think ember.js is a step in the right direction for web development and I’d say it has the potential to be the first viral JavaScript web framework. I’m pretty impressed with the framework and the people behind it. And at the end of the day, it aligns with my belief that the web browser will be the focal point of many forthcoming innovations; anything that moves it and its development platform forward will be a priority for me.

As someone who has built many web applications, I’ve seen the benefits that great frameworks can have on communities, ecosystems, and technology. To speculate on the impact ember.js could have on web development, I wanted to write about Ruby on Rails. I believe there are parallels to the two frameworks.

I like to study products and why some win and some fail so I thought it would be fun to apply some thought to why Rails has had success. Great products are often viral in some nature and the key to virality is an experience that gets better as the number of users interacting increases. I think Rails may have been the very first viral web application framework. (I think ember.js could be the next one)

Over the last decade, web frameworks started popping up at higher frequencies and one of them was Ruby on Rails. Ruby was a relatively unknown programming language. Modern web frameworks were in bad shape. Building web applications was not as easy as Rails would soon make it. First, Rails popularized Ruby. Then Rails promised, and delivered, the reduction of massive boilerplate web application code. Ultimately, Rails had this powerful combination: building web applications were curiously simple & instantly gratifying. Since its release, Rails has become one of the most widely used web application frameworks.

The act of building a web application has become… fun. New ideas can be built in minutes and days rather than months. Rails made building web sites more approachable (and it sped things up heavily). Beyond the build, though, Rails was open source so you could add more features to it, which made the experience of building even better for others. When you combine a great experience around building a web application with a framework that is constantly expanding, enabling you to do more with less, you ultimately have an community that was constantly improving. I call this improvement pattern the cyclical improvement vortex. While Rails started to evolve rapidly, the greater ecosystem was getting pulled into the storm and all of these other frameworks were being rapidly improved (and many new ones created). The end result was far superior options for developers and better tooling across the board. We had more choices. We started to have more fun.

Here are a few examples that highlight how this cyclical improvement vortex attracts innovation inside and outside of the frameworks and around the community. A popular framework can become an opportunity for a new business to launch, a technology to become popular, and a generation of people to learn to code. is a hosting platform that launched to support seamless deployment of Ruby on Rails applications to the cloud. Developers could build their Rails applications and then easily put that code up on to the Internet in seconds. Previously, you’d typically have to purchase a web hosting server and customize that server and then upload your code and do all of these manual steps. Heroku made everything simple and developer-friendly. Fast forward: they now support almost every popular framework and programming language and thousands (and thousands) of companies rely upon them for deployment.

Asynchronous JavaScript (Ajax) is a programming technique for web applications to communicate with the server behind the scenes. Microsoft created the components that would make Ajax possible around 1998 but it went relatively unused for years. Rails baked Ajax into the framework and really encouraged (and pushed) many web applications towards taking advantage of the somewhat neglected technology. Today, you’d be hard pressed to find a web site not using Ajax; Rails didn’t create Ajax but it helped put it on the map.

Ruby, the programing language, has continued to benefit from the popularity of Ruby on Rails. It’s gotten faster, scales more efficiently, and is easier to work with. Thousands of companies have realized Ruby as a language of choice for building software. It will live on with or without Rails. I’m glad about that.

Beyond the infrastructure and technology, though, Ruby on Rails also had an impact on education in web programming. Folks felt it was so easy to get started with that Rails became the center focus of curriculum in many high schools, colleges, and developer boot camp programs (2-6 month learning engagements) . It is an approachable framework with a fair amount of educational literature on. A vibrant community of software engineers, designers, and educators can build ideas using Rails and that’s pretty awesome.

So to tie this back to ember.js…

ember.js is one of the newer frameworks on the block and is similar to Ruby on Rails. The difference is that it is built on top of JavaScript instead of Ruby. JavaScript very well may be the language of the future given every web browser understands it and we’re building more and more of our web applications to run in the web browser. Like Ruby long ago, JavaScript needs a popular framework that is going to drive innovation. I think ember.js is JavaScript’s Rails and I believe it is part of the next wave of forward-thinking technology and will make web development better. Some of the folks involved with ember.js were also involved with Ruby on Rails. Yehuda Katz, for example, is a core contributor to both frameworks and is all about building great communities. I think ember.js has the technical and social ingredients to be a popular, widely adopted framework. It very well may be the next viral web framework.

Thanks to Loren A, Tian D , Andrew L, Ethan K for taking peeks at this piece as it evolved.