Changeset 263 for pkpgcounter
- Timestamp:
- 09/15/05 14:35:27 (19 years ago)
- Location:
- pkpgcounter/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/NEWS
r262 r263 22 22 pkpgcounter News : 23 23 24 * 1.68 : 25 26 - Improved PostScript parser. 27 24 28 * 1.67 : 25 29 -
pkpgcounter/trunk/pkpgpdls/postscript.py
r261 r263 79 79 pages = {} 80 80 pages[0] = { "copies" : 1 } 81 oldpagenum = None 81 82 previousline = "" 82 83 for line in self.infile.xreadlines() : 83 if line.startswith(r"%%Page: ") : 84 pagecount += 1 85 pages[pagecount] = { "copies" : pages[pagecount-1]["copies"] } 86 elif line.startswith(r"(%%[Page: ") : 87 pagecount += 1 88 pages[pagecount] = { "copies" : pages[pagecount-1]["copies"] } 84 if line.startswith(r"%%Page: ") or line.startswith(r"(%%[Page: ") : 85 proceed = 1 86 try : 87 newpagenum = int(line.split(']')[0].split()[1]) 88 except : 89 pass 90 else : 91 if newpagenum == oldpagenum : 92 proceed = 0 93 else : 94 oldpagenum = newpagenum 95 if proceed : 96 pagecount += 1 97 pages[pagecount] = { "copies" : pages[pagecount-1]["copies"] } 89 98 elif line.startswith(r"%%Requirements: numcopies(") : 90 99 try : -
pkpgcounter/trunk/pkpgpdls/version.py
r262 r263 20 20 # 21 21 22 __version__ = "1.6 7"22 __version__ = "1.68" 23 23 24 24 __doc__ = """pkpgcounter : a generic Page Description Languages parser."""