This project is read-only.

FeedSync Utilities for .NET Framework additional info

Dec 14, 2009 at 3:09 PM

The FeedSyncLibrary.dll assembly, which is the most important part of the solution as it provides the core FeedSync functionality including:

  • Create a new feed
  • Get the collection of items in a feed
  • Get a specific item in a feed
  • Add an item to a feed
  • Update an item in a feed
  • Delete an item in a feed
  • Resolve conflicts for an item in a feed
  • Get the list of item changes detected between 2 feeds
  • Merge the items of 2 feeds

The library has two classes that are used as base classes for different container and item formats:  FeedSyncFeed and FeedSyncItem.  With just these classes, you have the equivalent of a Plain Old XML (POX) feed implementation of FeedSync.  Note that a POX feed does not have some of the attributes/content found in common feed formats like RSS and Atom – for example, you would not find <title> or <description> elements in a POX feed. 

In addition to the two base classes, there are 2 derived classes that provide support for RSS feeds:  RSSFeed and RSSFeedSyncItem.  These classes are heavily used by the accompanying command line utilities, as well as various solutions created by the Concept Development Team.  Note that it should be relatively easy to create derived classes to provide support for Atom feeds, or any other feed format for that matter, by looking at the RSS implementation.

There are 5 command line utilities, all based on the FeedSyncLibary.dll assembly, that are a part of the solution:

  • FeedSyncConvert – This utility takes a regular RSS Feed as input, adds the necessary FeedSync metadata so that it can be used for synchronization scenarios and produces the modified RSS feed as output
  • FeedSyncCreate – This utility takes a RSS Feed (w/FeedSync metadata) as input, adds a new RSS item (w/FeedSync metadata) corresponding to the specified arguments and produces the modified RSS feed as output
  • FeedSyncDelete – This utility takes a RSS Feed (w/FeedSync metadata) as input, marks an existing RSS item as deleted (via FeedSync metatdata) and produces the modified RSS feed as output
  • FeedSyncUpdate –  This utility takes a RSS Feed (w/FeedSync metadata) as input, updates an existing RSS item (w/FeedSync metadata) using the specified arguments and produces the modified RSS feed as output
  • FeedSyncMerge –  This utilitiy takes 2 RSS Feeds (w/FeedSync metadata) as input, synchronizes the items in the 2 feeds and produces the resulting RSS feed as output

While you can run each one of the command line utilities individually, you can also create batch scripts that run one or more of them together.  For an example of this, open a command prompt and go to the ‘…\FeedSync Utilities\bin\debug’ directory, then type ‘rsstestscript.bat rsstodolist.xml’.  If you are familiar with the FeedSync JavaScript tutorial then the output should look familiar to you.