diff options
| author | jvoisin | 2011-06-21 17:27:11 +0200 |
|---|---|---|
| committer | jvoisin | 2011-06-21 17:27:11 +0200 |
| commit | 9e0f6cf0ea0a992450c12aec73b459403de5f3c2 (patch) | |
| tree | abce28e477f429f6bc174409a23955e0e1ca65a1 /lib/mat.py | |
| parent | 5aa90822631b80502afaca18c222432d4f8c3cc1 (diff) | |
Pdf metadata support
Diffstat (limited to 'lib/mat.py')
| -rw-r--r-- | lib/mat.py | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/python | 1 | #!/usr/bin/env python |
| 2 | 2 | ||
| 3 | ''' | 3 | ''' |
| 4 | Metadata anonymisation toolkit library | 4 | Metadata anonymisation toolkit library |
| @@ -12,6 +12,8 @@ import hachoir_parser | |||
| 12 | import hachoir_editor | 12 | import hachoir_editor |
| 13 | 13 | ||
| 14 | import images | 14 | import images |
| 15 | import audio | ||
| 16 | import misc | ||
| 15 | 17 | ||
| 16 | __version__ = "0.1" | 18 | __version__ = "0.1" |
| 17 | __author__ = "jvoisin" | 19 | __author__ = "jvoisin" |
| @@ -19,6 +21,8 @@ __author__ = "jvoisin" | |||
| 19 | strippers = { | 21 | strippers = { |
| 20 | hachoir_parser.image.JpegFile: images.JpegStripper, | 22 | hachoir_parser.image.JpegFile: images.JpegStripper, |
| 21 | hachoir_parser.image.PngFile: images.PngStripper, | 23 | hachoir_parser.image.PngFile: images.PngStripper, |
| 24 | hachoir_parser.audio.MpegAudioFile: audio.MpegAudioStripper, | ||
| 25 | hachoir_parser.misc.PDFDocument: misc.PdfStripper, | ||
| 22 | } | 26 | } |
| 23 | 27 | ||
| 24 | def create_class_file(name): | 28 | def create_class_file(name): |
| @@ -50,4 +54,6 @@ def create_class_file(name): | |||
| 50 | #Place for another lib than hachoir | 54 | #Place for another lib than hachoir |
| 51 | print("Don't have stripper for file type: %s" % editor.description) | 55 | print("Don't have stripper for file type: %s" % editor.description) |
| 52 | sys.exit(1) | 56 | sys.exit(1) |
| 57 | if editor.input.__class__ == hachoir_parser.misc.PDFDocument: | ||
| 58 | return stripper_class(filename) | ||
| 53 | return stripper_class(realname, filename, parser, editor) | 59 | return stripper_class(realname, filename, parser, editor) |
