Thursday, April 14, 2011 at 1:07 AM.
river2Suite.init
on init () {
<<Changes
<<4/13/11; 3:41:04 AM by DW
<<Init flLimitRiverHistory and ctDaysInRiver to keep config.river2 from over-bloating config.root.
<<4/6/11; 9:45:26 AM by DW
<<Create River2 user "admin" if not defined. This is necessary for River2 installations that are not paired with radio2.root and beaut.root.
<<3/31/11; 4:48:44 PM by DW
<<Init stat that counts the number of 304 codes we've had returned for this feed.
<<3/31/11; 1:04:57 PM by DW
<<Init prefs ctSecsTimeout, the number of seconds we'll wait when reading a feed.
<<3/28/11; 2:33:47 PM by DW
<<Init prefs.static.flOptimizeBuild.
<<3/27/11; 1:05:00 PM by DW
<<Was never initializing stats.lastTweetText, therefore would always set flInstalling. Noticed it when watching the stats table during a scan. The flInstalling stat was constantly updating, yet its value was not changing.
<<3/25/11; 12:12:27 AM by DW
<<Init feedUpdated callback.
<<3/24/11; 9:24:38 AM by DW
<<Init prefs.maxDaysNews. When we're preparing a news page we have a maximum number of items, this limits the number of days we're willing to visit to find that news. Keeps pages from taking forever to render, when there is no news for a specific user.
<<3/23/11; 8:12:49 AM by DW
<<Init afterSubscribe callbacks.
<<2/27/11; 7:37:36 PM by DW
<<Init adrdata^.prefs.maxFeedHistoryElements.
<<2/13/11; 12:08:08 PM by DW
<<Getting the URL from the S3 path is a little more complicated than I thought.
<<2/13/11; 8:50:55 AM by DW
<<Init adrdata^.prefs.static.s3url.
<<2/12/11; 2:30:37 PM by DW
<<Init prefs and stats for mirroring static pages in S3.
<<2/4/11; 4:20:37 PM by DW
<<Init beautifulRiver prefs.
<<12/14/10; 11:36:52 AM by DW
<<Init adrdata^.myRss.prefs.s3Path.
<<11/21/10; 8:43:12 AM by DW
<<Init adrdata^.stats.ctFeedReads
<<11/17/10; 1:11:18 PM by DW
<<Init system.temp.river2.flStaticBuild, a flag that tells us to build the static pages at the top of the minute.
<<10/7/10; 9:19:13 AM by DW
<<Init adrdata^.prefs.flAlwaysReadingFeeds, implemented in river2thread.script.
<<10/6/10; 7:28:17 PM by DW
<<Init adrdata^.prefs.maxThreads.
<<10/6/10; 4:54:42 AM by DW
<<No longer install the everyMinute script, let the tools code do it.
<<9/26/10; 10:46:32 AM by DW
<<Init beforeScan callback table.
<<6/7/10; 6:35:24 AM by DW
<<Changed the flAutoExportOpml pref to default to true instead of false.
<<5/4/10; 12:15:46 PM by DW
<<Comment initialization of adrdata^.prefs.static.flJavaScriptInclude. We build the .js file if dropbox support is on. No need to have such fine-grained prefs.
<<5/4/10; 5:21:40 AM by DW
<<Init adrdata^.prefs.static.flJavaScriptInclude false.
<<3/21/10; 10:05:22 AM by DW
<<Init Instapaper prefs and stats.
<<3/17/10; 8:04:17 PM by DW
<<Init static rendering prefs and stats.
<<12/29/09; 7:01:23 PM by DW
<<Init myRss table.
<<12/29/09; 2:27:04 PM by DW
<<Init adrdata^.stats.lastTweetText.
<<12/27/09; 10:07:55 AM by DW
<<Init cloudPipe client stat -- flFeedsDirty.
<<12/26/09; 10:20:38 AM by DW
<<Init cloudPipe client and server prefs and stats.
<<12/16/09; 7:29:42 AM by DW
<<Release multi-user support.
<<9/16/09; 7:02:46 PM by DW
<<Install the new everyMinute script, now at the top level of the river2 suite.
<<9/8/09; 4:48:01 PM by DW
<<Init prefs.flPodcastsOnHomePage and prefs.flPhotosOnHomePage.
<<9/8/09; 10:04:32 AM by DW
<<Init photos page title.
<<9/7/09; 9:13:11 PM by DW
<<Init pictures calendar structure.
<<9/6/09; 7:54:12 PM by DW
<<Init flShareOpml pref.
<<9/6/09; 3:48:35 PM by DW
<<Init adrdata^.stats.flInstalling
<<9/3/09; 3:18:40 AM by DW
<<Change the default remote username to "admin" and a random 10-character password.
<<9/2/09; 10:21:26 AM by DW
<<maxFolderMegs is a podcast pref, not a top-level pref.
<<9/1/09; 7:58:47 PM by DW
<<Init adrdata^.prefs.maxFolderMegs.
<<9/1/09; 11:15:39 AM by DW
<<Init maxConsecutiveFeedErrors.
<<8/26/09; 9:12:41 AM by DW
<<The allowRemotePost prefs was being initialized in the wrong table.
<<8/22/09; 6:52:08 PM by DW
<<Init podcast prefs.
<<8/21/09; 11:04:08 AM by DW
<<Add firewall preferences.
<<8/17/09; 10:23:09 AM by DW
<<Init adrdata^.enclosures.
<<8/16/09; 10:55:56 AM by DW
<<Init adrdata^.lists to hold reading lists. Init adrdata^.flags to hold maintenence flags.
<<8/10/09; 7:18:58 AM by DW
<<Init adrdata^.prefs.logPageTitle.
<<7/17/09; 2:12:13 PM by DW
<<Install RPC handlers. It's hard to install top-level items in tool databases through the update process. Doing it this way is safe and easy. It's different from the way other tools works. A trade-off.
<<7/17/09; 1:57:26 PM by DW
<<Init stats for real-time updates.
<<7/17/09; 11:04:47 AM by DW
<<New pref, flRequestCloudNotify, if true we do the whole dance and get realtime updates. Only set true if you're not behind a firewall thought.
<<6/16/09; 10:48:23 AM by DW
<<Created.
local (adrdata = @config.river2);
if not defined (adrdata^) {
new (tabletype, adrdata)};
bundle { //prefs
if not defined (adrdata^.prefs) {
new (tabletype, @adrdata^.prefs)};
if not defined (adrdata^.prefs.enabled) {
adrdata^.prefs.enabled = true};
if not defined (adrdata^.prefs.flDebug) {
adrdata^.prefs.flDebug = false};
if not defined (adrdata^.prefs.flScanAutomatically) {
adrdata^.prefs.flScanAutomatically = true};
if not defined (adrdata^.prefs.minutesBetweenScans) {
adrdata^.prefs.minutesBetweenScans = 60};
if not defined (adrdata^.prefs.maxBodyLength) {
adrdata^.prefs.maxBodyLength = 280};
if not defined (adrdata^.prefs.tableSummary) {
adrdata^.prefs.tableSummary = "My River Of News aggregator."};
if not defined (adrdata^.prefs.maxItemsHomePage) {
adrdata^.prefs.maxItemsHomePage = 100};
if not defined (adrdata^.prefs.homePageTitle) {
adrdata^.prefs.homePageTitle = "Home"};
if not defined (adrdata^.prefs.subsPageTitle) {
adrdata^.prefs.subsPageTitle = "Subscriptions"};
if not defined (adrdata^.prefs.scanPageTitle) {
adrdata^.prefs.scanPageTitle = "Scan"};
if not defined (adrdata^.prefs.podcastsPageTitle) {
adrdata^.prefs.podcastsPageTitle = "Podcasts"};
if not defined (adrdata^.prefs.photosPageTitle) { //9/8/09 by DW
adrdata^.prefs.photosPageTitle = "Photos"};
if not defined (adrdata^.prefs.prefsPageTitle) {
adrdata^.prefs.prefsPageTitle = "Preferences"};
if not defined (adrdata^.prefs.logPageTitle) { //8/10/09 by DW
adrdata^.prefs.logPageTitle = "Preferences"};
if not defined (adrdata^.prefs.flAutoExportOpml) {
adrdata^.prefs.flAutoExportOpml = true}; //6/7/10 by DW
if not defined (adrdata^.prefs.fnameOpml) {
adrdata^.prefs.fnameOpml = "river2Subscriptions.opml"};
if not defined (adrdata^.prefs.flRequestCloudNotify) { //7/17/09 by DW
adrdata^.prefs.flRequestCloudNotify = false};
if not defined (adrdata^.prefs.maxConsecutiveFeedErrors) { //9/1/09 by DW
adrdata^.prefs.maxConsecutiveFeedErrors = 100};
if not defined (adrdata^.prefs.flShareOpml) { //9/6/09 by DW
adrdata^.prefs.flShareOpml = false};
if not defined (adrdata^.prefs.opmlShareServer) { //9/7/09 by DW
adrdata^.prefs.opmlShareServer = "xmlrpc://rpcshare.opml.org:5337/RPC2"};
if not defined (adrdata^.prefs.flPodcastsOnHomePage) { //9/8/09 by DW
adrdata^.prefs.flPodcastsOnHomePage = true};
if not defined (adrdata^.prefs.flPhotosOnHomePage) { //9/8/09 by DW
adrdata^.prefs.flPhotosOnHomePage = true};
if not defined (adrdata^.prefs.flEnclosureDownloadEnabled) { //9/9/09 by DW -- to help debugging
adrdata^.prefs.flEnclosureDownloadEnabled = true};
if not defined (adrdata^.prefs.maxThreads) { //10/6/10 by DW
adrdata^.prefs.maxThreads = 10};
if not defined (adrdata^.prefs.flAlwaysReadingFeeds) { //10/7/10 by DW
adrdata^.prefs.flAlwaysReadingFeeds = false};
if not defined (adrdata^.prefs.ctSecsBetwReads) { //10/7/10 by DW
adrdata^.prefs.ctSecsBetwReads = 10};
if not defined (adrdata^.prefs.maxFeedHistoryElements) { //2/27/11 by DW
adrdata^.prefs.maxFeedHistoryElements = 1000};
if not defined (adrdata^.prefs.maxDaysNews) { //3/24/11 by DW
adrdata^.prefs.maxDaysNews = 7};
if not defined (adrdata^.prefs.ctSecsTimeout) { //3/31/11 by DW
adrdata^.prefs.ctSecsTimeout = 5};
if not defined (adrdata^.prefs.ctDaysInRiver) { //4/13/11 by DW
adrdata^.prefs.ctDaysInRiver = 31};
if not defined (adrdata^.prefs.flLimitRiverHistory) { //4/13/11 by DW
adrdata^.prefs.flLimitRiverHistory = false};
bundle { //ftp
if not defined (adrdata^.prefs.ftp) {
new (tabletype, @adrdata^.prefs.ftp)};
if not defined (adrdata^.prefs.ftp.enabled) {
adrdata^.prefs.ftp.enabled = false};
if not defined (adrdata^.prefs.ftp.server) {
adrdata^.prefs.ftp.server = ""};
if not defined (adrdata^.prefs.ftp.username) {
adrdata^.prefs.ftp.username = ""};
if not defined (adrdata^.prefs.ftp.password) {
adrdata^.prefs.ftp.password = ""};
if not defined (adrdata^.prefs.ftp.path) {
adrdata^.prefs.ftp.path = ""}};
bundle { //security
if not defined (adrdata^.prefs.security) {
new (tabletype, @adrdata^.prefs.security)};
if not defined (adrdata^.prefs.security.flAllowRemoteViewing) {
adrdata^.prefs.security.flAllowRemoteViewing = false};
if not defined (adrdata^.prefs.security.flAllowRemotePost) {
adrdata^.prefs.security.flAllowRemotePost = false};
if not defined (adrdata^.prefs.security.flRequireRemoteLogin) {
adrdata^.prefs.security.flRequireRemoteLogin = true};
if not defined (adrdata^.prefs.security.remoteUsername) {
adrdata^.prefs.security.remoteUsername = "admin"};
if not defined (adrdata^.prefs.security.remotePassword) {
adrdata^.prefs.security.remotePassword = string.getrandompassword (10)}};
bundle { //podcasts
if not defined (adrdata^.prefs.podcasts) {
new (tabletype, @adrdata^.prefs.podcasts)};
if not defined (adrdata^.prefs.podcasts.enabled) {
adrdata^.prefs.podcasts.enabled = true};
if not defined (adrdata^.prefs.podcasts.downloadFolder) {
if system.environment.isMac {
adrdata^.prefs.podcasts.downloadFolder = file.getspecialfolderpath ("", "desktop folder", false) + "Podcatcher" + file.getpathchar ()}
else {
adrdata^.prefs.podcasts.downloadFolder = file.getspecialfolderpath ("", "desktop", false) + "Podcatcher" + file.getpathchar ()}};
if not defined (adrdata^.prefs.podcasts.maxFolderMegs) { //9/2/09 by DW
adrdata^.prefs.podcasts.maxFolderMegs = 1000}};
bundle { //cloudPipeServer, 12/17/09 by DW
if not defined (adrdata^.prefs.cloudPipeServer) {
new (tabletype, @adrdata^.prefs.cloudPipeServer)};
if not defined (adrdata^.prefs.cloudPipeServer.enabled) {
adrdata^.prefs.cloudPipeServer.enabled = false};
if not defined (adrdata^.prefs.cloudPipeServer.ctSecsTimeout) {
adrdata^.prefs.cloudPipeServer.ctSecsTimeout = 180}};
bundle { //cloudPipeClient, 12/22/09 by DW
if not defined (adrdata^.prefs.cloudPipeClient) {
new (tabletype, @adrdata^.prefs.cloudPipeClient)};
if not defined (adrdata^.prefs.cloudPipeClient.enabled) {
adrdata^.prefs.cloudPipeClient.enabled = false};
if not defined (adrdata^.prefs.cloudPipeClient.ctSecsTimeout) {
adrdata^.prefs.cloudPipeClient.ctSecsTimeout = 360};
if not defined (adrdata^.prefs.cloudPipeClient.apiUrl) {
adrdata^.prefs.cloudPipeClient.apiUrl = "http://127.0.0.1:5337/river2/cloudPipeServer"};
if not defined (adrdata^.prefs.cloudPipeClient.username) {
adrdata^.prefs.cloudPipeClient.username = ""};
if not defined (adrdata^.prefs.cloudPipeClient.password) {
adrdata^.prefs.cloudPipeClient.password = ""}};
bundle { //static, 3/17/10 by DW
if not defined (adrdata^.prefs.static) {
new (tabletype, @adrdata^.prefs.static)};
if not defined (adrdata^.prefs.static.enabled) {
adrdata^.prefs.static.enabled = false};
if not defined (adrdata^.prefs.static.folder) {
adrdata^.prefs.static.folder = ""};
<<if not defined (adrdata^.prefs.static.flJavaScriptInclude) //5/4/10 by DW
<<adrdata^.prefs.static.flJavaScriptInclude = false
if not defined (adrdata^.prefs.static.flSynchToS3) { //2/10/11by DW
adrdata^.prefs.static.flSynchToS3 = false};
if not defined (adrdata^.prefs.static.s3path) { //2/10/11by DW
adrdata^.prefs.static.s3path = ""};
if not defined (adrdata^.prefs.static.flBuildMainUser) { //3/27/11 by DW
adrdata^.prefs.static.flBuildMainUser = false};
if not defined (adrdata^.prefs.static.flOptimizeBuild) { //3/28/11 by DW
adrdata^.prefs.static.flOptimizeBuild = true};
bundle { //s3 url
if not defined (adrdata^.prefs.static.s3url) { //2/10/11by DW
adrdata^.prefs.static.s3url = ""};
if sizeof (adrdata^.prefs.static.s3url) == 0 {
if sizeof (adrdata^.prefs.static.s3path) > 0 {
on getUrlFromPath (path) {
<<Changes
<<2/13/11; 12:01:17 PM by DW
<<Turn an Amazon path into a URL.
<<Turn /bmTestBucket/fun into http://bmTestBucket.s3.amazonaws.com/fun
if path beginswith "/" {
path = string.delete (path, 1, 1)};
local (part1 = string.nthfield (path, "/", 1));
path = string.delete (path, 1, sizeof (part1));
local (url = "http://" + part1 + ".s3.amazonaws.com" + path);
if not (url endswith "/") {
url = url + "/"};
return (url)};
adrdata^.prefs.static.s3url = getUrlFromPath (adrdata^.prefs.static.s3path)}}}};
bundle { //instapaper, 3/21/10 by DW
if not defined (adrdata^.prefs.instapaper) {
new (tabletype, @adrdata^.prefs.instapaper)};
if not defined (adrdata^.prefs.instapaper.enabled) {
adrdata^.prefs.instapaper.enabled = false};
if not defined (adrdata^.prefs.instapaper.username) {
adrdata^.prefs.instapaper.username = ""};
if not defined (adrdata^.prefs.instapaper.password) {
adrdata^.prefs.instapaper.password = ""}};
bundle { //beautifulRiver, 2/4/11 DW
river2Suite.initBeautifulRiverPrefs (adrdata)}};
bundle { //stats
if not defined (adrdata^.stats) {
new (tabletype, @adrdata^.stats)};
if not defined (adrdata^.stats.ctItems) {
adrdata^.stats.ctItems = 0};
if not defined (adrdata^.stats.whenLastNewItem) {
adrdata^.stats.whenLastNewItem = date (0)};
if not defined (adrdata^.stats.ctScans) {
adrdata^.stats.ctScans = 0};
if not defined (adrdata^.stats.whenLastScanStart) {
adrdata^.stats.whenLastScanStart = date (0)};
if not defined (adrdata^.stats.ctEveryMinutes) {
adrdata^.stats.ctEveryMinutes = 0};
if not defined (adrdata^.stats.ctEnclosures) {
adrdata^.stats.ctEnclosures = 0};
if not defined (adrdata^.stats.ctRealTimeUpdates) { //7/17/09 by DW
adrdata^.stats.ctRealTimeUpdates = 0};
if not defined (adrdata^.stats.whenLastRealtimeUpdate) { //7/17/09 by DW
adrdata^.stats.whenLastRealtimeUpdate = date (0)};
if not defined (adrdata^.stats.urlLastRealtimeUpdate) { //7/17/09 by DW
adrdata^.stats.urlLastRealtimeUpdate = ""};
if not defined (adrdata^.stats.flInstalling) { //9/6/09 by DW
adrdata^.stats.flInstalling = false};
if not defined (adrdata^.stats.lastTweetText) { //12/29/09 by DW, fixed 3/27/11 by DW
adrdata^.stats.lastTweetText = false};
if not defined (adrdata^.stats.ctFeedReads) { //11/21/10 by DW
adrdata^.stats.ctFeedReads = 0};
if not defined (adrdata^.stats.updatedFeeds) { //3/27/11 by DW
new (tabletype, @adrdata^.stats.updatedFeeds)};
if not defined (adrdata^.stats.ct304s) { //3/31/11 by DW
adrdata^.stats.ct304s = 0};
bundle { //cloudPipeServer, 12/17/09 by DW
if not defined (adrdata^.stats.cloudPipeServer) {
new (tabletype, @adrdata^.stats.cloudPipeServer)};
if not defined (adrdata^.stats.cloudPipeServer.ctTimeouts) {
adrdata^.stats.cloudPipeServer.ctTimeouts = 0};
if not defined (adrdata^.stats.cloudPipeServer.ctUpdateCalls) {
adrdata^.stats.cloudPipeServer.ctUpdateCalls = 0};
if not defined (adrdata^.stats.cloudPipeServer.ctUpdateLoops) {
adrdata^.stats.cloudPipeServer.ctUpdateLoops = 0};
if not defined (adrdata^.stats.cloudPipeServer.ctTotalTicks) {
adrdata^.stats.cloudPipeServer.ctTotalTicks = 0}};
bundle { //cloudPipeClient, 12/23/09 by DW
if not defined (adrdata^.stats.cloudPipeClient) {
new (tabletype, @adrdata^.stats.cloudPipeClient)};
if not defined (adrdata^.stats.cloudPipeClient.ctServerCalls) {
adrdata^.stats.cloudPipeClient.ctServerCalls = 0};
if not defined (adrdata^.stats.cloudPipeClient.ctServerCallErrors) {
adrdata^.stats.cloudPipeClient.ctServerCallErrors = 0};
if not defined (adrdata^.stats.cloudPipeClient.ctClientLoops) {
adrdata^.stats.cloudPipeClient.ctClientLoops = 0};
if not defined (adrdata^.stats.cloudPipeClient.flFeedsDirty) { //12/27/09 by DW
adrdata^.stats.cloudPipeClient.flFeedsDirty = false}};
bundle { //static, 3/17/10 by DW
if not defined (adrdata^.stats.static) {
new (tabletype, @adrdata^.stats.static)};
if not defined (adrdata^.stats.static.ctPageBuilds) {
adrdata^.stats.static.ctPageBuilds = 0};
if not defined (adrdata^.stats.static.ctWritesToS3) { //2/12/11 by DW
adrdata^.stats.static.ctWritesToS3 = 0};
if not defined (adrdata^.stats.static.ctS3Errors) { //2/12/11 by DW
adrdata^.stats.static.ctS3Errors = 0}};
bundle { //instapaper, 3/21/10 by DW
if not defined (adrdata^.stats.instapaper) {
new (tabletype, @adrdata^.stats.instapaper)};
if not defined (adrdata^.stats.instapaper.ctSaves) {
adrdata^.stats.instapaper.ctSaves = 0};
if not defined (adrdata^.stats.instapaper.ctErrors) {
adrdata^.stats.instapaper.ctErrors = 0}}};
bundle { //enclosures -- 8/17/09 by DW
if not defined (adrdata^.enclosures) {
new (tabletype, @adrdata^.enclosures)};
if not defined (adrdata^.enclosures.podcasts) {
new (tabletype, @adrdata^.enclosures.podcasts)};
if not defined (adrdata^.enclosures.pictures) { //9/7/09 by DW
new (tabletype, @adrdata^.enclosures.pictures)}};
bundle { //callbacks
if not defined (adrdata^.callbacks) {
new (tabletype, @adrdata^.callbacks)};
if not defined (adrdata^.callbacks.newItem) {
new (tabletype, @adrdata^.callbacks.newItem)};
if not defined (adrdata^.callbacks.afterScan) {
new (tabletype, @adrdata^.callbacks.afterScan)};
if not defined (adrdata^.callbacks.beforeScan) { //9/26/10 by DW
new (tabletype, @adrdata^.callbacks.beforeScan)};
if not defined (adrdata^.callbacks.afterSubscribe) { //3/23/11 by DW
new (tabletype, @adrdata^.callbacks.afterSubscribe)};
if not defined (adrdata^.callbacks.feedUpdated) { //3/25/11 by DW
new (tabletype, @adrdata^.callbacks.feedUpdated)}};
bundle { //folder
local (adrimg);
if not defined (adrdata^.prefs.folder) {
adrdata^.prefs.folder = frontier.pathstring + "river2" + file.getpathchar ()};
if not file.exists (adrdata^.prefs.folder) {
file.surefilepath (adrdata^.prefs.folder + "xxx")};
if not file.exists (adrdata^.prefs.folder + "river.css") {
file.writewholefile (adrdata^.prefs.folder + "river.css", string (river2Suite.data.defaultCss))};
for adrimg in @river2Website.["#images"] {
local (f = adrdata^.prefs.folder + nameof (adrimg^) + ".gif");
if not file.exists (f) {
<<scratchpad.f = f //debugging
file.writewholefile (f, string (adrimg^))}}};
bundle { //myRss
if not defined (adrdata^.myRss) {
new (tabletype, @adrdata^.myRss)};
if not defined (adrdata^.myRss.calendar) {
new (tabletype, @adrdata^.myRss.calendar)};
bundle { //feed
if not defined (adrdata^.myRss.feed) {
new (tabletype, @adrdata^.myRss.feed)};
if not defined (adrdata^.myRss.feed.title) {
adrdata^.myRss.feed.title = "My RSS Tweetstream"};
if not defined (adrdata^.myRss.feed.link) {
adrdata^.myRss.feed.link = "http://river2.org/"};
if not defined (adrdata^.myRss.feed.docs) {
adrdata^.myRss.feed.docs = "http://cyber.law.harvard.edu/rss/rss.html"};
if not defined (adrdata^.myRss.feed.description) {
adrdata^.myRss.feed.description = "Something interesting goes here."};
if not defined (adrdata^.myRss.feed.language) {
adrdata^.myRss.feed.language = "en-us"};
bundle { //cloud, use REST, 7/24/09 by DW
if not defined (adrdata^.myRss.feed.cloud) {
new (tabletype, @adrdata^.myRss.feed.cloud)};
if not defined (adrdata^.myRss.feed.cloud.server) {
adrdata^.myRss.feed.cloud.server = "rpc.rsscloud.org"};
if not defined (adrdata^.myRss.feed.cloud.port) {
adrdata^.myRss.feed.cloud.port = 5337};
if not defined (adrdata^.myRss.feed.cloud.path) {
adrdata^.myRss.feed.cloud.path = "/rsscloud/pleaseNotify"};
if not defined (adrdata^.myRss.feed.cloud.protocol) {
adrdata^.myRss.feed.cloud.protocol = "http-post"};
if not defined (adrdata^.myRss.feed.cloud.registerProcedure) {
adrdata^.myRss.feed.cloud.registerProcedure = ""}}};
bundle { //stats
if not defined (adrdata^.myRss.stats) {
new (tabletype, @adrdata^.myRss.stats)};
if not defined (adrdata^.myRss.stats.ctSaves) {
adrdata^.myRss.stats.ctSaves = 0};
if not defined (adrdata^.myRss.stats.whenLastSave) {
adrdata^.myRss.stats.whenLastSave = date (0)};
if not defined (adrdata^.myRss.stats.serialnum) {
adrdata^.myRss.stats.serialnum = 0};
if not defined (adrdata^.myRss.stats.rssUrl) {
adrdata^.myRss.stats.rssUrl = ""}};
bundle { //prefs
if not defined (adrdata^.myRss.prefs) {
new (tabletype, @adrdata^.myRss.prefs)};
if not defined (adrdata^.myRss.prefs.enabled) {
adrdata^.myRss.prefs.enabled = false};
if not defined (adrdata^.myRss.prefs.s3Path) { //12/14/10 by DW
adrdata^.myRss.prefs.s3Path = ""};
if not defined (adrdata^.myRss.prefs.s3Url) { //12/14/10 by DW
adrdata^.myRss.prefs.s3Url = ""}}};
bundle { //users
if not defined (adrdata^.users) {
new (tabletype, @adrdata^.users)};
if not defined (adrdata^.users.admin) { //4/6/11 by DW
new (tabletype, @adrdata^.users.admin);
river2suite.initUser (@adrdata^.users.admin)}};
bundle { //system.temp
if not defined (system.temp.river2) {
new (tabletype, @system.temp.river2)};
if adrdata^.prefs.flDebug {
if not defined (system.temp.river2.debug) {
new (tabletype, @system.temp.river2.debug)}};
if not defined (system.temp.river2.flStaticBuild) { //11/17/10 by DW
system.temp.river2.flStaticBuild = false}};
bundle { //rpc handlers
if not defined (user.betty.rpcHandlers.river2) { //7/17/09 by DW
user.betty.rpcHandlers.river2 = @river2Suite.rpcHandlers}};
<<bundle //everyMinute script -- commented 10/6/10 by DW
<<if not defined (user.scheduler2.everyMinute.river2)
<<user.scheduler2.everyMinute.river2 = @river2Suite.everyMinute
if not defined (adrdata^.feeds) {
new (tabletype, @adrdata^.feeds)};
if not defined (adrdata^.lists) { //8/16/09 by DW
new (tabletype, @adrdata^.lists)};
if not defined (adrdata^.flags) { //8/16/09 by DW
new (tabletype, @adrdata^.flags)};
if not defined (adrdata^.trash) {
new (tabletype, @adrdata^.trash)};
if not defined (adrdata^.river) {
new (tabletype, @adrdata^.river)};
return (adrdata)};
bundle { //test code
init ()}
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.