Compare commits
2 Commits
0ee7abdf5d
...
a1c4002c5a
Author | SHA1 | Date | |
---|---|---|---|
a1c4002c5a | |||
32bedaf62d |
2
golang/.gitignore
vendored
Normal file
2
golang/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
fusion.exe
|
||||
fusion.doc
|
15
golang/Makefile
Normal file
15
golang/Makefile
Normal file
@ -0,0 +1,15 @@
|
||||
all: run
|
||||
|
||||
run: fusion.doc
|
||||
|
||||
fusion.doc: key.txt
|
||||
UNIDOC_LICENSE_API_KEY=$(shell cat key.txt) go run .
|
||||
|
||||
build: fusion.exe
|
||||
|
||||
fusion.exe: key.txt
|
||||
env UNIDOC_LICENSE_API_KEY=$(shell cat key.txt) GOOS=windows GOARCH=amd64 go build .
|
||||
|
||||
clean:
|
||||
rm -f ./fusion.doc
|
||||
rm -f ./fusion.exe
|
@ -10,15 +10,15 @@ import (
|
||||
|
||||
"gioui.org/app"
|
||||
"gioui.org/font/gofont"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/op"
|
||||
"gioui.org/text"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/unit"
|
||||
"gioui.org/widget"
|
||||
"gioui.org/widget/material"
|
||||
|
||||
"github.com/unidoc/unioffice/document"
|
||||
"github.com/unidoc/unioffice/common/license"
|
||||
"github.com/unidoc/unioffice/document"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -92,7 +92,7 @@ func fusionnerDocx(dossier string) {
|
||||
}
|
||||
|
||||
for _, fichier := range fichiers {
|
||||
if filepath.Ext(fichier.Name()) == ".doc" {
|
||||
if filepath.Ext(fichier.Name()) == ".docx" {
|
||||
cheminFichier := filepath.Join(dossier, fichier.Name())
|
||||
doc, err := document.Open(cheminFichier)
|
||||
if err != nil {
|
||||
@ -123,4 +123,3 @@ func fusionnerDocx(dossier string) {
|
||||
|
||||
fmt.Printf("Documents fusionnés dans %s\n", nomFichierSortie)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user