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