go语言实现 word格式转换为 html格式,并实现docker打包部署

天问 fc4e0fca9a Merge branch 'tmp' of lyq/word2html into master 2 years ago
.github dce94e68f2 修复编码 3 years ago
.vscode 52441fe53b create diretory 3 years ago
.dockerignore 52441fe53b create diretory 3 years ago
.gitignore c5c78207da init 3 years ago
Dockerfile 9637882090 modify user 3 years ago
README.md 9637882090 modify user 3 years ago
convert.go c97362e5e3 00 3 years ago
docker-compose.yml 52441fe53b create diretory 3 years ago
go.mod c5c78207da init 3 years ago
go.sum c5c78207da init 3 years ago
xx.docx f44e22799e add docx 3 years ago

README.md

word to xml

实现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