office-parser

command module
v0.0.0-...-ccd24dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

office-parser

把教育信息化体系中的Word试题,Excel试卷、知识点等数据解析成json内容。

Build Status codecov go

运行

  1. Go >= 1.13
  2. 开启go mod
# 根据实际情况填写路径
$ go env -w GOPATH=/goproj
$ go env -w GOBIN=/goproj/bin
$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.cn,direct 
拉库
$ go mod download
运行测试

支持的类型:word、paper、question、book、outline、cognition_map、cognition_sp

$ go run main.go -h

$ go run main.go -t word -f ./test/ywgs.docx 
$ go run main.go -t book -f ./test/book.xlsx 

独立使用

如果独立使用,则可以创建settings.yaml自定义配置:

$ cp settings.yaml.example settings.yaml

第三方库使用

如果作为第三方库使用,则可以由用户在main.go文件通过以下方法配置:

func init() {
	utils.OpQiniu = &bases.CT_Qiniu{
		//七牛key
		AccessKey: "key",
		//七牛secret
		SecretKey: "secret",
		//七牛存储的bucket
		Bucket: "ups",
		//所属区域
		Zone: "ZoneHuanan",
		//访问的域名地址
		Domain: "https://test.com",
		//路径
		UploadPrefix : "office_parser",
	}

	//初始化WMF的配置
	utils.OpWmf = &utils.CT_WmfCfg{
		Uri: "http://127.0.0.1:10002/convert",
	}
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL