diff --git a/src/filters/rclopxml.py b/src/filters/rclopxml.py index a1546796..0073e17b 100755 --- a/src/filters/rclopxml.py +++ b/src/filters/rclopxml.py @@ -199,7 +199,7 @@ class OXExtractor: docdata += '' - return (True, docdata, "", rclexecm.RclExecM.eofnow) + return (True, docdata, "", rclexecm.RclExecM.eofnext) ###### File type handler api, used by rclexecm ----------> diff --git a/src/filters/rclppt.py b/src/filters/rclppt.py index 0d2bf661..d506aecd 100755 --- a/src/filters/rclppt.py +++ b/src/filters/rclppt.py @@ -43,7 +43,7 @@ class PPTFilter: cmd = rclexecm.which("ppt-dump.py") if cmd: # ppt-dump.py often exits 1 with valid data. Ignore exit value - return ([cmd, "--no-struct-output", "--dump-text"], + return (["python", cmd, "--no-struct-output", "--dump-text"], PPTProcessData(self.em), rclexec1.Executor.opt_ignxval) else: return ([], None) diff --git a/src/filters/rclsoff.py b/src/filters/rclsoff.py index a5235bd2..d6a5b8c7 100755 --- a/src/filters/rclsoff.py +++ b/src/filters/rclsoff.py @@ -165,7 +165,7 @@ class OOExtractor: self.em.rclog("bad data in %s" % fn) return (False, "", "", rclexecm.RclExecM.eofnow) - return (True, docdata, "", rclexecm.RclExecM.eofnow) + return (True, docdata, "", rclexecm.RclExecM.eofnext) ###### File type handler api, used by rclexecm ----------> def openfile(self, params): diff --git a/src/filters/rclxls.py b/src/filters/rclxls.py index 806efb34..e25a6cb1 100755 --- a/src/filters/rclxls.py +++ b/src/filters/rclxls.py @@ -49,7 +49,8 @@ class XLSFilter: cmd = rclexecm.which("xls-dump.py") if cmd: # xls-dump.py often exits 1 with valid data. Ignore exit value - return ([cmd, "--dump-mode=canonical-xml", "--utf-8", "--catch"], + return (["python", cmd, "--dump-mode=canonical-xml", \ + "--utf-8", "--catch"], XLSProcessData(self.em), rclexec1.Executor.opt_ignxval) else: return ([], None) diff --git a/src/internfile/mimehandler.cpp b/src/internfile/mimehandler.cpp index 3a3b7cbc..d26ad8ca 100644 --- a/src/internfile/mimehandler.cpp +++ b/src/internfile/mimehandler.cpp @@ -222,10 +222,10 @@ MimeHandlerExec *mhExecFactory(RclConfig *cfg, const string& mtype, string& hs, new MimeHandlerExec(cfg, id); vector::iterator it = cmdtoks.begin(); -#ifdef _WIN32 // Special-case python and perl on windows: we need to also locate the // first argument which is the script name "python somescript.py". - // On Unix, thanks to #!, we just run "somescript.py" + // On Unix, thanks to #!, we usually just run "somescript.py", but need + // the same change if we ever want to use the same cmdling as windows if (!stringlowercmp("python", *it) || !stringlowercmp("perl", *it)) { if (cmdtoks.size() < 2) { LOGERR(("mhExecFactory: python/perl cmd: no script?. [%s]: [%s]\n", @@ -235,7 +235,6 @@ MimeHandlerExec *mhExecFactory(RclConfig *cfg, const string& mtype, string& hs, it1++; *it1 = cfg->findFilter(*it1); } -#endif h->params.push_back(cfg->findFilter(*it++)); h->params.insert(h->params.end(), it, cmdtoks.end());