diff --git a/application/controllers/info_amp.php b/application/controllers/info_amp.php index f3e48159..9f1652d5 100644 --- a/application/controllers/info_amp.php +++ b/application/controllers/info_amp.php @@ -462,7 +462,7 @@ class Info_amp extends CI_Controller $yarnbin = 'C:\Users\cht77\AppData\Local\Yarn\bin\mammoth '; $test_host = '//202.103.68.62:9096'; } else { - $yarnbin = 'C:\Users\lmr\AppData\Local\Yarn\bin\mammoth '; + $yarnbin = APPPATH . 'mammoth/mammoth '; $test_host = ''; } $command = $yarnbin . $docx_path . ' --output-dir=' . $img_dir . ' 2>&1'; diff --git a/application/mammoth/mammoth b/application/mammoth/mammoth new file mode 100644 index 00000000..dce841a6 --- /dev/null +++ b/application/mammoth/mammoth @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir//bin/sh" ]; then + "$basedir//bin/sh" "$basedir/../Data/global/node_modules/.bin/mammoth" "$@" + ret=$? +else + /bin/sh "$basedir/../Data/global/node_modules/.bin/mammoth" "$@" + ret=$? +fi +exit $ret diff --git a/application/mammoth/mammoth.cmd b/application/mammoth/mammoth.cmd new file mode 100644 index 00000000..a67c9bd1 --- /dev/null +++ b/application/mammoth/mammoth.cmd @@ -0,0 +1 @@ +@"%~dp0\..\Data\global\node_modules\.bin\mammoth.cmd" %* diff --git a/application/mammoth/word2html.readme b/application/mammoth/word2html.readme new file mode 100644 index 00000000..e69de29b