Monday, November 08, 2010 at 12:00 AM.
scripting2Suite.oldstuff.initArchiveDay
on initArchiveDay (adrday) { <<Changes <<5/29/10; 4:37:20 PM by DW <<Don't generate the outline from the OPML text. We may not need it, and it's an expensive operation. <<2/6/06; 9:50:09 AM by DW <<If the outline doesn't exist, read it from the file. <<12/1/03; 3:05:33 PM by DW <<Initialize dayCats, maintained in renderOutlineAsRss. <<11/12/03; 5:41:18 AM by DW <<Initialize the outline. <<10/29/03; 8:24:08 AM by DW <<Created. Initializes a day in the archive, making sure all the elements we depend on are present and given initial values. if not defined (adrday^) { new (tabletype, adrday)}; if not defined (adrday^.ctreads) { adrday^.ctreads = 0}; if not defined (adrday^.ctrevisions) { adrday^.ctrevisions = 0}; bundle { //initialize the outline local (flread = false); if not defined (adrday^.outline) { flread = true} else { if file.modified (adrday^.f) > timemodified (@adrday^.outline) { try {delete (@adrday^.body)}; try {delete (@adrday^.xstruct)}; flread = true}}; if flread { adrday^.opml = string (file.readwholefile (adrday^.f))}}}; <<op.xmltooutline (adrday^.opml, @adrday^.outline) bundle { //test code initArchiveDay (@system.temp.scripting2.davewiner.calendar.["2006"].["02"].["02"])}
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.