local (now = clock.now ()) |
local (adroutline = @user.sitechanges.outline) |
bundle «set up the outline |
| if not defined (adroutline^) |
| new (outlinetype, adroutline) |
| if op.getlinetext () == "" |
| op.insert (now + " " + user.siteChanges.timeZone, up) |
bundle «update the outline |
| local (insertdir = right) |
| if file.modified (f) > user.siteChanges.lastRefresh |
| local (moddate = file.modified (f)) |
| if moddate > user.siteChanges.lastRefresh |
| local (s = f - user.siteChanges.siteFolder) |
| s = "http://" + user.siteChanges.siteURL + string.replaceall (s, ":", "/") |
| op.insert (moddate + " " + user.siteChanges.timeZone, right) |
| checkFolder (user.siteChanges.siteFolder) |
| user.siteChanges.lastRefresh = now |
bundle «write out the text file |
| local (f = user.siteChanges.siteFolder + "siteChanges.txt") |
| local (s = string (adroutline^)) |
| created = file.created (f) |
| toys.writeWholeFile (f, s, 'TEXT', user.siteChanges.textFileCreator, created) |