When using source modules other than Fetch Feed, the data structure is often not reflective of a RSS structure. When viewing the Pipe as RSS or on the Pipe info page, the results seem to be empty and many users ask on the message boards “why can’t I see my data?” So we created 2 new modules, the Create RSS module and RSS Item Builder Module.
The Create RSS operator module makes it easy to convert an entire list of items into an RSS stream when the input data is not in RSS format, e.g., the fields are not named correctly for RSS display and output. Both the common required fields can be set, as well as the optional, but frequently used, media extensions. To rename non-RSS elements to a RSS structure, simply select an existing element name from the drop-down list provided.
This is all done easily by mapping the item.element to the RSS Element you want. For example, I want item.name as my Title, item.ItemInfo.ChartPosition as my Description field, and item.website as my Link. Simply find the item in the dropdown next to the RSS Item you want it defined as.
If you want to further customize your fields, using the Regex Module is the easiest way. For example, in my description I want to prepend this text: “This weeks Chart Position: ” in front the text currently being rendered as the description field. I first find the item.description field and I use “^” in the “replace” text area to signify that I want to start at the beginning of the string. In the “with” text area I enter “This weeks Chart Position: “. Check the debugger pane that it came out correctly and we’re done!
With the RSS Item Builder module, you can create a single-item RSS data source by assigning values to one or more RSS attributes. RSS Item Builder can be used to create a single new RSS item from scratch, or reformat and restructure an existing item into an RSS structure. When the RSS Item Builder is used as a sub-module to the Loop module, the values from each original item can be converted to RSS. Unlike the CreateRSS module, each attribute within the RSS Item Builder can be “wired”, so you can take values from other modules.
In this RSS Item Builder example, we’ll use the RSS Item Builder to create a traffic RSS feed for San Francisco.
First we’ll use the YQL module to get the traffic data for zip code 94123. We’ll use the Loop module and embed a RSS Item Builder sub-module inside by drag and dropping it onto the target area.
We’ll map item.Title to Title, item.Description to Description, we’ll wire in an email address using the String Builder Module as my Author field, and map item.UpdateDate as my GUID.
We also want the media:content image URL to map to item.ImageUrl so we have that extra meta data that might be read by certain RSS readers.
Since I just want an RSS structure, I’ll check off the “emit all results” radio button.
We also want to see the map of where the traffic is in our Description. Using the Regex module, select item.description in the drop down and in the “replace” textbox I use “$” which is regex for appending something to the end of the string and i’ll use the String Builder again to create the image that will be appended.