Monday, November 08, 2010 at 12:03 AM.
system.verbs.builtins.html.data.textFileReaders.homePage1
on homePage1 (f, adrTable) { <<Return true if the file is a HomePage 1.0 file and it was successfully loaded into the table. <<Info that's stored in the table: <<title -- a string, the title of the document <<pageText -- a string that contains the cleaned up text <<Fri, Nov 29, 1996 at 12:13:39 PM by DW local (magicstring1 = "<!--This file created "); local (magicstring2 = " by Claris Home Page version 1.0-->"); local (magicstring3 = "<META NAME=GENERATOR CONTENT=\"Claris Home Page 1.0\">"); if not (defined (adrTable^.pageText)) { adrTable^.pageText = ""}; if not (defined (adrTable^.title)) { adrTable^.title = ""}; with adrTable^ { if pageText == "" { pageText = string (file.readWholeFile (f))}; if not (pageText contains magicstring3) { if not ((pageText contains magicstring1) and (pageText contains magicstring2)) { return (false)}}; title = html.getOneTagValue (pageText, "title"); pageText = html.getOneTagValue (pageText, "body")}; 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.