Word、Excel数据解析。
func init() {
utils.OfficeParserQiniuCfg = &utils.Qiniu{
//七牛key
AccessKey: "key",
//七牛secret
SecretKey: "secret",
//七牛存储的bucket
Bucket: "ups",
//所属区域
Zone: "ZoneHuanan",
//访问的域名地址
Domain: "https://test.com",
//路径
UploadPrefix : "office_parser",
}
//初始化WMF的配置
utils.WmfConfiguration = &utils.CT_WmfCfg{
Uri: "http://127.0.0.1:10002/convert",
}
}
支持的类型:
- book
- paper
- outline
- cognition_map
- cognition_sp
- question
运行
$ go run main.go -h
$ go run main.go -f ./test/book.xlsx -t book