Userland, mainly Dave and Jake, took some pain in making sure that Radio's news aggregator would be able to cope with emerging syndication formats.
Radio's aggregator has a driver structure, which enables developers to create handlers for formats different from ScriptingNews or RSS.
It also feature module drivers, a convenient way of adding handlers for new RSS 2.0 modules/name spaces.
The enhancedAggregator tool is an integration testbed for new syndication formats.
The tool also delivers state of the art installation / uninstallation code, a browser based preferences interface, and automatic/manual update code from a webEdit server operated by Precision IT Management (this is all a side benefit of my work on activeRenderer).
Developers interested in releasing updates to the tool should contact me to obtain free accounts on the webEdit server, more further below.
I'd like the enhancedAggregator to become a community driven project, allowing Frontier/Radio developers to easily test aggregation of new syndication formats and extensions, without mobilizing Userland scarse resources.
Once a format and implementation has stabilized, Userland could transfer any relevant part of the tool's code to the main Radio distribution with minimal efforts involved.
So, if you're interested in contributing new features to Radio's aggregator, start by downloading the code to enhancedAggregator and expanding this paragraph.
By the way, if you're not a developer but would like to check out new formats in your aggregator, this is perfectly fine too, be our guest :-)
Here are some guidelines for supporting additional formats in the enhancedAggregator:
Start buy creating a new subtable in enhancedAggregatorSuite, with the name of the format you intend to add (duplicating/renaming enhancedAggregatorSuite.atom would work fine).
The actual handling code for a new format should reside in the compile script. It's good practise to place the compile script inside a formatDriver subtable of your just created format table.
Take a look at enhancedAggregatorSuite.atom.formatDriver.compile for a start.
The Userland documentation for format drivers can be found here.
The code for the main Userland format compiler can be found in the system.verbs.builtins.xml.rss.compileService script in Radio.root.
The minimum job of the compile script is to scan a table of the feed's content, placed by Radio's aggregator in a table at [aggregatorData.root].services.[url_of_the_feed].xmlstruct, and to create a 'compiled', that is organized, aggregation ready table in [aggregatorData.root].services.[url_of_the_feed].compilation.
Optionally - this should depend on a user defined preference - the compile script should modify the [aggregatorData.root].stories table if you want the compiled elements to become available to Radio's News Page, as opposed to a dedicated tool.
Supporting RSS modules is very similar to formats:
Start by duplicating and renaming the enhancedAggregatorSuite.ent table for your own driver.
The handling code for all the modules elements lives under a moduleDriver subtable.
moduleDriver tables are made of dedicated scripts and subtables, as detailed in this Userland doc.
Scripts must be named after the XML element they handle.
All channel sub elements should have handler scripts in the subElementOfChannel table.
Likewise for sub elements of item or rss tags: subElementOfItem and subElementOfRss.
Once you're finished writing your format/module drivers, add some ancillary code :
First create a set of preferences for your format/module in enhancedAggregatorData.prefs
The bare minimum is a boolean to enable/disable support for your format or module in Radio - eg. enhancedAggregatorData.prefs.supportEnt or enhancedAggregatorData.prefs.supportAtom.
Another option to alter the display of Radio's news page is a good idea if you intend to offer the possibility - eg. enhancedAggregatorData.prefs.displayTopics.
Then create an instal script for your format or module in the format/module's table.
The instal script is responsible for installing / uninstalling the proper hooks in Radio's driver structure according to the current pref.
Check out enhancedAggregatorSuite.ent.instal or enhancedAggregator.atom.instal for examples of such code.
Then modify the enhancedAggregatorData.ui.prefs.template outline and enhancedAggregatorSuite.ui.prefs.edit script.
This provides the user a way of modifying your format/module's preferences in the browser when clicking on enhancedAggregator in the Radio's desktop home page's status center, or Tools page.
Finally update the enhancedAggregatorSuite.instal and enhancedAggregatorSuite.scratchpad.uninstal scripts.
This adds proper installation of your drivers when Radio starts and uninstallation when the tool is deactivated from Radio's Tools desktop website page or removed from the Tools folder altogether.
That's it, it actually took me longer to write these instructions than to add a skeleton module for ESF :-)
Once your module is properly debugged, you can contribute it to the community by updating the enhancedAggregator root distribution.
To do this, you need to get an account on a webEdit server from from Precision IT Management, and instal access to the webEdit client on your Radio copy.
Both steps should not take more than 5 minutes, contact me whenever you're ready.




