Changeset 527 for pkpgcounter/trunk/pkpgpdls/mscrap.py
- Timestamp:
- 11/28/07 18:28:30 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/mscrap.py
r525 r527 32 32 """A parser for that MS crap thing.""" 33 33 totiffcommands = [ 'xvfb-run -a abiword --import-extension=.doc --print="| gs -sDEVICE=tiff24nc -dPARANOIDSAFER -dNOPAUSE -dBATCH -dQUIET -r\"%(dpi)i\" -sOutputFile=\"%(outfname)s\" -" "%(infname)s"' ] 34 required = [ "xvfb-run", "xauth", "abiword", "gs" ] 34 35 def isValid(self) : 35 36 """Returns True if data is MS crap, else False. … … 46 47 or self.firstblock[2112:].startswith("MSWordDoc") : 47 48 self.logdebug("DEBUG: Input file seems to be in a Microsoft shitty file format.") 48 return True 49 # Here we do the missing test because all commands will be needed even in page counting mode 50 if self.isMissing(self.required) : 51 return False 52 else : 53 return True 49 54 else : 50 55 return False