«Changes «11/9/02; 9:44:41 AM by DW «Designed to run every minute, prepare a static HTML file with the latest headlines, every hour, just after the Radio aggregator runs. Basically a demo for Radio-Dev'ers. local (adrdata = @user.aggyBaby); if not defined (adrdata^) { new (tabletype, adrdata); adrdata^.whenLastBuild = date (0); new (tabletype, @adrdata^.items); adrdata^.template = aggybaby.data.virginTemplate; adrdata^.htmlfile = "c:\\program files\\radio userland\\www\\userland\\aggyBaby.html"; adrdata^.ctChecks = 0; adrdata^.ctBuilds = 0}; adrdata^.lastScanInfo = aggregator.getLastScanInfo (); adrdata^.ctChecks++; if adrdata^.whenLastBuild" + adr^.channelTitle + " (" + date.timestring (adr^.when, true) + ")</h4>"); lasttitle = adr^.channelTitle}; add ("<p>" + adr^.itemText + "</p>")}; htmltext = string.replace (string (adrdata^.template), "<%bodytext%>", htmltext); file.surefilepath (adrdata^.htmlfile); file.writeWholeFile (adrdata^.htmlfile, htmltext); adrdata^.whenLastBuild = adrdata^.lastScanInfo.whenComplete}; adrdata^.ctBuilds++ bundle { //send an email tcp.sendmail (user.prefs.mailaddress, this, "Rebuilt the aggyBaby page, here's the URL:\r\r" + user.aggyBaby.htmlurl + "\r\rPretty fast, eh?\r\r" + clock.now ())}}}