Changeset 418
- Timestamp:
- 09/15/06 11:19:37 (18 years ago)
- Location:
- pkpgcounter/trunk
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/bin/pkpgcounter
r386 r418 45 45 * PCL3/4/5 (mostly) 46 46 * DVI 47 * Plain text 47 48 * TIFF 48 49 * ESC/P2 … … 50 51 * Zenographics ZjStream 51 52 * Samsung QPDL (aka SPL2) 53 * Samsung SPL1 52 54 53 The f ourlatter ones, as well as some TIFF documents, are currently55 The five latter ones, as well as some TIFF documents, are currently 54 56 only supported in page counting mode. 55 57 -
pkpgcounter/trunk/NEWS
r406 r418 22 22 pkpgcounter News : 23 23 24 * 2.10 : 25 26 - Added a plain text parser, with support for both page counting and 27 ink coverage. 28 29 - Added a minimal SPL1 parser. 30 31 - Fixed a problem in the PCLXL parser related to Kyocera printer drivers. 32 24 33 * 2.00 : 25 34 -
pkpgcounter/trunk/pkpgpdls/plain.py
r414 r418 26 26 import sys 27 27 import os 28 import mmap29 28 30 29 import pdlparser … … 34 33 class Parser(pdlparser.PDLParser) : 35 34 """A parser for plain text documents.""" 35 enscript = 'enscript --quiet --portrait --no-header --columns 1 --output - | gs -sDEVICE=tiff24nc -dPARANOIDSAFER -dNOPAUSE -dBATCH -dQUIET -r%(dpi)i -sOutputFile="%(fname)s" -' 36 a2ps = 'a2ps --borders 0 --quiet --portrait --no-header --columns 1 --output - | gs -sDEVICE=tiff24nc -dPARANOIDSAFER -dNOPAUSE -dBATCH -dQUIET -r%(dpi)i -sOutputFile="%(fname)s" -' 37 def __init__(self, infile, debug=0, firstblock=None, lastblock=None) : 38 """Initialize the plain text parser.""" 39 pdlparser.PDLParser.__init__(self, infile, debug, firstblock, lastblock) 40 41 # Tries to detect is a plain text to PostScript command line tool is available 42 # and use the first one we find. 43 paths = os.environ.get("PATH", "/usr/local/bin:/usr/bin:/bin").split(os.pathsep) 44 for cmd in ("enscript", "a2ps") : 45 for path in paths : 46 if os.path.exists(os.path.join(path, cmd)) : 47 self.totiffcommand = getattr(self, cmd) 48 return 49 36 50 def isValid(self) : 37 51 """Returns True if data is plain text, else False. -
pkpgcounter/trunk/pkpgpdls/version.py
r408 r418 23 23 24 24 25 __version__ = "2. 01alpha"25 __version__ = "2.10" 26 26 27 27 __doc__ = """pkpgcounter : a generic Page Description Languages parser.""" -
pkpgcounter/trunk/README
r406 r418 36 36 - DVI 37 37 38 - Plain text 39 38 40 - TIFF 39 41 … … 46 48 - Samsung QPDL (aka SPL2) 47 49 48 The four latter ones, as well as some TIFF documents, are currently 50 - Samsung SPL1 51 52 The five latter ones, as well as some TIFF documents, are currently 49 53 only supported in page counting mode. 50 54