Proper handling of OOXML docs

pull/9/head
Raphaël Vinot 2016-02-01 12:34:47 +01:00
parent aaad11b5c1
commit e8de330d34
1 changed files with 14 additions and 10 deletions

View File

@ -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 '''