Radio UserLand

By Phillip Pearson
Tuesday, June 25, 2002

Radio, by UserLand Software, has been many things over the last year or two.  AFAIK it started off as a file-sharing app (thus the name), but turned tack and became a blogging tool instead after the RIAA took aim at Napster.

It was one of the first desktop web applications: desktop applications which include a miniature web server (in this case, Frontier) and communicate with the user through a web browser.

Enough of that - if you're reading this article, you're probably already familiar with Radio ;-)

Data Storage

Radio uses its own object database to store its data.  If you open up your Program Files\Radio UserLand folder, you'll see a fairly large file called Radio.root.  That one contains most of the scripts that run Radio - most of it is written in Frontier's scripting language, UserTalk.

Direct access to data

Weblog data is stored in the file Data Files\weblogData.root.  As with CityDesk, you can open this up and have a look around inside if you like.

Start up Radio and open a window (right-click the system tray icon and select "Open Radio") then select weblogData.root from the Window menu.  Expand the 'weblogData' item.  Here are the useful sub-tables:

You can get at all this by writing scripts in Radio.

Template-based access

Radio generates RSS by default, so it probably wouldn't be hard to get it to generate some other format at the same time.  The code to generate most things is in (hit Ctrl-J in the main window and enter 'radio' to jump there).

publishRss() and writeRssFile() would probably be a good place to start looking.

XML export

UserTalk has a very handy method: table.tableToXml(), which dumps an entire table out as XML.  You can get an XML representation of all the weblog data with the following command:

table.tableToXmlradio.weblog.init() )

This returns a string containing the XML.  To export the weblog data to c:\exportedWeblog.xml, run the following (Ctrl-; will pop up a "quick script" window that will let you run it without creating a script):

file.writeWholeFile( "c:\\exportedWeblog.xml", table.tableToXml( radio.weblog.init() ) )

Access by RPC

Radio supports the Blogger API and the metaWeblog API out of the box, although you'll need to change a security setting or two (permit Blogger API and maybe permit connections) before it will accept incoming RPC.

Both of these APIs allow you to pull out posts at random, although you need to know the post ID.  The Blogger API has the following entry points (functions):

The metaWeblog API has the following entry points:

In addition to this lot, it's not hard to make extra XML-RPC handlers by building your own tool.


Made with CityDesk