[diffoscope] [PATCH] Add rudimentary support for OpenDocumentFormat files
Michel Messerschmidt
ironicx at virtualfreedom.de
Tue Oct 11 19:11:46 CEST 2016
The small patch below just treats ODF files as Zip files.
More useful output probably needs XML parsing...
Thanks,
Michel
---
diffoscope/comparators/zip.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diffoscope/comparators/zip.py b/diffoscope/comparators/zip.py
index 6ca3783..c551974 100644
--- a/diffoscope/comparators/zip.py
+++ b/diffoscope/comparators/zip.py
@@ -102,7 +102,7 @@ class ZipContainer(Archive):
class ZipFile(File):
CONTAINER_CLASS = ZipContainer
- RE_FILE_TYPE = re.compile(r'^(Zip archive|Java archive|EPUB document)\b')
+ RE_FILE_TYPE = re.compile(r'^(Zip archive|Java archive|EPUB document|OpenDocument (Text|Spreadsheet|Presentation|Drawing|Formula|Template|Text Template))\b')
@staticmethod
def recognizes(file):
--
2.1.4
More information about the diffoscope
mailing list