Adding RSS 2.0 <comments> support to AmphetaDesk

Disobey.com::

Dave mentions that NetNewsWire has RSS 2.0 <comments> support in the latest downloadable beta. I sometimes forget how easy it is to add new display data to AmphetaDesk – all current versions of AmphetaDesk could have supported display of <comments> the second Dave rolled the idea off his tongue. Here’s how you do it with the default AmphetaDesk templates. First, open AmphetaDesk/templates/default/index.html with a text editor. Then, look for the following line (wrapped here for clarity):

to_browser(qq{ $item->{description} })
   if $item->{description};

Right beneath it, add one line (wrapped here for clarity):

to_browser(qq{ <div align=”right”>[<a href=”$item->{comments}”>Read the Comments!</a>]</div> }) if $item->{comments};

You can do this with AmphetaDesk open already – once you save the file, refresh your page, and any RSS 2.0 feed that uses the <comments> tag will give you a chance to go directly to any posted comments on that entry. Try it out on Brent’s (of NNW fame) RSS feed.

Leave a Reply