Jon's Radio : Jon Udell's Radio Blog
Updated: 8/6/2002; 12:30:29 AM.

 

Note: Jon's Radio has moved to InfoWorld

storyList


Jon's homepage

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Thursday, April 11, 2002

Paul Holbrook improves RSS truncation

Paul Holbrook takes a different approach to RSS truncation. He presents the entire lead paragraph, like so:

on firstPara(description, adrpost) {
 return (html.getOneTagValue(description,"P"))} 

The description is stored in HTML, so getOneTagValue conveniently does exactly what I want.

Of course, if the first tag in my description isn't a P, this won't do what I want it to do.  I'll work on that another time. [ Paul Holbrook's Radio Weblog

I'm trying it now...yup, that's the ticket. Thanks, Paul!

 

 

7:50:36 PM    

Now the RSS truncation is officially supported. I wish all collaboration were this easy. Explaining the new callback that makes my non-kosher hack into a kosher callback, Dave writes:

Actually Jon did a kosher thing. By documenting his hack and explaining the motivation clearly, and doing it slowly, he made sure that I understood what he was doing and why. I also could see that it wasn't a casual thing for him, he gave it a lot of thought. So now I can do a cow-path-pave for Jon and anyone else who may want more control over the descriptions in their RSS output feeds. [ Description Filter Callbacks ]

Thanks Dave! This posting is the first test...works! Cool.

5:08:05 PM    

Shortening RSS descriptions to lead sentences

I'm really enjoying my ability to scan a lot of sources in my Radio news aggregator. What slows me down, though, are the channels with long or irregularly-formatted descriptions. One of the worst offenders is the Privacy Digest.  I want to scan that channel, but the cluttered format of its descriptions makes it really hard to do so.

By contrast, take a look at Eric Snowdeal's feed. Although it's mildly disconcerting that the truncation doesn't respect word or sentence boundaries, the effect -- especially in the aggregator -- is to make this feed much more easily scannable.

For my own reading convenience, I may wind up pulling feeds out of Radio's aggregator database and reformatting them. But on the flip side, I've been feeling kind of antisocial about dumping these longish essays into an RSS feed that I myself wouldn't want to read.

So for now, I've changed this line in system.verbs.builtins.radio.weblog.writeRssFile:

add ("<description>" + adritemcache^.text + "</description>")

to this:

local (s = adritemcache^.text);
s = string.replaceAll( s, "&lt;"   , "<" );
s = string.replaceAll( s, "&gt;"   , ">" );
s = string.replaceAll( s, "&quot;" , '"' );
s = string.replaceAll( s, "&apos;" , "'" );
s = string.replaceAll( s, "&amp;nbsp;" , " " );
regex.subst("<[^>]+>", "", @s);
add ("<description>" + string.firstSentence(s) + "</description>")

Radio's string.firstSentence seems like just the ticket. A lead sentence is supposed to be special. Knowing that it's all a reader of your RSS feed might see (after the title) makes it even more so.

Of course, it's completely non-kosher to hack into a system script that can be overwritten by UserLand at any time, as happened most recently a few days ago:

4/7/02; 9:55:21 AM by DW {
 Do the macro processing or descriptions unconditionally, and in-line instead of calling radio.string.processMacros, which was only processing the descriptions if it contained "<%". This broke shortcuts. Prior art is the Manila-Blogger Bridge Tool, which unconditionally processes macros.}

Nevertheless, you've got to love the openness of a system that makes it possible, and easy, to do this non-kosher thing.

2:16:56 AM    


© Copyright 2002 Jon Udell.



Click here to visit the Radio UserLand website.

 


Top 10 hits for "limits of transparency" on..
Google
1.
2.
3.
4.
5.
6.
7.
8.

9.
10.

Help link
 8/6/2002; 12:04:03 AM.

currently subscribed to:

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link 80211b News

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link ARTS & FARCES internet

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Blogging Alone

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Blogzilla - a blog about Mozilla

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Blur Circle

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Brian Jepson's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Business 2.0 - Technology

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Clemens Vasters: Enterprise Development & Alien Abductions

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Content Wire - Digital Copyright

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link decentralization

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Digital Identity

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Digital Identity World

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link DJ's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Economist: Books

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Free XML tools

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link IBM DeveloperWorks: XML News

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Industrie Toulouse

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link InfoWorld: Top News

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link internetnews.com: Internet Advertising Report

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link jDance

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Jeremy Bowers: Jabber

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Jeremy Zawodny's blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Jeroen Bekkers' Groove Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link John Burkhardt

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link John Patrick's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Jon Schull's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Jon's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Jon's Radio (full-length descriptions)

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Kevin Altis' Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Kimbro Staken: XML Database JuJu

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link klogs

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Larry Welkowitz's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Latest RFC:s

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Liftoff

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Line56: B2B News

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Linux Magazine

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Loosely Coupled weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Macromedia Resource Feed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Matt Pope's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link matt.griffith

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link McGee's Musings

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Meatball Wiki

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Meerkat: An Open Wire Service

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Michael Helfrich's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Nature: Human Genetics

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link New Scientist

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link New Web Services from SalCentral

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link New York Times: Business

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link New York Times: Science

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link New York Times: Technology

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link News Is Free: Recent Additions

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link O'Reilly Network Articles

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link O'Reilly Safari

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Patrick Logan's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Peter Drayton's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Privacy Digest Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Python News

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Ray Ozzie's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link ResearchBuzz

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Russ Lipton Documents Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link s l a m

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Salon: Arts & Entertainment

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Sam Ruby

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Scientific American

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link search.cpan.org

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link SearchTools News for 2002

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Security Focus

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link sellsbrothers.com: Windows Developer News

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Simon Fell

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Sjoerd Visscher's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link snowdeal.org > {bio,medical}informatics

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Steven Vore: KM

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link syndication

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link The GrooveLog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link The World Wide Web Consortium

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Tony Bowden's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link toolbox

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Voidstar

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Web Services Articles from The Stencil Group

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Web Voice: internet business models and technical marketing - a blog by Olivier Travers

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link weblog-devel

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Werblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Windley's Enterprise Computing Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link WriteTheWeb

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link xmlhack

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Yahoo News Headlines - XML

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Zope Products

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. RSS link Zope.org

Here's how this works.