From cffdcc1b1e78d48cad62c54432a9d8ce41f4d616 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 27 Dec 2012 17:01:30 +0100 Subject: Refactor the archive parser Refactoring of the archive and office parser, in order to simplify the code and reduce abstraction --- MAT/office.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'MAT/office.py') diff --git a/MAT/office.py b/MAT/office.py index e7ce661..20664d2 100644 --- a/MAT/office.py +++ b/MAT/office.py @@ -49,7 +49,7 @@ class OpenDocumentStripper(archive.GenericArchiveStripper): logging.debug('%s has no opendocument metadata' % self.filename) return metadata - def _remove_all(self): + def remove_all(self): ''' FIXME ? There is a patch implementing the Zipfile.remove() @@ -139,12 +139,6 @@ class PdfStripper(parser.GenericParser): return True def remove_all(self): - ''' - Remove metadata - ''' - return self._remove_meta() - - def _remove_meta(self): ''' Opening the PDF with poppler, then doing a render on a cairo pdfsurface for each pages. @@ -202,7 +196,7 @@ class OpenXmlStripper(archive.GenericArchiveStripper): It contains mostly xml, but can have media blobs, crap, ... (I don't like this format.) ''' - def _remove_all(self): + def remove_all(self): ''' FIXME ? There is a patch implementing the Zipfile.remove() -- cgit v1.3