Monday, November 08, 2010 at 12:00 AM.
river2Suite.opmlExport
on opmlExport (f) { <<Changes <<12/25/09; 6:01:15 PM by DW <<Factored into two parts, the other part is opmlBuild. <<9/6/09; 7:56:51 PM by DW <<Only write the file if it hasn't changed. If prefs.flShareOpml is true, upload to server. <<9/3/09; 3:36:38 AM by DW <<Yikes, we were writing bad XML. Now we're not. Whew. :-) <<6/21/09; 4:55:52 PM by DW <<Created. local (adrdata = river2suite.init ()); local (xmltext = river2Suite.opmlBuild (file.filefrompath (f))); bundle { //if the file exists and hasn't changed, don't write or upload -- 9/6/09 by DW local (flwrite = true); file.surefilepath (f); if file.exists (f) { local (filetext = string (file.readwholefile (f))); if filetext == xmltext { //didn't change flwrite = false}}; if flwrite { file.writewholefile (f, xmltext); if adrdata^.prefs.flShareOpml { river2Suite.opmlUpload (xmltext)}}}; return (true)}; bundle { //test code opmlExport ("Ohio:OPML Editor stuff:river2Subscriptions.opml")}
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.