mirror of
https://github.com/fengxxc/wechatmp2markdown.git
synced 2026-02-21 06:20:46 +08:00
21 lines
578 B
Go
21 lines
578 B
Go
package test
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
|
|
"github.com/fengxxc/wechatmp2markdown/format"
|
|
"github.com/fengxxc/wechatmp2markdown/parse"
|
|
)
|
|
|
|
func Test1() {
|
|
var articleStruct parse.Article = parse.ParseFromHTMLFile("./test/test1.html", parse.IMAGE_POLICY_BASE64)
|
|
fmt.Println("-------------------test1.html parse-------------------")
|
|
fmt.Printf("%+v\n", articleStruct)
|
|
|
|
fmt.Println("-------------------test1.html format-------------------")
|
|
mdString, _ := format.Format(articleStruct)
|
|
fmt.Print(mdString)
|
|
ioutil.WriteFile("./test/test1_target.md", []byte(mdString), 0644)
|
|
}
|