Tuesday, May 13, 2008

How to include RSS feeds into your components using OPML

It is really easy to include RSS feeds and links in your components - all you have to do is to place a buckminster.opml file in the root of your component (or tweak the properties if you want to call it something else, and place it elsewhere).

The OPML file itself has a very simple XML syntax. You start of with the usual xml declaration and declaring that you are using OPML 2.0.

<?xml version="1.0" encoding="ISO-8859-1"?>
<opml version="2.0">

This is followed by a head declaration where some information about the content of the OPML file is kept.

<title>Component information for org.demo.exampleComponent</title>
<dateCreated>Mon, 14 Apr 2008 14:18:51 GMT</dateCreated>
<ownerName>Your name, or name of project</ownerName>

And after the head comes the body part that consists of a sequence of outline elements - they can be nested if you want to use "subfolders".

<!-- outline elements --!>

A regular link (non feed) is expressed in an outline element like this:

<outline text="Cloudsmith" description="Cloudsmith's site" url="http://www.cloudsmith.com" language="unknown" title="Cloudsmith" type="link" />

And a feed is just as simple:

<outline text="My Feed" description="This is my feed" htmlUrl="http://www.somewhere.org" language="unknown" title="My Example Feed" type="rss" version="RSS2" xmlUrl="http://feeds.somewhere.org/examplefeed"/>

In both of the above examples - the "text" attribute is the label typically used in the RSS reader's bookmarks. Some OPML viewers use the title instead, and the reader may or may not show the description. Regular links (type="link") should use the "url" attribute for the link, and a feed ("type="rss") should use the "xmlUrl" attribute for the feed, but also add a link to a human readable web page - this is done by using the "htmlUrl" attribute, and it is often a link to the page where it is possible to subscribe to the feed, or read its content online.

In the feed example above, the feed type is "rss" - and the version "RSS2". A feed should always have the type set to "rss" (including atom feeds, but for atom feeds, the OPML spec is vague - I use "atom" as the version and it works just fine). These tags are mainly for a processor of the OPML itself, a feed reader will look at the actual feed to determine its type anyway. You can read more about the OPML 2.0 standard here.

And then finally, a subfolder is very simple to create:

<outline text="A Subfolder">
<outline .... />
<outline .... />

Even if the creation of a component's OPML (at least for now) is done via manual editing of XML, I hope the examples above show that it is really quite easy.

Monday, May 12, 2008

Feed your Buckminster

Did you know that Buckminster can deliver RSS feeds and links that appear in the Eclipse UI?

We wanted to make it possible to share content that relates to a component, such as a links to wiki, bugzilla, and documentation, and to RSS feeds like a version feed, open and closed issues in bugzilla, examples feed, why not a "checkin feed", or why not a feed with the lastest available plugins...

We selected the OPML 2.0 XML definition for Outline Processing - essentially describing a structure of links and feeds - or bookmarks if you like. And we decided to include this into the Buckminster model. This means that a component type can auto generate meta data from components that have extra "community" information and make this available in the form of OPML. Buckminster recognizes that a component can have an OPML file embedded in the component (by default it is called buckminster.opml and is placed in the root of the component, but it is possible to have it in some other directory and give it a different name by setting properties).

Buckminster includes two new views that makes use of the new OPML feature, a Component Explorer that shows all components known to Buckminster, and a Component Outline that follows the current selection showing the related component information.

Here is a screenshot of the Component Outline, which also shows Buckminster's integration with the RSS Owl Reader.


If you want to try out the RSS OWL integration - there is a preview available at our update site http://dev.cloudsmith.com/updates3_4 - it is based on RSS OWL 2.0 M7 but with some patches applied.

And here is a screenshot of RSS OWL showing the example feed:


Clicking on the links in RSS OWL will start buckminster materialization, or open the cquery editor!