GithubHelp home page GithubHelp logo

zhexiao / office-parser Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 8.0 3.04 MB

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

License: Apache License 2.0

Go 100.00%

office-parser's Introduction

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",
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.