Monday, November 08, 2010 at 12:03 AM.
system.verbs.builtins.html.data.textFileReaders.frontPage2
on frontPage2 (f, adrTable) { <<Return true if the file is a FrontPage 2.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 (magicstring = "<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 2.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 magicstring) { 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.