Changeset 406 for pkpgcounter

Show
Ignore:
Timestamp:
09/11/06 23:24:54 (18 years ago)
Author:
jerome
Message:

pkpgcounter v2.00 is out.

Location:
pkpgcounter/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/BUGS

    r303 r406  
    2222pkpgcounter BUGS : 
    2323    
    24   - The PCL3/4/5 parser have to be rewritten as a table driven parser, which 
    25     will be more easily extensible. 
    26      
    2724  - All parsers need more testing, especially those which allow the number 
    2825    of copies to be specified as part of the data streams, as well as those 
  • pkpgcounter/trunk/man/pkpgcounter.1

    r387 r406  
    22.TH PKPGCOUNTER "1" "September 2006" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 pkpgcounter \- manual page for pkpgcounter 1.85 
     4pkpgcounter \- manual page for pkpgcounter 2.00 
    55.SH DESCRIPTION 
    6 pkpgcounter v1.85 (c) 2003, 2004, 2005, 2006 Jerome Alet 
     6pkpgcounter v2.00 (c) 2003, 2004, 2005, 2006 Jerome Alet 
    77.PP 
    88pkpgcounter is a generic Page Description Language parser. 
  • pkpgcounter/trunk/NEWS

    r387 r406  
    2222pkpgcounter News : 
    2323 
     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     
    2431  * 1.85 : 
    2532   
  • pkpgcounter/trunk/pkpgpdls/pcl345.py

    r403 r406  
    236236                self.setPageDict("duplex", value) 
    237237                 
    238     def escAmpb(self) :     
    239         """Handles the ESC&b sequence.""" 
    240         while 1 : 
    241             (value, end) = self.getInteger() 
    242             if value is None : 
    243                 return 
    244             if end == 'W' :     
    245                 self.pos += value 
    246                 #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                 return 
    254             if end == 'W' :     
    255                 self.pos += value 
    256                 #self.logdebug("SKIPTO %08x" % self.pos) 
    257                  
    258238    def escAmpp(self) :     
    259239        """Handles the ESC&p sequence.""" 
     
    266246                #self.logdebug("SKIPTO %08x" % self.pos) 
    267247                 
    268     def escAmpu(self) :     
    269         """Handles the ESC&u sequence.""" 
    270         while 1 : 
    271             (value, end) = self.getInteger() 
    272             if value is None : 
    273                 return 
    274                  
    275248    def escStarb(self) :     
    276249        """Handles the ESC*b sequence.""" 
     
    282255                self.pos += (value or 0) 
    283256                #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                 return 
    291             if end == 'W' :     
    292                 self.pos += value 
    293                 #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                 return 
    301                  
    302     def escStarp(self) :     
    303         """Handles the ESC*p sequence.""" 
    304         while 1 : 
    305             (value, end) = self.getInteger() 
    306             if value is None : 
    307                 return 
    308257                 
    309258    def escStarr(self) :     
     
    325274                self.startgfx.append(value) 
    326275                 
    327     def escStart(self) :     
    328         """Handles the ESC*t sequence.""" 
     276    def escStaroptAmpu(self) :     
     277        """Handles the ESC*o ESC*p ESC*t and ESC&u sequences.""" 
    329278        while 1 : 
    330279            (value, end) = self.getInteger() 
     
    332281                return 
    333282         
    334     def escRightorLeftParsf(self) :     
    335         """Handles the ESC(s, ESC)s, ESC(f sequences.""" 
     283    def escSkipSomethingW(self) :     
     284        """Handles the ESC???###W sequences.""" 
    336285        while 1 : 
    337286            (value, end) = self.getInteger() 
     
    432381        self.escamptags = [lambda : None ] * 256 
    433382        self.escamptags[ord('a')] = self.escAmpa 
    434         self.escamptags[ord('b')] = self.escAmpb 
    435383        self.escamptags[ord('l')] = self.escAmpl 
    436         self.escamptags[ord('n')] = self.escAmpn 
    437384        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 
    439388         
    440389        self.escstartags = [ lambda : None ] * 256 
    441390        self.escstartags[ord('b')] = self.escStarb 
    442         self.escstartags[ord('o')] = self.escStaro 
    443         self.escstartags[ord('p')] = self.escStarp 
    444391        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 
    452401         
    453402        self.escleftpartags = [ lambda : None ] * 256 
    454         self.escleftpartags[ord('s')] = self.escRightorLeftParsf 
    455         self.escleftpartags[ord('f')] = self.escRightorLeftParsf 
     403        self.escleftpartags[ord('s')] = self.escSkipSomethingW 
     404        self.escleftpartags[ord('f')] = self.escSkipSomethingW 
    456405         
    457406        self.escrightpartags = [ lambda : None ] * 256 
    458         self.escrightpartags[ord('s')] = self.escRightorLeftParsf 
     407        self.escrightpartags[ord('s')] = self.escSkipSomethingW 
    459408         
    460409        self.pos = 0 
  • pkpgcounter/trunk/pkpgpdls/version.py

    r403 r406  
    2323 
    2424 
    25 __version__ = "1.86beta" 
     25__version__ = "2.00" 
    2626 
    2727__doc__ = """pkpgcounter : a generic Page Description Languages parser.""" 
  • pkpgcounter/trunk/README

    r386 r406  
    126126============================================================================= 
    127127 
    128 The PCL3/4/5 parser included in pkpgcounter is a Python backport of an early 
     128Before pkpgcounter v1.86, the PCL3/4/5 parser was a Python backport of an early 
    129129release 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 : 
     130Manin, available from : 
    134131 
    135132    http://www.fea.unicamp.br/pclcount/ 
     
    137134Their software is distributed under either the terms of a BSD-like license,     
    138135or the terms of the GNU General Public License of the Free Software Foundation. 
     136 
     137Beginning with pkpgcounter v1.86, the PCL3/4/5 parser was rewritten from 
     138scratch, and is now much more readable, maintainable, and of course accurate. 
     139 
     140The old parser is still available, but not used, in the pkpgpdls/oldpcl345.py 
     141Python module. 
    139142     
    140 Over time both software evolved following different paths, and the accounting 
    141 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 how  
    144 PCLCount would behave with the same input files. 
    145  
    146143pkpgcounter's PCLXL (aka PCL6) parser doesn't originate from PCLCount, but  
    147 was written from scratch.  
     144was written from scratch, just like all the other parsers included in 
     145pkpgcounter. 
    148146 
    149147=============================================================================