Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.utilities.readDaveNets
new (outlinetype, @scratchpad.newdavenets); target.set (@scratchpad.newdavenets); local (siteurl = "http://davenet.userland.com/"); local (pc = file.getpathchar ()); local (basefolder = user.radio.prefs.wwwfolder + "stories" + pc); local (username = "dave@userland.com", password = system.temp.davenetpassword); local (msgnum, msgtable); for msgnum = 898 downto 1 { msgtable = radio.manila.rpc.getMessageFromServer (siteUrl, msgNum, username, password); if msgtable.posttime < date ("1/1/01") { break}; if msgtable.alsoListedIn contains "davenetSiteHomePages" { local (day, month, year, hour, minute, second); date.get (msgtable.posttime, @day, @month, @year, @hour, @minute, @second); local (fname = string.dropNonAlphas (string.innercasename (msgtable.subject))); local (f = basefolder + year + pc + string.padwithzeros (month, 2) + pc + string.padwithzeros (day, 2) + pc + fname); msg (f); file.surefilepath (f); op.insert (f, down); local (titledirective = "#title \"" + msgtable.subject + "\"\r"); if defined (msgtable.opml) { //it was written with Radio's outliner op.xmltooutline (msgtable.opml, @localoutline); local (oldtarget = target.set (@localoutline)); op.firstsummit (); op.insert (titledirective, up); target.set (oldtarget); f = f + ".opml"; file.writewholefile (f, op.outlinetoxml (@localoutline)); file.setmodified (f, msgtable.lastUpdate); file.setcreated (f, msgtable.posttime)} else { file.writewholefile (f + ".txt", msgtable.body)}}}
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.