Circulation FeedFlare – now available on Google App Engine!

Four score and many days ago, I created a FeedFlare that displayed a feed’s circulation (i.e. subscriber count) and offered it up to the world. I wrote it in Rails and ran it my hosting account, but the traffic became such that I had to shut it down.

Fast forward to earlier this year: Google announces the release of App Engine, a service that allows you to host your own web apps on Google’s world-class server infrastructure. There is much rejoicing, and wheels start to turn in my head.

In the past few days, I freed up some time to dive into Python and rewrite this flare to run on Google App Engine. I hadn’t really used Python or Django, but this was a fun opportunity to learn something new and build something people could actually use. (What a concept!)

The installation/usage instructions are posted on Google Code, so you can sneak a peek at the source as well. Here’s a screenshot of what it looks like when all is said and done:

Media_httprossbelmont_puchs

Sample output

It was a fun little project and App Engine is great, especially with the Mac launcher tool. I’m all inspired to keep going now.

Please drop me a line if you have any questions about how to use it…I’d love to know if this helps anyone out.

FeedFlare for Feed Circulation

UPDATE: Please refer to this version instead, which is updated and ready for use!


I guess it is a small world after all. A while ago I created a FeedFlare to make it easier to post your articles to digg. Wouldn’t you know it, I’m surfing the web a few days ago, minding my own business, and I see that not only is someone else actually using this FeedFlare, but posting the item to digg caused a huge traffic spike to his web site! As John ‘Hannibal’ Smith used to say, “I love it when a plan comes together.”

So, I was inspired to create another FeedFlare: Feed Circulation. If you’re lucky enough to get your item on the digg home page, this is an easy way to watch your numbers go through the roof. 😉

This FeedFlare is dynamic (meaning there’s actual code that makes it work) and uses FeedBurner’s Awareness API. So, before you use it, you’ll need to enable Awareness API access to your feed.

How can I use this for myself?

  1. Download and install this Rails app on your web host.
  2. Create a FeedFlare XML file to point to the app and include the relevant URLs, as in
    http://YOUR_DOMAIN/feedcirculation/↵
    circ?feedUrl=YOUR_FULL_FEED_URL_HERE
  3. Login to your FeedBurner account.
  4. Go to the Optimize tab.
  5. Click FeedFlare in the left menu.
  6. Copy/paste the XML file’s URL into the text box under Personal Flare and click Add New Flare.
  7. Scroll down to the bottom and click Save. (This is easy to forget.)

This doesn’t seem to work for me.

I tried to keep this pretty simple to avoid any problems, but, hey…stuff happens. To that end, I wrote this in such way that you can “debug” this a little with any web browser. If you’re having issues, hit this URL:

http://YOUR_DOMAIN/feedcirculation/↵
circ?feedUrl=YOUR_FULL_FEED_URL_HERE

(Make sure to include the full URL.) You might see an error message like the following:

Error occured (1): Feed Not Found

The error code 1 and the message Feed Not Found are returned from FeedBurner and can be looked up on this page. They’re informative, if not exactly verbose, and they should help you pin down what went wrong.

If you see a tiny snippet of XML that tells you how many subscribers you have, you’re good to go.

How does this work?

Three words: Ruby on Rails.

It’s pretty straightforward, really…it grabs your feed URI from the full feedUrl and makes a call to the FeedBurner Awareness API to pull up the number of subscribers. That number is embedded in the XML the code returns, which is then parsed and displayed in your feed or on your site.

To give credit where credit is due, the code to parse the XML returned by FeedBurner was aped from the Ruby wrapper for the Backpack API, written by DHH himself.

Enjoy.

FeedFlare: Printer-Friendly view

I got the itch to do some more coding recently, so I decided to knock out a FeedFlare I had planned on doing for a while: Printer-Friendly view, from on FeedBurner’s list of 101 Flares. What it does is hardly a mystery: it generates a simple, printer-friendly view of a given item in your feed.

How can I use this for myself?

If your blog is powered by Typo, the blogging engine written in Ruby on Rails, this will work for you without modifying the code. Just do the following:

  1. Download and install this Rails app on your web host.
  2. Create a FeedFlare XML file to point to the app and include the relevant URLs, as in
    http://yourserver.com/printerfriendly/display?↵
    feedUrl=YOUR_FULL_FEED_URL_HERE&↵
    itemUrl=YOUR_ITEM_PERMALINK_HERE
  3. Login to your FeedBurner account.
  4. Go to the Optimize tab.
  5. Click FeedFlare in the left menu.
  6. Copy/paste the XML file URL into the text box under Personal Flare and click Add New Flare.
  7. Scroll down to the bottom and click Save. (This is easy to forget.)

If you’re using one of the other blogging engines, you’ll need to download the code and tweak it to account for differences in XML formatting. That being said, if you do plan to run the code on your own, just get in touch with me by posting a comment and I’d be happy to help you change the code to work with your blogging platform.

This doesn’t seem to work for me.

Again, this is probably because the XML format of your blog’s feed is slightly different than the format expected by the code. For example, the output from WordPress has slightly different structure.

You can also try to “debug” this to some extent with your web browser. If you’re having issues, hit this URL:

http://yourserver.com/printerfriendly/display?↵
feedUrl=YOUR_FULL_FEED_URL_HERE&↵
itemUrl=YOUR_ITEM_PERMALINK_HERE

This provides a way to preview what your printer-friendly view will look like outside the context of FeedFlare.

How does this work?

First, it makes an HTTP call to pull down the feed itself, then does some XML parsing to look for the item that matches the permalink. Then, it displays the core item data in a simple web page. Done and done.

So, put another FeedFlare up on the big board. And, please leave comments if you have any.

FeedFlare item for Digg

UPDATE: Do yourself a favor and use the newer Digg This! FeedFlare provided by FeedBurner. It’s been added to the list of FeedFlares you can use right “out of the box” with no third-party monkey business.

If you have a blog, or publish any kind of information over an RSS feed, you should probably be using FeedBurner to manage your feed. In a nutshell, FeedBurner provides a boatload of free services to make dealing with your RSS feed easier.

My favorite example is something they call BrowserFriendly. As you may already know, your RSS feed itself is just an XML file. So, the “click here for my RSS feed” link you put on your blog is just a link to that file, or some mechanism that spits out that file. So, for someone who isn’t sure what RSS is, they may click that link and see a bunch of raw, ugly XML.

This happened to a friend of mine recently. (Honest to God.) He saw that I have a blog and asked me “what RSS is all about.” He said that when he clicks “the orange XML thing on these web sites, it doesn’t do anything.” FeedBurner’s BrowserFriendly feature solves this problem by showing the user a nicely styled version of the data in the XML file, along with some text explaining what subscribing to the feed is all about.

BrowserFriendly is just one (easy to understand) example. FeedBurner provides lots of other functionality as well, particularly if you’re a commercial publisher and you want to display ads in your feed. But, another fun service they provide is something called FeedFlare.

FeedFlare

FeedFlare is what provides the Email this, Subscribe to this feed, etc. links you see at the bottom of each post. Though you may be able to customize your blogging software to provide similar functionality, I think this is better because it automatically appears as part of your feed, wherever it’s being read.

In the past day or so, FeedBurner has opened up this service so that anyone can create their own FeedFlare item. They’ve also posted a list of 101 possible ideas for FeedFlare, and a call for people to create them. So, here’s my submission for #19…a little something I like to call Digg this. (SEE UPDATE ABOVE.) It’s not rocket science; just a quick little way to submit the current post to the digg.com tech news site, much in the same vein as the Add to del.icio.us links you see popping up on the web.

So, here’s hoping you take your feeds to the next level with FeedBurner, and write something cool enough to make it to the Digg home page!