Changeset 314

Show
Ignore:
Timestamp:
02/08/06 09:31:42 (19 years ago)
Author:
jerome
Message:

1.76 is out.

Location:
pkpgcounter/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/man/pkpgcounter.1

    r303 r314  
    1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.35. 
    2 .TH PKPGCOUNTER "1" "January 2006" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
     1.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36. 
     2.TH PKPGCOUNTER "1" "February 2006" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 pkpgcounter \- manual page for pkpgcounter 1.74 
     4pkpgcounter \- manual page for pkpgcounter 1.76 
    55.SH DESCRIPTION 
    6 pkpgcounter v1.74 (c) 2003, 2004, 2005, 2006 Jerome Alet 
     6pkpgcounter v1.76 (c) 2003, 2004, 2005, 2006 Jerome Alet 
    77.PP 
    88pkpgcounter is a generic Page Description Language parser. 
  • pkpgcounter/trunk/NEWS

    r305 r314  
    2222pkpgcounter News : 
    2323 
     24  * 1.76 : 
     25   
     26    - Improved the PCLXL parser wrt undocumented tags. 
     27     
     28    - Preliminary support for Kyocera Prescribe commands. 
     29     
    2430  * 1.75 : 
    2531   
  • pkpgcounter/trunk/pkpgpdls/pclxl.py

    r313 r314  
    329329        """Handles the ESC code.""" 
    330330        pos = endpos = self.pos 
    331         if self.minfile[pos : pos+8] == r"%-12345X" : 
     331        minfile = self.minfile 
     332        if minfile[pos : pos+8] == r"%-12345X" : 
    332333            endpos = pos + 9 
    333334            endmark = chr(0x0c) + chr(0x00) + chr(0x1b) 
    334335            asciilimit = chr(0x80) 
    335336            quotes = 0 
    336             while (self.minfile[endpos] not in endmark) and \ 
    337                    ((self.minfile[endpos] < asciilimit) or (quotes % 2)) : 
    338                 if self.minfile[endpos] == '"' : 
     337            while (minfile[endpos] not in endmark) and \ 
     338                   ((minfile[endpos] < asciilimit) or (quotes % 2)) : 
     339                if minfile[endpos] == '"' : 
    339340                    quotes += 1 
    340341                endpos += 1 
     
    343344            # NB : First time will be at page 0 (i.e. **before** page 1) ! 
    344345            stuff = self.escapedStuff.setdefault(self.pagecount, []) 
    345             stuff.append(self.minfile[pos : endpos]) 
    346             self.logdebug("Escaped datas : [%s]" % repr(self.minfile[pos : endpos])) 
     346            stuff.append(minfile[pos : endpos]) 
     347            self.logdebug("Escaped datas : [%s]" % repr(minfile[pos : endpos])) 
    347348        return endpos - pos 
    348349         
    349350    def skipKyoceraPrescribe(self) :     
    350351        """Skips Kyocera Prescribe commands.""" 
     352        pos = self.pos - 1 
    351353        minfile = self.minfile 
    352         pos = self.pos - 1 
    353354        if minfile[pos:pos+3] == "!R!" : 
    354355            while (pos - self.pos) < 1024 :   # This is a realistic upper bound, to avoid infinite loops 
    355356                if (minfile[pos] == ";") and (minfile[pos-4:pos] == "EXIT") : 
    356                     return (pos + 1 - self.pos) 
     357                    pos += 1 
     358                    prescribe = self.prescribeStuff.setdefault(self.pagecount, []) 
     359                    prescribe.append(minfile[self.pos-1:pos]) 
     360                    self.logdebug("Prescribe commands : [%s]" % repr(minfile[self.pos-1:pos])) 
     361                    return (pos - self.pos) 
    357362                pos += 1     
    358363        else : 
     
    567572        tags = self.tags 
    568573        self.pagecount = 0 
    569         self.escapedStuff = {} 
     574        self.escapedStuff = {}   # For escaped datas, mostly PJL commands 
     575        self.prescribeStuff = {} # For Kyocera Prescribe commands 
    570576        self.pos = pos = oldpos = 0 
    571577        try : 
  • pkpgcounter/trunk/pkpgpdls/postscript.py

    r308 r314  
    8585        previousline = "" 
    8686        notrust = 0 
    87         kpdl = 0 # Kyocera Mita 
     87        prescribe = 0 # Kyocera's Prescribe commands 
    8888        for line in self.infile.xreadlines() :  
    89             if (not kpdl) and line.startswith(r"%%BeginResource: procset pdf") : 
     89            if (not prescribe) and line.startswith(r"%%BeginResource: procset pdf") : 
    9090                notrust = 1 # Let this stuff be managed by GhostScript, but we still extract number of copies 
    91             elif line.startswith("/KPDLBASE") : 
    92                 kpdl = 1 
     91            elif line.startswith("!R!") : 
     92                prescribe = 1 
    9393            elif line.startswith(r"%%Page: ") or line.startswith(r"(%%[Page: ") : 
    9494                proceed = 1 
  • pkpgcounter/trunk/pkpgpdls/version.py

    r307 r314  
    2020# 
    2121 
    22 __version__ = "1.76beta" 
     22__version__ = "1.76" 
    2323 
    2424__doc__ = """pkpgcounter : a generic Page Description Languages parser."""