Another Sinatra app: RadioPlaying.com 3

Posted by Colin A. Bartlett Wed, 24 Sep 2008 13:34:00 GMT

I made this last night and early this morning in about an hour and a half:

http://radioplaying.com/

I’ve been listening to Philadelphia’s Radio 104.5 of late. And since I can never remember song titles, I thought it was nice that they have a page on their web site that lists the last 10 songs played. Unfortunately, it’s not very mobile-friendly. So when I’m stuck in traffic, and want to check what just played, I can use this little site.

All it does is scrape their site with Net/HTTP and Hpricot and outputs the results in an extremely bare-bones version.

Andy likes it, too, and wants to add more stations so who knows what will become of this little app. But, for now, it’s a handy tool I’ll use myself.

My first Sinatra app

Posted by Colin A. Bartlett Sat, 02 Aug 2008 16:07:00 GMT

While playing with Sinatra a bunch as part of the prep for my Philly on Rails talk, I came up with a few ideas for microapps that I thought would be perfect for Sinatra.

The first of these I call Attributr. It’s a very simple app that accepts the URL of a Flickr photo and returns that photo with proper attribution overlayed in the lower right corner. I often use photos from Flickr that are Creative Commons licensed. And I’ve often thought it would be handy to get the image with attribution right from Flickr so it’s ready to just drag into my presentation or whatever.

I used GraphicsMagick to add the text. In the past, I’ve used ImageMagick for such things, but I heard GM was easier to get installed. Indeed, it was pretty simple. On Ubuntu, it’s as easy as apt-get.

This is running on our newest production server under Passenger. I couldn’t believe how easy Rack and Passenger together make deploying tiny apps like this a breeze.

I’d love some feedback on Attributr if you ever have occasion to use it.

Sinatra talk at Philly on Rails 1

Posted by Colin A. Bartlett Thu, 31 Jul 2008 10:38:00 GMT

Last evening, I presented a short talk about Sinatra, the Ruby microframework at Philly on Rails, the Philadelphia Ruby user group. Overall, I like it and think it has a good place on the shelf of microapp tools. As with most tiny projects that begin as someone’s itch-scratching, documentation is lacking. I hope that I can contribute in that regard as I use it more.

Here are my slides and example files.

Thanks to all who came out last night!