summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjvoisin2012-05-03 17:20:03 -0400
committerjvoisin2012-05-03 17:20:03 -0400
commita3b542285331823ab8e05662a3ae0d5fc73f974f (patch)
tree5e0adb7f27d929e318f9365bc913925bc2eaed39 /lib
parente76571e2dddee0dba228d05579f6aef28630ba63 (diff)
Better handling of dependencies regarding to PDF processing
Diffstat (limited to 'lib')
-rw-r--r--lib/office.py3
-rw-r--r--lib/strippers.py5
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/office.py b/lib/office.py
index 8350244..b557a6c 100644
--- a/lib/office.py
+++ b/lib/office.py
@@ -179,8 +179,9 @@ class PdfStripper(parser.GenericParser):
179 return True 179 return True
180 except: 180 except:
181 print('Unable to remove all metadata from %s, please install\ 181 print('Unable to remove all metadata from %s, please install\
182 pdfrw' % self.output) 182pdfrw' % self.output)
183 return False 183 return False
184 return True
184 185
185 def get_meta(self): 186 def get_meta(self):
186 ''' 187 '''
diff --git a/lib/strippers.py b/lib/strippers.py
index 7d27874..dfdf1ea 100644
--- a/lib/strippers.py
+++ b/lib/strippers.py
@@ -23,11 +23,12 @@ STRIPPERS = {
23try: # PDF support 23try: # PDF support
24 import poppler 24 import poppler
25 import cairo 25 import cairo
26 import pdfrw
26 STRIPPERS['application/x-pdf'] = office.PdfStripper 27 STRIPPERS['application/x-pdf'] = office.PdfStripper
27 STRIPPERS['application/pdf'] = office.PdfStripper 28 STRIPPERS['application/pdf'] = office.PdfStripper
28except ImportError: 29except ImportError:
29 print('Unable to import python-poppler and/or python-cairo: no PDF \ 30 print('Unable to import python-poppler and/or python-cairo \
30 support') 31and/or pdfrw: no PDF support')
31 32
32try: # mutangen-python : audio format support 33try: # mutangen-python : audio format support
33 import mutagen 34 import mutagen