Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.fatPages.getPageData
on getPageData (pageSource=nil, url=nil) {
<<This script is called from the Get Page Data command
<<Thu, May 8, 1997 at 8:18:21 AM by DW
<<added optional parameters to allow loading from a file
local (atts, adrDest);
local (adroutline = @scratchpad.importedItems);
if pageSource == nil {
pageSource = webBrowser.getFrontWindowSource ();
if pageSource == false {
return (false)};
<<Change line feeds to carriage returns.
pageSource = string.replaceAll (pageSource, cr + lf, cr);
pageSource = string.replaceAll (pageSource, lf, cr)};
if url == nil {
url = webBrowser.getFrontWindowURL ()};
bundle { //fill in atts table
if not fatPages.getPageAtts (@pageSource, @atts) {
fatPages.noObjectError (url:url)};
if not defined (atts.pageData) {
fatPages.noObjectError (url:url)}};
<<Get destination address from user.
adrDest = fatPages.confirmAddress (atts.adrPageData);
if not adrDest {
return (false)};
<<Move the data into the odb.
fatPages.unpackOdbObject (@atts, adrDest, flRunnable:false);
export.addToLog (adrDest, url);
Frontier.bringToFront ();
return (true)}
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.