mirror of https://github.com/CIRCL/PyCIRCLean
Proper handling of OOXML docs
parent
aaad11b5c1
commit
e8de330d34
|
@ -274,14 +274,18 @@ class KittenGroomerFileCheck(KittenGroomerBase):
|
||||||
|
|
||||||
# ##### Converted ######
|
# ##### Converted ######
|
||||||
def text(self):
|
def text(self):
|
||||||
''' LibreOffice should be able to open all the files '''
|
|
||||||
for r in mimes_rtf:
|
for r in mimes_rtf:
|
||||||
if r in self.cur_file.sub_type:
|
if r in self.cur_file.sub_type:
|
||||||
self.cur_file.log_string += 'Rich Text file'
|
self.cur_file.log_string += 'Rich Text file'
|
||||||
# TODO: need a way to convert it to plain text
|
# TODO: need a way to convert it to plain text
|
||||||
self.cur_file.force_ext('.txt')
|
self.cur_file.force_ext('.txt')
|
||||||
self._safe_copy()
|
self._safe_copy()
|
||||||
else:
|
return
|
||||||
|
for o in mimes_ooxml:
|
||||||
|
if o in self.cur_file.sub_type:
|
||||||
|
self.cur_file.log_string += 'OOXML File'
|
||||||
|
self._ooxml()
|
||||||
|
return
|
||||||
self.cur_file.log_string += 'Text file'
|
self.cur_file.log_string += 'Text file'
|
||||||
self.cur_file.force_ext('.txt')
|
self.cur_file.force_ext('.txt')
|
||||||
self._safe_copy()
|
self._safe_copy()
|
||||||
|
|
Loading…
Reference in New Issue