convert.go 299 B

12345678910111213141516
  1. package main
  2. import (
  3. "os/exec"
  4. )
  5. // exec command
  6. func doCommand(cmd string) {
  7. _ = exec.Command("sh", "-c", cmd).Run()
  8. }
  9. func main() {
  10. doCommand("libreoffice --headless --convert-to html *.doc --outdir output")
  11. doCommand("libreoffice --headless --convert-to html *.docx --outdir output")
  12. }