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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s