Monday, November 08, 2010 at 12:03 AM.
system.verbs.builtins.html.commands.importWebsite
local (adr);
try {adr = table.getCursorAddress ()};
if not defined (adr^) {
local (websiteName);
if not (dialog.ask ("Name for imported website?", @websiteName)) {
return (false)};
if not defined (websites.[websiteName]) {
new (tableType, @websites.[websiteName])};
adr = @websites.[websiteName]};
if typeof (adr^) != tableType {
adr = parentOf (adr^)};
if file.getFolderDialog ("Choose a folder to load", @user.html.prefs.lastImportedFolder) {
local (folder = user.html.prefs.lastImportedFolder);
local (fname = file.fileFromPath (folder));
fname = string.delete (fname, sizeof (fname), 1); //pop off the colon or slash
local (adrtable = @adr^.[fname]);
new (tabletype, adrtable);
html.loadFolder (folder, adrtable)}
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.