mirror of https://github.com/CIRCL/PyCIRCLean
Proper handling of OOXML docs
parent
aaad11b5c1
commit
e8de330d34
|
@ -274,17 +274,21 @@ class KittenGroomerFileCheck(KittenGroomerBase):
|
|||
|
||||
# ##### Converted ######
|
||||
def text(self):
|
||||
''' LibreOffice should be able to open all the files '''
|
||||
for r in mimes_rtf:
|
||||
if r in self.cur_file.sub_type:
|
||||
self.cur_file.log_string += 'Rich Text file'
|
||||
# TODO: need a way to convert it to plain text
|
||||
self.cur_file.force_ext('.txt')
|
||||
self._safe_copy()
|
||||
else:
|
||||
self.cur_file.log_string += 'Text file'
|
||||
self.cur_file.force_ext('.txt')
|
||||
self._safe_copy()
|
||||
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.force_ext('.txt')
|
||||
self._safe_copy()
|
||||
|
||||
def application(self):
|
||||
''' Everything can be there, using the subtype to decide '''
|
||||
|
|
Loading…
Reference in New Issue