WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

PiNKY Guide

PiNKY provides a set of composable services that process RSS and Atom feed information.

Scripted Feed Processes

You can construct feed processing applications by scripting together the high-level accessors provided in the PiNKY library. Many examples of usage are provided in the pinky-test module.

API Feed Processing

You can also create new feeds using any NetKernel scripting language. PiNKY uses and exports the Rome feed processing API in Java package com.sun.syndication.feed

To construct a new feed using the Rome API...

  • Construct a new SyndFeedImpl
  • Set feed metadata setTitle(), setDescription() etc
  • Construct SyndEntryImpl for each feed entry and setTitle(), setLink() etc
  • Add the entries to the feed using setEntries() with a List containing the SyndEntryImpl's
  • Return the feed as an org.pinkypipes.aspect.FeedAspect

Here is a beanshell script that creates and serves an RSS 2.0 feed...

import org.pinkypipes.aspect.*;
import com.sun.syndication.feed.synd.*;
import java.util.*;

void main()
{   //Create a new Syndication Feed
    feed=new SyndFeedImpl();
    feed.setTitle("Feed Construction Example");
    feed.setDescription("An example of API based feed development");
    feed.setLink("http://pinkypipes.org");
    feed.setFeedType("rss_2.0");
    
    //Create a new Entry
    entry=new SyndEntryImpl();
    entry.setTitle("Entry number one");
    entry.setLink("http://pinkypipes.org");
    entry.setAuthor("pjr");
    
    //Add Entries to Feed
    list=new ArrayList(1);
    list.add(entry);
    feed.setEntries(list);
    
    //Construct FeedAspect for response
    feedaspect=new FeedAspect(feed);
    context.createResponseFrom(feedaspect);
}

Javadoc

Javadoc for the Rome object model v0.9 supplied by PiNKY can be found here.