summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2011-11-07 11:41:22 +0100
committerjvoisin2011-11-07 11:41:22 +0100
commit7e43701c21b04338ce3c44f5d1ea918fa4315047 (patch)
treef69ef68b812bbab9afbc70c2022f587354223edb
parent09f43643326a4511850f6a47215f37e6b7f32f51 (diff)
Comments
-rw-r--r--mat/strippers.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/mat/strippers.py b/mat/strippers.py
index 7e5ac9e..f7c49b0 100644
--- a/mat/strippers.py
+++ b/mat/strippers.py
@@ -20,7 +20,7 @@ STRIPPERS = {
20 'application/officeopenxml': office.OpenXmlStripper, 20 'application/officeopenxml': office.OpenXmlStripper,
21} 21}
22 22
23try: 23try: # pdf support
24 import poppler 24 import poppler
25 import cairo 25 import cairo
26 STRIPPERS['application/x-pdf'] = office.PdfStripper 26 STRIPPERS['application/x-pdf'] = office.PdfStripper
@@ -29,20 +29,19 @@ except ImportError:
29 print('Unable to import python-poppler and/or python-cairo: no pdf \ 29 print('Unable to import python-poppler and/or python-cairo: no pdf \
30 support') 30 support')
31 31
32try: 32 try: # mutangen-python : audio format support
33 import mutagen 33 import mutagen
34 STRIPPERS['audio/x-flac'] = audio.FlacStripper 34 STRIPPERS['audio/x-flac'] = audio.FlacStripper
35 STRIPPERS['audio/vorbis'] = audio.OggStripper 35 STRIPPERS['audio/vorbis'] = audio.OggStripper
36except ImportError: 36except ImportError:
37 print('Unable to import python-mutagen: limited audio format support') 37 print('Unable to import python-mutagen: limited audio format support')
38 38
39try: 39try: # check if exiftool is installed on the system
40 # check if exiftool is installed on the system
41 subprocess.Popen('exiftool', stdout=open('/dev/null')) 40 subprocess.Popen('exiftool', stdout=open('/dev/null'))
42 import exiftool 41 import exiftool
43 STRIPPERS['image/jpeg'] = exiftool.JpegStripper 42 STRIPPERS['image/jpeg'] = exiftool.JpegStripper
44 STRIPPERS['image/png'] = exiftool.PngStripper 43 STRIPPERS['image/png'] = exiftool.PngStripper
45except: 44except: # if exiftool is not installed, use hachoir
46 print('Unable to find exiftool: limited images support') 45 print('Unable to find exiftool: limited images support')
47 STRIPPERS['image/jpeg'] = images.JpegStripper 46 STRIPPERS['image/jpeg'] = images.JpegStripper
48 STRIPPERS['image/png'] = images.PngStripper 47 STRIPPERS['image/png'] = images.PngStripper