output update
This commit is contained in:
parent
8a6379037e
commit
d66e481b6c
|
@ -496,6 +496,7 @@ open System.IO
|
|||
|
||||
type PageText =
|
||||
interface
|
||||
abstract member bindPage:unit ->obj
|
||||
abstract member getHtmlText:unit -> string
|
||||
end
|
||||
|
||||
|
@ -746,6 +747,9 @@ open System.IO
|
|||
| _ -> ()
|
||||
|
||||
interface PageText with
|
||||
member this.bindPage():obj =
|
||||
page
|
||||
|
||||
member this.getHtmlText(): string =
|
||||
let doc = this.getHtmlDocument()
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ open System.Xml
|
|||
open HtmlStruct.Assemble
|
||||
open HtmlStruct.Content
|
||||
open HtmlStruct.Present
|
||||
open System.IO
|
||||
|
||||
|
||||
let doc = XmlDocument()
|
||||
|
@ -20,8 +21,7 @@ let story_pages = story_page_assemble(visitor.contents()) |> List.map<StoryPage
|
|||
let point_pages = point_page_assemble(volume_pages @ story_pages)
|
||||
|
||||
volume_pages @ story_pages @ point_pages |> List.iter (fun it -> (it:?>PageAccess).setPageRoot("E:"))
|
||||
|
||||
let maker = volume_pages @ story_pages @ point_pages
|
||||
let makers = volume_pages @ story_pages @ point_pages
|
||||
|> List.map(fun page_unit ->
|
||||
match page_unit with
|
||||
| :? PointPage as point ->
|
||||
|
@ -32,9 +32,7 @@ let maker = volume_pages @ story_pages @ point_pages
|
|||
PageMaker<StoryPage>(story)
|
||||
| _ -> failwith ""
|
||||
)
|
||||
let docx0 = maker.Item(5).getHtmlText()
|
||||
let docx1 = maker.Item(18).getHtmlText()
|
||||
let docx2 = maker.Item(22).getHtmlText()
|
||||
|
||||
for refs in point_pages do
|
||||
System.Console.WriteLine(refs.ToString())
|
||||
for refs in makers do
|
||||
let file_path = (refs.bindPage() :?> PageAccess).pageURL()
|
||||
File.WriteAllLines(file_path, [refs.getHtmlText()])
|
Loading…
Reference in New Issue