Archive for rss

rss feeds and readers, oh my

Overview

Now, it is with some chagrin that I admit I didn’t cotton to rss/atom/other feeds until earlier this year. When Google released its Google Reader, I played around with it, since I tend to check out most of their toys anyway.

Well.

Whether you’re a geek like me or not, it’s worth learning how to use feeds. And yet, since I brushed them off and didn’t even consider their utility for some time, I’m writing up about them here to clarify why they’re so handy and how they can be used.

There’s two concepts to cover here. First is the feed itself. Although I see them called “RSS” or “Atom” or “subscriptions” and so on, technically they’re just “feeds” — rss, atom, xml, etc are different formats for the feed. Think of a feed as a broadcast of a web page. Instead of a user going TO a webpage, a user looks at a broadcast FROM the webpage. What’s the distinction? I can tell all the particular feeds I’m interested to come to a single place (i.e., aggregate) and I can then read them in that place, all together. Since any kind of webpage can broadcast a feed, there are feeds available for blogs, online news sites, photo sites, podcasts, and even video blogs (known by the awful “vlogs” contraction). Since most blogging software comes bundled with setups for feed broadcasts, chances are a blog I find interesting I can add to my collection of feeds.

Which brings me to the second part, the feed reader (or feed aggregator). A feed reader will take my list of feeds (or my subscription list) and fetch their latest broadcasts and then present them to me. The resulting presentation will not look like the original website pages but are instead a simplified layout. I can even opt for synopsis rather than full articles. I actually find this simplification to be a blessing in many cases; not only to avoid some horrible layouts or clashing colours or lots of adbling, but also with a standardized reader layout I can concentrate more on the content of what I’m reading. Depending on the particlar feed reader, I can browse through lists of the subscriptions, lists of their currently unread articles (by title or by title and synopsys), or at the unread contents. The exact options and layout varies by reader, of course. In some cases, only a synopsis is actually broadcast. In other cases, everything is sent, down to images used for the particular article, and I can choose whether to display these as a synopsis or in their entirety. Which I can choose to do therefore also depends on the sort of information the feed contains.

To give a scenario: I have a collection of subscriptions to daily comic strip publications. So I group these subscriptions into a single folder or group (also called outlines or tags or categories, etc). I also mark them for full display. Now when I choose to see my comics subscriptions, I get a single page with all of the latest comic strip publications laid out one after the other. I can just browse this single page, reading nothing but the exact comic strips I want. It’s better than the newspaper comic page!

There’s a fairly dry summary here and a bit more of an interesting summary here, especially in the Usage and History sections.

Read the rest of this entry »

del.icio.us:rss feeds and readers, oh my  digg:rss feeds and readers, oh my

Comments (1)

examining rss feeds

In bloglines, I notice some subscriptions have either their favicons appear on the subscription link (for example, any blog powered by Blogger), or have a small graphic that appears in the header (for example, wunderground.com’s weather channels). My DR subscription, though, doesn’t show any icons or graphics. This therefore has to be something that’s being sent by the feed.

Feeds come in three basic flavors these days — as I understand it, Atom is the newest kid on the block, the most widely used is probably RSS 2.0, and RSS 1 is still used by a few places but largely deprecated in favor of RSS 2. I found all the usual disagreements over which was the best, which would be most easily extensible in the future and so on and so forth. In the end, though it seems to me that much of the time a site will offer both Atom and RSS2.

Atom and RSS 2 provide a means to package up a site (an HTML page) into an XML representation which can then be used by a feed reader and/or aggregator, to put up the info about the site into the aggregator/feed reader. If you use Bloglines (or Google Reader, or any of a dozen other similar programs out there), that XML is what they’re using to snag info from your subscriptions. These programs will query your subscription sites regularly for any updates and download those into your reader.

To see your own WordPress atom and rss2 feeds, add feed/atom to your WordPress blog address, and just feed for rss2. So for example, DR’s RSS2 feed is at http://www.digitalramble.com/feed and it’s atom feed at http://www.digitalramble.com/feed/atom. Note that to see the atom feed, you’ll have to save it to a file and open it with a text editor (browsers do not “recognize” Atom pages yet.)

In tracking down the feeds for these examples, I found XML descriptors of the format channel->description->image->url and the url’s would be the locations of the images being used. Obviously, my own feed generators are not doing this, because even though I jumped through all the hoops to get favicons up for my site, they’re not showing up in a Bloglines subscription.

I, of course, must fix this.

So WordPress generates two feeds in a basic setup (at least, basic here at DreamHost?). I have three relevant files in my top wordpress directory: wp-atom.php, wp-rss.php, and wp-rss2.php. Because RSS 2’s so popular, let’s look at that one first. There’s a RSS 2 specification here. So as an experiment, I edit the wp-rss2.php file to contain

<image>
<link>http://digitalramble.com/</link>
<url>http://digitalramble/wordpress/favinit.gif</url>
<title>Digital Ramble</title>
</image>

Of course once I get into the php file and look around, I change this to use the same php bloginfo to genericize it:

        <image>
                <link><?php bloginfo_rss('url') ?></link>
                <url><?php echo get_option('siteurl'); ?>/favinit.gif</url>
                <title><?php bloginfo_rss('name'); ?></title>
        </image>

This isn’t perfectly ideal of course. Seems like there should be a favicon per theme, which loads in with the theme, and updates the icon in the browser tabs, bookmarks, and feeds. As it is, I’ve only got one favicon installed, and if I change things around I would have to change the current theme’s header.php, and the wp-content’s atom/rss generators.

Maybe I should make this a plugin, for the experience of creating an addition to the Dashboard, where you can enter your favicon, and then add the appropriate calls in your atom/rss2 feeds and your header…hmmm not a bad idea. Not today though :) This is just proof of concept.

OK, onto Atom. Googling around, I find its specification here. In scanning down this file, I find the relevant item: atom:icon about half way down the text. This looks like it. Here’s what it says:

The “atom:icon” element’s content is an IRI reference [RFC3987] that identifies an image that provides iconic visual identification for a feed.

atomIcon = element atom:icon {
   atomCommonAttributes,
   (atomUri)
}

The image SHOULD have an aspect ratio of one (horizontal) to one (vertical) and SHOULD be suitable for presentation at a small size.

There’s also atom:logo which is almost the same, except for a 2:1 horizontal:vertical aspect ratio. OK, so after some tinkering around, I decide on adding:

<icon><?php echo get_option('siteurl'); ?>/favinit.gif"</icon>

I’m not as certain of this one, because the atom feeds I was able to look at, on sites that have icons showing (such as DistroWatch), don’t seem to contain any icon information in their atom description! I did come across some comments that some aggregator sites will just pull the favicons from the feeding sites (but in that case the favicon.ico I have in my root directory should show up, unless that’s not really the root directory, which could well be the case…)

Now to publish this so I can see the results if any in Bloglines…!

del.icio.us:examining rss feeds  digg:examining rss feeds

Comments

Bad Behavior has blocked 953 access attempts in the last 7 days.