Small filter fixes
--HG-- branch : WINDOWSPORT
This commit is contained in:
parent
7337e5a9ff
commit
031a2a0b4a
@ -199,7 +199,7 @@ class OXExtractor:
|
||||
|
||||
docdata += '</body></html>'
|
||||
|
||||
return (True, docdata, "", rclexecm.RclExecM.eofnow)
|
||||
return (True, docdata, "", rclexecm.RclExecM.eofnext)
|
||||
|
||||
|
||||
###### File type handler api, used by rclexecm ---------->
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -222,10 +222,10 @@ MimeHandlerExec *mhExecFactory(RclConfig *cfg, const string& mtype, string& hs,
|
||||
new MimeHandlerExec(cfg, id);
|
||||
vector<string>::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());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user