diff options
| author | jvoisin | 2018-03-31 21:22:16 +0200 |
|---|---|---|
| committer | jvoisin | 2018-03-31 21:22:16 +0200 |
| commit | 88fcd4071dc0d23d2d6de49e37f40947488f0df2 (patch) | |
| tree | faa1ba1ab5ecc138621c866432e8cd00f3d920e9 /src | |
| parent | 12b3b39d4d5520af04233578ec93138eb192621e (diff) | |
Support even more libreoffice files
Diffstat (limited to 'src')
| -rw-r--r-- | src/libreoffice.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libreoffice.py b/src/libreoffice.py index b7e0dfb..a3481a1 100644 --- a/src/libreoffice.py +++ b/src/libreoffice.py | |||
| @@ -11,6 +11,10 @@ from . import abstract, parser_factory | |||
| 11 | class LibreOfficeParser(abstract.AbstractParser): | 11 | class LibreOfficeParser(abstract.AbstractParser): |
| 12 | mimetypes = { | 12 | mimetypes = { |
| 13 | 'application/vnd.oasis.opendocument.text', | 13 | 'application/vnd.oasis.opendocument.text', |
| 14 | 'application/vnd.oasis.opendocument.spreadsheet', | ||
| 15 | 'application/vnd.oasis.opendocument.presentation', | ||
| 16 | 'application/vnd.oasis.opendocument.graphics', | ||
| 17 | 'application/vnd.oasis.opendocument.chart' | ||
| 14 | } | 18 | } |
| 15 | 19 | ||
| 16 | def get_meta(self): | 20 | def get_meta(self): |
| @@ -39,7 +43,7 @@ class LibreOfficeParser(abstract.AbstractParser): | |||
| 39 | if item.filename[-1] == '/': | 43 | if item.filename[-1] == '/': |
| 40 | continue # `is_dir` is added in Python3.6 | 44 | continue # `is_dir` is added in Python3.6 |
| 41 | elif item.filename == 'meta.xml': | 45 | elif item.filename == 'meta.xml': |
| 42 | continue # don't keep metadata files | 46 | continue # don't keep metadata files |
| 43 | 47 | ||
| 44 | zin.extract(member=item, path=temp_folder) | 48 | zin.extract(member=item, path=temp_folder) |
| 45 | tmp_parser = parser_factory.get_parser(os.path.join(temp_folder, item.filename)) | 49 | tmp_parser = parser_factory.get_parser(os.path.join(temp_folder, item.filename)) |
