Monday, November 08, 2010 at 12:07 AM.
system.verbs.builtins.xml.aggregator.readService
on readService (url, adrservices, adradrservice=nil) {
<<Changes
<<1/18/06; 5:33:21 PM by DW
<<So the podcatcher can work, we need to pass flSaveData as true in the call to xml.rss.readService, so it will save the pubDate (and other data) in the item tables.
<<10/14/02; 9:09:16 AM by DW
<<Add new optional parameter, adradrservice, if non-nil, store the address of the service table there. Allows for redirection to percolate up through the call stack.
<<8/31/02; 12:08:59 PM by DW
<<Undo the referer stuff done in June. It didn't get completed, and made a mess of referer logs of sites that our users read. So, for Radio users, instead of setting the referer to the page on the Frontier site with the url of the user's site as a parameter, we point to the What is a News Aggregator page on the Radio site, with no parameters.
<<6/5/02; 1:19:05 PM by DW
<<Switch back to the appSignatureUrl, if it's the default value, add a param to the URL indicating where the user's weblog is.
<<6/5/02; 11:11:17 AM by DW
<<If possible, set the referer to the url of the user's weblog. If not possible, fall back to the original behavior.
<<11/7/01; 7:10:37 PM by DW
<<Change system.temp.aggregator to adrdata^.stats.lastRun.
local (adrdata = xml.aggregator.init ());
local (referer = adrdata^.prefs.appSignatureUrl);
if system.environment.isRadio { //8/31/02 by DW
if referer == "http://frontier.userland.com/xmlAggregator" {
<<try {referer = referer + "?userWeblog=" + string.urlencode (radio.weblog.geturl ())}
referer = "http://radio.userland.com/newsAggregator"}};
local (adrservice = xml.rss.readService (url, adrservices, referer, @xml.aggregator.storyArrivedCallback, true));
adrdata^.stats.lastRun.ctThreads--;
try {adrdata^.stats.lastRun.lastChannelRead = adrservice^.compilation.channeltitle};
if adradrservice != nil { //10/14/02 DW
adradrservice^ = adrservice};
return (true)}
<<bundle //test code
<<local (url = "http://partners.userland.com/people/docSearls.xml")
<<url = "http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml"
<<url = "http://127.0.0.1/redirecttest.xml"
<<new (tabletype, @aggregatorData.services.[url].compilation)
<<delete (@aggregatorData.services.[url].xmltext)
<<readService (url, @aggregatorData.services)
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.