ReadWriteWeb

Publishing Services

How to implement ENT into your Radio RSS feed

By Richard MacManus / May 27, 2003 03:44 PM / Comments

After a few late nights, I've successfully implemented Easy News Topics (ENT) tags to my Radio Userland RSS feed. It wasn't as easy as I thought it would be. It involved rooting around in the Radio.root file of my weblog and upskilling myself in UserTalk, Radio Userland's scripting language. But mostly I stood on the shoulders of giants to get this done - Dave Winer and Matt Mower in particular.

ENT is an extension of the RSS2.0 spec. Its aim is to enable categorization of RSS items into topics. After reading about ENT and writing one of my first articles about RSS topics, I decided I wanted to actually implement ENT into my weblog. After some initial searching, I came across an article by Dave Winer called "How to extend Radio's RSS generator". This introduced me to 3 new "callbacks" which enable Radio developers to modify their RSS feeds. The callbacks are: writeRssNamespace, writeRssChannelElement, writeRssItemElement. The first one I successfully implemented was the namespace. I did this as follows:

1. Open up your Radio.root file.
2. Drill down to user.radio.callbacks.
3. Double-click on writeRssNamespace, then re-name "item #1" to "ent".
4. Enter the script linked here.
5. Click "Compile".

That was relatively easy. Implementing the item elements turned out to be trickier - particularly as the elements have attributes and are nested. It took me a while to get to grips with the UserTalk syntax, not being a programmer by trade. I bumbled around a bit and got to a stage where I juuuust about had the script right. Then I happened upon Matt Mower's conversation with Dave Winer and finally things fell into place. Here now is my code for the writeRssItemElement script - same process as above.

But wait, there's more. Because the ENT tags are nested, there is one more piece of scripting you need to do -  modify writeRssFile. But luckily Matt Mower, one of the authors of ENT, has already done the work - right-click here to download the script. Open this in your Radio app, and it will automatically save itself in the workspace area of Radio.root. Then you need to copy it across to the following location:
system.verbs.builtins.radio.weblog.writeRssfile

btw as a sidenote, writeRssfile is just one of many very clever scripts built-in to Radio. It's amazing how much data there is in Radio.root, once you have a good poke around. It's a testament to the amount of work Dave Winer must have put in to build Radio Userland, so I do sympathise with his recent posts about software developers gettin' paid.

Anyway that's basically it for stage 1 of implementing ENT into my Radio RSS feed. Stage 2 is to actually put some worthwhile data into my topic tags - currently I've just got dummy data in there. Ideally I want to dynamically generate a topic word or phrase for each weblog post, based on the contents of the post and/or the title. But I guess this is where k-collector comes in. So that's my next project, to find out about k-collector and put some meaningful data into my shiny new ENT tags :-)

Blogroll bug update

By Richard MacManus / May 17, 2003 03:11 PM / Comments

I posted a question onto the Radio Userland discussion list. I asked why updates to my OPML blogroll don't automatically update my weblog menu. Nobody had an answer. A Google search came up empty too. But from my own checks it does seem that when you update your blogroll.opml file in your Gems folder, the ompl file itself upstreams automatically. However you have to manually push the updates to your menu - either by posting a new weblog entry or by playing around with the homepage templates (described below).

Blogroll bug

By Richard MacManus / May 11, 2003 04:08 PM / Comments

There appears to be a problem upstreaming changes to my opml blogroll. The XML file updates, but the blogroll on my menu doesn't. I got around this by manually deleting the blogroll from my homepage template, publishing, then adding the blogroll back in - i.e. in a roundabout way I re-published the blogroll in my menu.

Userland macro for story list

By Richard MacManus / May 11, 2003 02:26 AM / Comments

Wouldn't you know it, I came across a Userland macro today that lists recent titled blog posts. Where was this macro when I needed it yesterday? :-) Anyway, I'm playing around with this macro now. Still getting used to Radio Userland's dev environment...

...Got this working OK and I now have my 10 most recent entries displayed in my menu. ps if like me you wondered how to change the fonts, check out this page on the Userland discussion list.

Story List macro

By Richard MacManus / May 10, 2003 06:00 PM / Comments

Tonight I added an OPML blogroll to my menu - easy thanks to Jake Savin's instructions. Then I set about trying to implement a "Last 10 Entries" script into my weblog menu. Because I tend to write long-ish articles, I'd like to have a dynamic menu that lists my 10 most recent articles. I looked around the web for a feature like this, but found that most webloggers don't list their weblog entries in their menu. Most people rely on a calendar as a navigation tool, or they use categories. Eventually I did find a relevant script by Jon Udell called StoryList. It provides a list of all articles in reverse chronological order. There's also a script by Marc Barrot called RadioScan which extends the concept, but I decided I'll stick with Jon's script at this point. I then spent a bit of time messing around in Radio until I got it right. So now I have a list of my articles. That's cool, but I still want to put this in my menu and truncate it to the 10 most recent entries. But since it's nearly 1am, I think I'll tackle that another time!

Previous 1 2 3 4 5 6 7 8 9 10
RWW SPONSORS







RWW PARTNERS