Changeset 2307
- Timestamp:
- 06/10/05 22:01:50 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/conf/pykota.conf.sample
r2303 r2307 295 295 # [global] section. 296 296 privacy : no 297 298 # Should we strip off some characters from the beginning of 299 # print jobs' titles ? This can be used to remove smbprn.?????? 300 # which sometimes appear when printing in raw mode from Windows 301 # through Samba. 302 # This setting only applies at printing time. 303 # When not set, titles are used as received from the printing system. 304 # The default is to not strip any character off of jobs' titles. 305 # This value can be set either globally or on a per printer basis 306 # If both are defined, the printer option has priority. 307 # striptitle : smbprn.?????? 297 308 298 309 # What is the accounting backend to use -
pykota/trunk/NEWS
r2305 r2307 24 24 - 1.23alpha9 : 25 25 26 - Introduced the new 'striptitle' directive to remove ugly prefixes 27 from print job's titles whenever a new print job is submitted. 28 26 29 - Fixed internal SNMP accounter for printers which only have a life time 27 30 page counter, and not a volatile page counter. -
pykota/trunk/pykota/config.py
r2302 r2307 191 191 return # No command to launch in the post-hook 192 192 193 def getStripTitle(self, printername) : 194 """Returns the striptitle directive's content, or None if unset.""" 195 try : 196 return self.getPrinterOption(printername, "striptitle").strip() 197 except PyKotaConfigError : 198 return # No prefix to strip off 199 193 200 def getPrinterEnforcement(self, printername) : 194 201 """Returns if quota enforcement should be strict or laxist for the current printer.""" -
pykota/trunk/pykota/tool.py
r2302 r2307 665 665 self.username = self.username.lower() 666 666 667 # do we want to strip some prefix off of titles ? 668 stripprefix = self.config.getStripTitle(self.printername) 669 if stripprefix : 670 if fnmatch.fnmatch(self.title[:len(stripprefix)], stripprefix) : 671 self.logdebug("Prefix [%s] removed from job's title [%s]." % (stripprefix, self.title)) 672 self.title = self.title[len(stripprefix):] 673 667 674 self.preserveinputfile = self.inputfile 668 675 try : -
pykota/trunk/TODO
r2304 r2307 64 64 be easy. 65 65 66 - Add a way to strip off "smbprn.????????" from the left of67 print jobs' titles (only appear when printing as raw from68 Winboxes it seems)69 70 66 - Pass-through mode for printers : history correctly filled (including 71 67 job size) but no impact on user's page counter or account