Changeset 406 for pkpgcounter/trunk
- Timestamp:
- 09/11/06 23:24:54 (18 years ago)
- Location:
- pkpgcounter/trunk
- Files:
-
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/BUGS
r303 r406 22 22 pkpgcounter BUGS : 23 23 24 - The PCL3/4/5 parser have to be rewritten as a table driven parser, which25 will be more easily extensible.26 27 24 - All parsers need more testing, especially those which allow the number 28 25 of copies to be specified as part of the data streams, as well as those -
pkpgcounter/trunk/man/pkpgcounter.1
r387 r406 2 2 .TH PKPGCOUNTER "1" "September 2006" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NAME 4 pkpgcounter \- manual page for pkpgcounter 1.854 pkpgcounter \- manual page for pkpgcounter 2.00 5 5 .SH DESCRIPTION 6 pkpgcounter v 1.85(c) 2003, 2004, 2005, 2006 Jerome Alet6 pkpgcounter v2.00 (c) 2003, 2004, 2005, 2006 Jerome Alet 7 7 .PP 8 8 pkpgcounter is a generic Page Description Language parser. -
pkpgcounter/trunk/NEWS
r387 r406 22 22 pkpgcounter News : 23 23 24 * 2.00 : 25 26 - The PCL3/4/5 parser was rewritten from scratch and is now 27 table driven. 28 29 - Improved the PostScript parser. 30 24 31 * 1.85 : 25 32 -
pkpgcounter/trunk/pkpgpdls/pcl345.py
r403 r406 236 236 self.setPageDict("duplex", value) 237 237 238 def escAmpb(self) :239 """Handles the ESC&b sequence."""240 while 1 :241 (value, end) = self.getInteger()242 if value is None :243 return244 if end == 'W' :245 self.pos += value246 #self.logdebug("SKIPTO %08x" % self.pos)247 248 def escAmpn(self) :249 """Handles the ESC&n sequence."""250 while 1 :251 (value, end) = self.getInteger()252 if value is None :253 return254 if end == 'W' :255 self.pos += value256 #self.logdebug("SKIPTO %08x" % self.pos)257 258 238 def escAmpp(self) : 259 239 """Handles the ESC&p sequence.""" … … 266 246 #self.logdebug("SKIPTO %08x" % self.pos) 267 247 268 def escAmpu(self) :269 """Handles the ESC&u sequence."""270 while 1 :271 (value, end) = self.getInteger()272 if value is None :273 return274 275 248 def escStarb(self) : 276 249 """Handles the ESC*b sequence.""" … … 282 255 self.pos += (value or 0) 283 256 #self.logdebug("SKIPTO %08x" % self.pos) 284 285 def escStarcgilmv(self) :286 """Handles the ESC*c, ESC*g, ESC*i, ESC*l, ESC*m, ESC*v sequences."""287 while 1 :288 (value, end) = self.getInteger()289 if value is None :290 return291 if end == 'W' :292 self.pos += value293 #self.logdebug("SKIPTO %08x" % self.pos)294 295 def escStaro(self) :296 """Handles the ESC*o sequence."""297 while 1 :298 (value, end) = self.getInteger()299 if value is None :300 return301 302 def escStarp(self) :303 """Handles the ESC*p sequence."""304 while 1 :305 (value, end) = self.getInteger()306 if value is None :307 return308 257 309 258 def escStarr(self) : … … 325 274 self.startgfx.append(value) 326 275 327 def escStar t(self) :328 """Handles the ESC* t sequence."""276 def escStaroptAmpu(self) : 277 """Handles the ESC*o ESC*p ESC*t and ESC&u sequences.""" 329 278 while 1 : 330 279 (value, end) = self.getInteger() … … 332 281 return 333 282 334 def esc RightorLeftParsf(self) :335 """Handles the ESC (s, ESC)s, ESC(fsequences."""283 def escSkipSomethingW(self) : 284 """Handles the ESC???###W sequences.""" 336 285 while 1 : 337 286 (value, end) = self.getInteger() … … 432 381 self.escamptags = [lambda : None ] * 256 433 382 self.escamptags[ord('a')] = self.escAmpa 434 self.escamptags[ord('b')] = self.escAmpb435 383 self.escamptags[ord('l')] = self.escAmpl 436 self.escamptags[ord('n')] = self.escAmpn437 384 self.escamptags[ord('p')] = self.escAmpp 438 self.escamptags[ord('u')] = self.escAmpu 385 self.escamptags[ord('b')] = self.escSkipSomethingW 386 self.escamptags[ord('n')] = self.escSkipSomethingW 387 self.escamptags[ord('u')] = self.escStaroptAmpu 439 388 440 389 self.escstartags = [ lambda : None ] * 256 441 390 self.escstartags[ord('b')] = self.escStarb 442 self.escstartags[ord('o')] = self.escStaro443 self.escstartags[ord('p')] = self.escStarp444 391 self.escstartags[ord('r')] = self.escStarr 445 self.escstartags[ord('t')] = self.escStart 446 self.escstartags[ord('c')] = self.escStarcgilmv 447 self.escstartags[ord('g')] = self.escStarcgilmv 448 self.escstartags[ord('i')] = self.escStarcgilmv 449 self.escstartags[ord('l')] = self.escStarcgilmv 450 self.escstartags[ord('m')] = self.escStarcgilmv 451 self.escstartags[ord('v')] = self.escStarcgilmv 392 self.escstartags[ord('o')] = self.escStaroptAmpu 393 self.escstartags[ord('p')] = self.escStaroptAmpu 394 self.escstartags[ord('t')] = self.escStaroptAmpu 395 self.escstartags[ord('c')] = self.escSkipSomethingW 396 self.escstartags[ord('g')] = self.escSkipSomethingW 397 self.escstartags[ord('i')] = self.escSkipSomethingW 398 self.escstartags[ord('l')] = self.escSkipSomethingW 399 self.escstartags[ord('m')] = self.escSkipSomethingW 400 self.escstartags[ord('v')] = self.escSkipSomethingW 452 401 453 402 self.escleftpartags = [ lambda : None ] * 256 454 self.escleftpartags[ord('s')] = self.esc RightorLeftParsf455 self.escleftpartags[ord('f')] = self.esc RightorLeftParsf403 self.escleftpartags[ord('s')] = self.escSkipSomethingW 404 self.escleftpartags[ord('f')] = self.escSkipSomethingW 456 405 457 406 self.escrightpartags = [ lambda : None ] * 256 458 self.escrightpartags[ord('s')] = self.esc RightorLeftParsf407 self.escrightpartags[ord('s')] = self.escSkipSomethingW 459 408 460 409 self.pos = 0 -
pkpgcounter/trunk/pkpgpdls/version.py
r403 r406 23 23 24 24 25 __version__ = " 1.86beta"25 __version__ = "2.00" 26 26 27 27 __doc__ = """pkpgcounter : a generic Page Description Languages parser.""" -
pkpgcounter/trunk/README
r386 r406 126 126 ============================================================================= 127 127 128 The PCL3/4/5 parser included in pkpgcounter is a Python backport of an early128 Before pkpgcounter v1.86, the PCL3/4/5 parser was a Python backport of an early 129 129 release of the PCLCount software by Eduardo Gielamo Oliveira and Rodolfo Broco 130 Manin. 131 132 Although this IS NOT needed for pkpgcounter to work, you can download the 133 original PCLCount software from : 130 Manin, available from : 134 131 135 132 http://www.fea.unicamp.br/pclcount/ … … 137 134 Their software is distributed under either the terms of a BSD-like license, 138 135 or the terms of the GNU General Public License of the Free Software Foundation. 136 137 Beginning with pkpgcounter v1.86, the PCL3/4/5 parser was rewritten from 138 scratch, and is now much more readable, maintainable, and of course accurate. 139 140 The old parser is still available, but not used, in the pkpgpdls/oldpcl345.py 141 Python module. 139 142 140 Over time both software evolved following different paths, and the accounting141 results they give may differ depending on the printer driver being used.142 We know that pkpgcounter's PCL3/4/5 parser sometimes is not accurate,143 and we are working on improving the situation. We currently don't know how144 PCLCount would behave with the same input files.145 146 143 pkpgcounter's PCLXL (aka PCL6) parser doesn't originate from PCLCount, but 147 was written from scratch. 144 was written from scratch, just like all the other parsers included in 145 pkpgcounter. 148 146 149 147 =============================================================================