activeRenderer provides rendering web services through both REST and XML-RPC APIs.
RESTful API calls are regular HTTP GET requests.
REST APIs are very easy to experiment with.
To test all the API parameters, click the 'settings' button on the activeRenderer demo page at http://demo.activerenderer.com/
Check the 'display in new window' box, and use your browser's 'View source' menu option to study the rendered output, according to the value of the 'output' parameter.
The activeRenderer REST server answers at http://api.activerenderer.com/activeRenderer/render/
If you are running Radio on the same machine as the service's client, you may call the server at http://127.0.0.1:5335/activeRenderer/render/
You need to add parameters to the server's URL: http://api.activerenderer.com/activeRenderer/render/?param=value¶m=value...
As you can see, the separator between the URL and the first parameter name is a question mark (?).
Values are assigned to their parameter name by the equal sign (=).
Separators between a value and the next parameter name are ampersands (&).
You can add any number of parameters from the following list, only the first one, src, is mandatory.
Parameters list
Generic
src (mandatory)
URL of the RSS or OPML file to render.
Must start with "http://" for online documents,
or "file://" for local ones.
output
Specifies output format.
Defaults to 'html': fully formed HTML page
Use the default format to render 'src' in an IFRAME, a FRAME or a different browser window.
Other values:
text:
HTML rendering of 'src', without the full HTML header/body structure.
Use this output format to retrieve the HTML rendering of 'src' in a string variable when using another programming language, such as Perl, Python or PHP.
js:
Javascript call to the 'includeHtml' function, with the HTML rendering of 'src' passed as a string parameter.
Use this output format from Javascript, defining the includeHtml function according to your needs.
uniqId
Stem for all outline node ids generation.
cssClassName
CSS class name stem for rendered outline nodes, defaults to 'active'
cssClassLevel
starting depth for all generated outline nodes, default is 0.
flOutliner
add additional HTML rendering for outliner support in browser if flOutliner=yes, do not if flOutliner parameter is absent from request.
Specific to OPML rendering
linkAttribute
name of the attribute designating a link attachments to outline nodes.
activeRenderer tries this parameter first, then 'url', then 'xmlUrl'.
opmlCall
name of the Javascript function called to render OPML links transclusion.
defaults to 'transclude'.
rssCall
name of the Javascript function called to render RSS links transclusion.
defaults to 'transclude'.
imgCall
name of the Javascript function called to render picture files (GIF, JPG or PNG) transclusion.
defaults to 'imgLoad'.
mmCall
name of the Javascript function called to render multimedia files (QT and SWF) transclusion.
defaults to 'mmLoad'.
htmlCall
name of the Javascript function called to render HTML links.
defaults to 'pageLoad'.
targetFrame
name of the destination frame of HTML links.
defaults to same frame as link of origine.
flDisplayHTMLWedge
render link type attributes linking to HTML content as a 'page' wedge if flDisplayHTMLWedge=yes, as regular HTML links if flDisplayHTMLWedge parameter is absent from request.
flDisplayDirectives
render nodes starting with '#' (Frontier directives) if flDisplayDirectives=yes, do not if flDisplayDirectives is absent from request
Specific to RSS rendering
itemCnt
number of RSS items to render, starting from top, default is 0 for all.
expandedCnt
number of item nodes to render as expanded, starting from top, default is 0 for none.
titleWordCnt
maximum number of words per title nodes, default is 0 for all.
flIncludeChannelTitle
include the RSS channel's title if flIncludeChannelTitle=yes, do not if absent from request.
flCollapseChannelTitle
render RSS Channel title as collapsed if flCollapseChannelTitle=yes, as expanded if absent from request.
flCreateHeader
creates a header node out of each RSS item description's first sentence if flCreateHeader=yes, do not create a header node if absent from request.
flFilterImages
replaces img HTML tags with '[image]', linking to the image file in a different window, if flFilterImages=yes, no image filtering if absent from request.
flFilterQuotes
replaces blockquote HTML tags with divs of class rssQuote if flFilterQuotes=yes, no blockquotes filtering if absent from request.
flRenderContentTag
uses content:encoded tag of RSS 1.0 and RSS 2.0 to render each item's body node if flRenderContentTag=yes, uses description tag instead if absent from request.
flTitleLink
Defaults to false.
When true, a link is inserted around the last word of each item's title if a link is provided with the item.
Specific to HTML (default) output
template
Specifies the url of an HTML template file to replace the default rendering template.
The template is a regular HTML page, where the source's rendered content is marked up as ##body##.
The aR web service merely replaces the ##body## tag with the proper HTML code for the rendered outline.
The template's header must include links to aR's stylesheet and javascript code. Check out the Implementation notes at the end of this document.
Example
Assuming you have a 'myTemplate.html' template file available in the 'gems' folder of your site.
The template parameter would be specified as: &template=http://my.site.com/gems/myTemplate.html.
XML-RPC transmits XML formatted function calls and returned values through HTTP POST requests.
XML-RPC is great for calling rendering services from other programming languages, provided these languages support XML-RPC natively or through a library.
Here are a few XML-RPC links.
Java
Apache XML-RPC
Marquee XML-RPC
Javascript
XML-RPC Message Builder
vcXMLRPC Library
Mozilla
Perl
RPC::XML
SOAP::Lite
Frontier::RPC
PHP
xmlrpc-epi-php
xmlrpc library
Python
xmlrpclib
py-xmlrpc
Usertalk
Other resources
The activeRenderer XML-RPC server answers at http:://rpc.activerenderer.com/, on port 80.
You can call 2 rendering functions. Both functions return a string, including the HTML rendering of the string you've passed as first parameter, but not including the full HTML header/body structure.
activeRenderer.opmlRenderer
Parameters (in sequence):
opml
string, mandatory.
the OPML formatted text you want to render as dynamic HTML.
uniqId
string, empty by default.
optional prefix for all outline node divs id generation.
cssClassName
string, defaults to "active".
CSS class name stem for rendered node divs.
cssClassLevel
integer, defaults to 0.
starting depth for all generated outline nodes.
link
string, defaults to "url"
name of the attribute designating a link attachments to outline nodes.
activeRenderer tries this parameter first, then 'url', then 'xmlUrl'.
opmlCall
string, defaults to "transclude"
name of the Javascript function called to render OPML links transclusion.
imgCall
string, defaults to "imgLoad"
name of the Javascript function called to render picture files (GIF, JPG or PNG) transclusion.
rssCall
string, defaults to "transclude"
name of the Javascript function called to render RSS links transclusion.
mmCall
string, defaults to "mmLoad"
name of the Javascript function called to render multimedia files (QT and SWF) transclusion.
htmlCall
string, defaults to "pageLoad"
name of the Javascript function called to render simple HTML links.
targetFrame
string, empty by defaults, links are opened in the same frame/window as source.
name of the destination frame for rendered HTML links.
flDisplayHTMLWedge
boolean, false by default.
when true, render link type attributes linking to HTML content as 'page' node wedges.
when false, render them as regular HTML links.
flOutliner
boolean, false by default.
when true, adds additional HTML rendering for outliner-type functions support in the browser.
this is only useful if you are trying to create a full web based outliner :-)
flDisplayDirectives
boolean, false by default
when true, render outline nodes starting with # (Frontier directives).
when false, skip nodes with Frontier directives.
flRoll
boolean, false by default
when true, modify HTML rendering to better fit blogrolls (deprecated).
activeRenderer.rssRenderer
Parameters (in sequence):
rss
string, mandatory.
the RSS formatted text you want to render as dynamic HTML.
uniqId
string, empty by default.
optional prefix for all outline node divs id generation.
cssClassName
string, defaults to "active".
CSS class name stem for rendered node divs.
cssClassLevel
integer, defaults to 0.
starting depth for all generated outline nodes.
flIncludeChannelTitle
boolean, false by default.
when true, include the RSS channel's title as first node.
flCollapseChannelTitle
boolean, false by default.
when true and flIncludeChannelTitle is true, render the RSS Channel title node as collapsed.
itemCnt
integer, defaults to 0, render all items.
number of RSS items to render, starting from top.
expandedCnt
integer, defaults to 0 for none.
number of item nodes to render as expanded, starting from top.
titleWordCnt
integer, defaults to 0 for all words.
maximum number of words per title nodes.
flCreateHeader
boolean, false by default.
when true, creates a header node out of each RSS item description's first sentence.
when false, do not create header nodes.
flOutliner
boolean, false by default.
when true, adds additional HTML rendering for outliner-type functions support in the browser.
this is only useful if you are trying to create a full web based outliner :-)
opmlCall
string, defaults to "transclude"
name of the Javascript function called to render OPML links transclusion.
imgCall
string, defaults to "imgLoad"
name of the Javascript function called to render picture files (GIF, JPG or PNG) transclusion.
rssCall
string, defaults to "transclude"
name of the Javascript function called to render RSS links transclusion.
mmCall
string, defaults to "mmLoad"
name of the Javascript function called to render multimedia files (QT and SWF) transclusion.
htmlCall
string, defaults to "pageLoad"
name of the Javascript function called to render simple HTML links.
flDisplayHTMLWedge
boolean, false by default.
when true, render link type attributes linking to HTML content as 'page' node wedges.
when false, render them as regular HTML links.
flRoll
boolean, false by default
when true, modify HTML rendering to better fit blogrolls (deprecated).
targetFrame
string, empty by defaults, links are opened in the same frame/window as source.
name of the destination frame for rendered HTML links.
flFilterImages
boolean, false by default.
when true, replaces img HTML tags with '[image]', linking to the image file in a different window.
flFilterQuotes
boolean, false by default.
when true, replaces blockquote HTML tags with divs of class rssQuote.
flRenderContentTag
boolean, false by default.
when true, uses the content:encoded tag of RSS 1.0 and RSS 2.0 to render each item's body node.
when false, uses the description tag.
flTitleLink
Defaults to false.
When true, a link is inserted around the last word of each item's title if a link is provided with the item.
Implementation notes
The dynamic HTML code generated by activeRenderer relies on 2 external resources:
A Javascript program: activerenderer.js
A CSS stylesheet: activerenderer.css
When generating HTML pages from your application, remember to include links to those 2 files in your page header, linking either to the files on the activerenderer.com site, or - best - to your own versions stored on your server.
Entering the following code in Radio's quickscript editor will render your subscriptions list by calling the activeRenderer RPC server. No need to instal activeRenderer :-)
A quick note: the new upstreaming scheme provided with Radio's Uptreaming Beta will break the normal automatic upstreaming of outlines saved in 'outlines' or 'opml' folders under Radio's root folder ('www') or any Radio category folder.
I have a fix ready in activeRenderer version 2.5.2, but other features of 2.5.2 are not quite ready for release yet.
I'll announce vs 2.5.2 soon on the ar-announce list.
In the meantime, any beta-tester who wants the fix right now can get a pre-release aR 2.5.2 update by dropping me a line directly.
While they are not using Radio Userland as their publication tool, they've made a great use of the public activeRenderer web service and its XML-RPC API to create outlined show notes for their podcasts.
[image] Thanks to the audio transcluding feature of activeRenderer 2.5 built into the web service, you can listen to their podcasts directly inside the show note page by clicking the small 'loudspeaker' wedge icon in the 'MP3 File' paragraph.
Starting with version 2.5, activeRenderer provides a way to include part of the outline's content into the URL specifying a transcluding link.
If you think this is gibberish...
You're probably right.
A small example will probably make things clearer, at least if you are reading this directly on the activeRenderer News site.
Click on the 'page' wedge icon to the left of the next paragraph to learn what MSDN can report about activeRenderer. activeRenderer The URL of the link attached to the previous node looks like this: http://beta.search.msn.com/results.aspx?q=##self## ##self## is a link macro that references the current node's textual content.
Link macros come in several flavors besides ##self##.
They are useful as search requests arguments to specify richer outline links.
Learn more about link macros in activeRenderer's Tutorial 9.
I can prepare a post using a full featured browser based outliner, then press the 'post to weblog' icon to publish it into this weblog.
This is my first public posting experiment with the webOutliner, a companion Radio tool to activeRenderer.
The webOutliner is still under wraps, but its release date is getting closer :-) There is no official webOutliner site yet, but a demo site has been running for some time.
There is also a wo-support discussion group; and a support index.
With the current version of webOutliner, I can format my posts in static HTML (using HTML blockquote tags) or, in activeRenderer style dynamic HTML, such as in this post.
This is fun when linking to podcasts, such as these Morning Coffee Notes from Dave Winer.
There's still a little work to do: filtering DHTML in the RSS feed, providing for post links and enclosures, sending outlines over email.
Parallel development is on the way on non Radio, non Usertalk environments.