actually postprocess
--HG-- branch : WINDOWSPORT
This commit is contained in:
parent
16f495a9c0
commit
f00ed2ba5a
@ -66,8 +66,10 @@ class WordPassData:
|
|||||||
def __init__(self, em):
|
def __init__(self, em):
|
||||||
self.out = ""
|
self.out = ""
|
||||||
self.em = em
|
self.em = em
|
||||||
|
|
||||||
def takeLine(self, line):
|
def takeLine(self, line):
|
||||||
self.out += line
|
self.out += line
|
||||||
|
|
||||||
def wrapData(self):
|
def wrapData(self):
|
||||||
self.em.setmimetype("text/html")
|
self.em.setmimetype("text/html")
|
||||||
return self.out
|
return self.out
|
||||||
@ -112,7 +114,7 @@ class WordFilter:
|
|||||||
if self.ntry == 0:
|
if self.ntry == 0:
|
||||||
self.ntry = 1
|
self.ntry = 1
|
||||||
return (["antiword", "-t", "-i", "1", "-m", "UTF-8"],
|
return (["antiword", "-t", "-i", "1", "-m", "UTF-8"],
|
||||||
WordPassData(self.em))
|
WordProcessData(self.em))
|
||||||
elif self.ntry == 1:
|
elif self.ntry == 1:
|
||||||
ntry = 2
|
ntry = 2
|
||||||
# antiword failed. Check for an rtf file, or text and
|
# antiword failed. Check for an rtf file, or text and
|
||||||
@ -132,7 +134,7 @@ class WordFilter:
|
|||||||
return ([],None)
|
return ([],None)
|
||||||
else:
|
else:
|
||||||
return ([],None)
|
return ([],None)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
thisdir = os.path.dirname(sys.argv[0])
|
thisdir = os.path.dirname(sys.argv[0])
|
||||||
proto = rclexecm.RclExecM()
|
proto = rclexecm.RclExecM()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user