Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.weblog.updatePagesForPost
on updatePagesForPost (adrpost) { <<Changes <<2/18/02; 5:38:26 PM by DW <<Respect user.radio.prefs.flUpstreamOnlyAfterPublish. <<2/12/02; 12:54:43 PM by JES <<Don't publish the weblog archive page if adrpost^.flNotOnHomePage is true. Publish category RSS files, as well as category HTML pages. <<12/11/01; 10:07:11 AM by DW <<radio.upstream.uploadRecentlyTouchedFiles is defunct. <<After it writes out the files, immediately kick the thread in the butt. Wake up! Go to work. No bitches with one hand on the hip and a pinky in the corner of the mouth. You have work to do dear thread. No lollygagging allowed. <<12/6/01; 6:54:03 PM by DW <<Only call radio.upstream.uploadRecentlyTouchedFiles if user.radio.prefs.upstream.enabled is true. This makes it possible to run it in the debugger. <<11/27/01; 11:37:39 AM by DW <<Call radio.upstream.uploadRecentlyTouchedFiles in a separate thread after finishing. <<Don't call radio.weblog.publishRss in a separate thread. The file isn't making out to disk in time for the new optimization to see it. <<11/13/01; 10:04:08 PM by JES <<Created. Pass me the address of a weblog post, and I'll make sure that all of the files which include the post get re-rendered and upstreamed. radio.weblog.initPost (adrpost); local (adrblog = parentOf (parentOf (adrpost^)^)); if radio.weblog.isPostOnHomePage (adrpost) { radio.weblog.publish (adrblog); try {radio.weblog.publishRss ()}}; if not adrpost^.flNotOnHomePage { //publish the weblog archive page for the post radio.weblog.publish (adrblog, d:adrpost^.when)}; bundle { //publish category pages if defined (adrpost^.categories) { local (adr); for adr in @adrpost^.categories { if adr^ { //categorizations are defined as booleans, if true then the post is in the category local (catname = nameOf (adr^)); if radio.weblog.isPostOnHomePage (adrpost, catname) { //category index page radio.weblog.publish (adrblog, catname)}; radio.weblog.publish (adrblog, catname, adrpost^.when); //archive page local (adrcat = @adrblog^.categories.[catname]); adrcat^.fldirty = true}}}}; if user.radio.prefs.upstream.enabled { radio.thread.wake ()} else { if user.radio.prefs.flUpstreamOnlyAfterPublish { thread.callscript (@radio.upstream.uploadChangedFiles, {})}}; return (true)} <<bundle //testing <<local (adrblog = radio.weblog.init ()) <<local (adrpost = @adrblog^.posts[sizeOf (adrblog^.posts)]) <<updatePagesForPost (adrpost)
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.