Monday, November 08, 2010 at 12:00 AM.
scripting2Suite.oldstuff.buildStoryPage
on buildStoryPage (username, adrpage) {
<<Changes
<<5/30/10; 7:12:14 AM by DW
<<adrpage points to a story page in the user's website.
local (adrsystemdata = scripting2suite.init (), adrdata = scripting2suite.initUser (username), pt, pta = @pt, path);
local (postdate = mainresponder.calendar.getaddressday (parentof (adrpage^)));
new (tabletype, pta);
scripting2Suite.initPageTable (pta);
pta^.scripting2.flStoryPage = true;
pta^.scripting2.crumbTrailInfo.d = postdate;
local (htmltext = html.buildObject (adrpage, pta));
path = file.getdatepath ("/", postdate) + nameof (adrpage^) + adrsystemdata^.prefs.htmlFileExtension;
adrdata^.stats.urlLastStoryBuild = scripting2Suite.writeStaticFile (username, path, htmltext);
adrdata^.stats.whenLastStoryBuild = clock.now ();
adrdata^.stats.ctLastStoryBuilds++;
return (htmltext)};
bundle { //test code
local (tc = clock.ticks ());
buildStoryPage ("davewiner", @config.scripting2.server.users.davewiner.website.["2010"].["05"].["28"].theTwitterOfNews);
tc = clock.ticks () - tc}
<<webbrowser.openurl (config.scripting2.server.users.davewiner.stats.urlLastStoryBuild)
<<dialog.alert (tc)
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.