Monday, April 04, 2011 at 1:06 AM.
radio2Suite.publish
on publish (adruser, adrfeed) { <<Changes <<3/6/11; 12:46:06 PM by DW <<Do the shortcut in a thread, don't want to wait for the result. Like fast display of home page. <<3/5/11; 12:59:30 PM by DW <<If pref is enabled, directly call River2 to read the feed. Don't wait for it to get rssCloud notification or to poll. <<3/1/11; 4:28:13 PM by DW <<Added test code at the bottom of the script. <<3/1/11; 8:38:43 AM by DW <<Add code to build the HTML archive. <<2/22/11; 9:40:01 PM by DW <<Add a second call to buildRss to output the archived version containing the posts for the day. <<2/17/11; 10:51:19 AM by DW <<Ping the cloud in a new thread so it doesn't screw up the time on the logs, which should just reflect the time it took to build the feed. <<2/15/11; 3:30:43 PM by DW <<It's possible for feedUrl to be not-defined. <<1/11/11; 12:28:25 PM by DW <<Added logging. <<12/25/10; 1:59:37 PM by DW <<Created. local (adrdata = radio2suite.init (), startticks = clock.ticks (), now = clock.now ()); radio2Suite.buildRss (adruser, adrfeed); bundle { //shortcut notify River2 feed updated -- 3/5/11 by DW if adrdata^.prefs.flRiver2ReadFeedAfterPublish { //cause River2 to immediately read the feed <<local (st = clock.ticks ()) river2Suite.rpcHandlers.feedUpdated (adrfeed^.stats.feedUrl)}}; <<scratchpad.pubticks = clock.ticks () - st thread.callscript (@radio2Suite.publishThread, {adruser, adrfeed}); if defined (adrfeed^.stats.feedUrl) { //2/15/11 by DW bundle { //log the publish event local (s = "Published " + nameof (adruser^) + "'s <a href=\"" + adrfeed^.stats.feedUrl + "\">" + nameof (adrfeed^) + "</a> feed."); log2.add (radio2Suite.data.strings.logname, "Publish", s, startticks)}}}; bundle { //test code publish (@config.radio2.users.dave, @config.radio2.users.dave.feeds.["linkblog.xml"])}
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.