diff options
| author | jvoisin | 2012-12-27 17:01:30 +0100 |
|---|---|---|
| committer | jvoisin | 2012-12-27 17:01:30 +0100 |
| commit | cffdcc1b1e78d48cad62c54432a9d8ce41f4d616 (patch) | |
| tree | f07e10cdbfb6fa1a5de4edb84435f10cb50ee191 /MAT/office.py | |
| parent | a36f48b460f7638052f2e8ac3f9ddde8232cf339 (diff) | |
Refactor the archive parser
Refactoring of the archive and office parser,
in order to simplify the code and reduce abstraction
Diffstat (limited to 'MAT/office.py')
| -rw-r--r-- | MAT/office.py | 10 |
1 files changed, 2 insertions, 8 deletions
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): | |||
| 49 | logging.debug('%s has no opendocument metadata' % self.filename) | 49 | logging.debug('%s has no opendocument metadata' % self.filename) |
| 50 | return metadata | 50 | return metadata |
| 51 | 51 | ||
| 52 | def _remove_all(self): | 52 | def remove_all(self): |
| 53 | ''' | 53 | ''' |
| 54 | FIXME ? | 54 | FIXME ? |
| 55 | There is a patch implementing the Zipfile.remove() | 55 | There is a patch implementing the Zipfile.remove() |
| @@ -140,12 +140,6 @@ class PdfStripper(parser.GenericParser): | |||
| 140 | 140 | ||
| 141 | def remove_all(self): | 141 | def remove_all(self): |
| 142 | ''' | 142 | ''' |
| 143 | Remove metadata | ||
| 144 | ''' | ||
| 145 | return self._remove_meta() | ||
| 146 | |||
| 147 | def _remove_meta(self): | ||
| 148 | ''' | ||
| 149 | Opening the PDF with poppler, then doing a render | 143 | Opening the PDF with poppler, then doing a render |
| 150 | on a cairo pdfsurface for each pages. | 144 | on a cairo pdfsurface for each pages. |
| 151 | 145 | ||
| @@ -202,7 +196,7 @@ class OpenXmlStripper(archive.GenericArchiveStripper): | |||
| 202 | It contains mostly xml, but can have media blobs, crap, ... | 196 | It contains mostly xml, but can have media blobs, crap, ... |
| 203 | (I don't like this format.) | 197 | (I don't like this format.) |
| 204 | ''' | 198 | ''' |
| 205 | def _remove_all(self): | 199 | def remove_all(self): |
| 206 | ''' | 200 | ''' |
| 207 | FIXME ? | 201 | FIXME ? |
| 208 | There is a patch implementing the Zipfile.remove() | 202 | There is a patch implementing the Zipfile.remove() |
