summaryrefslogtreecommitdiff
path: root/lib/mat.py
diff options
context:
space:
mode:
authorjvoisin2011-06-21 17:27:11 +0200
committerjvoisin2011-06-21 17:27:11 +0200
commit9e0f6cf0ea0a992450c12aec73b459403de5f3c2 (patch)
treeabce28e477f429f6bc174409a23955e0e1ca65a1 /lib/mat.py
parent5aa90822631b80502afaca18c222432d4f8c3cc1 (diff)
Pdf metadata support
Diffstat (limited to 'lib/mat.py')
-rw-r--r--lib/mat.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/mat.py b/lib/mat.py
index 5641c62..3cbd81b 100644
--- a/lib/mat.py
+++ b/lib/mat.py
@@ -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
12import hachoir_editor 12import hachoir_editor
13 13
14import images 14import images
15import audio
16import misc
15 17
16__version__ = "0.1" 18__version__ = "0.1"
17__author__ = "jvoisin" 19__author__ = "jvoisin"
@@ -19,6 +21,8 @@ __author__ = "jvoisin"
19strippers = { 21strippers = {
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
24def create_class_file(name): 28def 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)