go语言实现 word格式转换为 html格式,并实现docker打包部署
天问 fc4e0fca9a Merge branch 'tmp' of lyq/word2html into master | 2 years ago | |
---|---|---|
.github | 3 years ago | |
.vscode | 3 years ago | |
.dockerignore | 3 years ago | |
.gitignore | 3 years ago | |
Dockerfile | 3 years ago | |
README.md | 3 years ago | |
convert.go | 3 years ago | |
docker-compose.yml | 3 years ago | |
go.mod | 3 years ago | |
go.sum | 3 years ago | |
xx.docx | 3 years ago |
实现word转换为xml list数据。
Ubuntu 或 Centos7,安装如下依赖:
sudo apt-get install poppler-utils wv unrtf tidy
go get github.com/JalfResi/justext
github action 配置docker参数: USERNAME, PASSWORD, REGISTRY, GITHUB_RUN_NUMBER
useradd -u 5678 wordtohtml
docker pull ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.5
docker run -it --rm -v /data/wordtohtml:/app ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.5
alias wordtohtml='docker run -it --rm -v /data:/app jianboy/wordtohtml'
alias pdf2htmlEX='docker run -ti --rm -v `pwd`:/pdf bwits/pdf2htmlex pdf2htmlEX'
pdf2htmlEX --zoom 1 test.pdf