Changeset 1200 for pykota/trunk/pykota
- Timestamp:
- 11/21/03 15:28:46 (21 years ago)
- Location:
- pykota/trunk/pykota
- Files:
-
- 8 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/external.py
r1180 r1200 22 22 # 23 23 # $Log$ 24 # Revision 1.9 2003/11/21 14:28:45 jalet 25 # More complete job history. 26 # 24 27 # Revision 1.8 2003/11/12 23:29:24 jalet 25 28 # More work on new backend. This commit may be unstable. … … 104 107 105 108 # adds the current job to history 106 printer.addJobToHistory(self.filter.jobid, user, self.getLastPageCounter(), action, jobsize )109 printer.addJobToHistory(self.filter.jobid, user, self.getLastPageCounter(), action, jobsize, self.filter.preserveinputfile, self.filter.title, self.filter.copies, self.filter.options) 107 110 108 111 self.endJob(printer, user) -
pykota/trunk/pykota/accounters/querying.py
r1180 r1200 22 22 # 23 23 # $Log$ 24 # Revision 1.8 2003/11/21 14:28:46 jalet 25 # More complete job history. 26 # 24 27 # Revision 1.7 2003/11/12 23:29:24 jalet 25 28 # More work on new backend. This commit may be unstable. … … 178 181 179 182 # adds the current job to history 180 printer.addJobToHistory(self.filter.jobid, user, counterbeforejob, action )183 printer.addJobToHistory(self.filter.jobid, user, counterbeforejob, action, filename=self.filter.preserveinputfile, title=self.filter.title, copies=self.filter.copies, options=self.filter.options) 181 184 182 185 return action -
pykota/trunk/pykota/accounters/stupid.py
r1180 r1200 22 22 # 23 23 # $Log$ 24 # Revision 1.7 2003/11/21 14:28:46 jalet 25 # More complete job history. 26 # 24 27 # Revision 1.6 2003/11/12 23:29:24 jalet 25 28 # More work on new backend. This commit may be unstable. … … 106 109 107 110 # adds the current job to history 108 printer.addJobToHistory(self.filter.jobid, user, counterbeforejob, action, jobsize )111 printer.addJobToHistory(self.filter.jobid, user, counterbeforejob, action, jobsize, self.filter.preserveinputfile, self.filter.title, self.filter.copies, self.filter.options) 109 112 110 113 return action -
pykota/trunk/pykota/storage.py
r1151 r1200 22 22 # 23 23 # $Log$ 24 # Revision 1.26 2003/11/21 14:28:45 jalet 25 # More complete job history. 26 # 24 27 # Revision 1.25 2003/10/08 21:12:27 jalet 25 28 # Do not cache anymore entries which don't exist. … … 211 214 self.LastJob = None 212 215 213 def addJobToHistory(self, jobid, user, pagecounter, action, jobsize=None ) :216 def addJobToHistory(self, jobid, user, pagecounter, action, jobsize=None, filename=None, title=None, copies=None, options=None) : 214 217 """Adds a job to the printer's history.""" 215 self.parent.writeJobNew(self, user, jobid, pagecounter, action, jobsize )218 self.parent.writeJobNew(self, user, jobid, pagecounter, action, jobsize, filename, title, copies, options) 216 219 # TODO : update LastJob object ? Probably not needed. 217 220 -
pykota/trunk/pykota/storages/ldapstorage.py
r1179 r1200 22 22 # 23 23 # $Log$ 24 # Revision 1.36 2003/11/21 14:28:46 jalet 25 # More complete job history. 26 # 24 27 # Revision 1.35 2003/11/12 13:06:37 jalet 25 28 # Bug fix wrt no user/group name command line argument to edpykota … … 690 693 self.doModify(lastjob.ident, fields) 691 694 692 def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None ) :695 def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None, filename=None, title=None, copies=None, options=None) : 693 696 """Adds a job in a printer's history.""" 694 697 if (not self.disablehistory) or (not printer.LastJob.Exists) : … … 706 709 "pykotaPrinterPageCounter" : str(pagecounter), 707 710 "pykotaAction" : action, 711 "pykotaFileName" : str(filename), 712 "pykotaTitle" : str(title), 713 "pykotaCopies" : str(copies), 714 "pykotaOptions" : str(options), 708 715 } 709 716 if (not self.disablehistory) or (not printer.LastJob.Exists) : -
pykota/trunk/pykota/storages/pgstorage.py
r1179 r1200 22 22 # 23 23 # $Log$ 24 # Revision 1.22 2003/11/21 14:28:46 jalet 25 # More complete job history. 26 # 24 27 # Revision 1.21 2003/11/12 13:06:38 jalet 25 28 # Bug fix wrt no user/group name command line argument to edpykota … … 447 450 self.doModify("UPDATE jobhistory SET jobsize=%s WHERE id=%s" % (self.doQuote(jobsize), self.doQuote(lastjob.ident))) 448 451 449 def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None ) :452 def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None, filename=None, title=None, copies=None, options=None) : 450 453 """Adds a job in a printer's history.""" 451 454 if (not self.disablehistory) or (not printer.LastJob.Exists) : 452 455 if jobsize is not None : 453 self.doModify("INSERT INTO jobhistory (userid, printerid, jobid, pagecounter, action, jobsize ) VALUES (%s, %s, %s, %s, %s, %s)" % (self.doQuote(user.ident), self.doQuote(printer.ident), self.doQuote(jobid), self.doQuote(pagecounter), self.doQuote(action), self.doQuote(jobsize)))456 self.doModify("INSERT INTO jobhistory (userid, printerid, jobid, pagecounter, action, jobsize, filename, title, copies, options) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)" % (self.doQuote(user.ident), self.doQuote(printer.ident), self.doQuote(jobid), self.doQuote(pagecounter), self.doQuote(action), self.doQuote(jobsize), self.doQuote(filename), self.doQuote(title), self.doQuote(copies), self.doQuote(options))) 454 457 else : 455 self.doModify("INSERT INTO jobhistory (userid, printerid, jobid, pagecounter, action ) VALUES (%s, %s, %s, %s, %s)" % (self.doQuote(user.ident), self.doQuote(printer.ident), self.doQuote(jobid), self.doQuote(pagecounter), self.doQuote(action)))458 self.doModify("INSERT INTO jobhistory (userid, printerid, jobid, pagecounter, action, filename, title, copies, options) VALUES (%s, %s, %s, %s, %s)" % (self.doQuote(user.ident), self.doQuote(printer.ident), self.doQuote(jobid), self.doQuote(pagecounter), self.doQuote(action), self.doQuote(filename), self.doQuote(title), self.doQuote(copies), self.doQuote(options))) 456 459 else : 457 460 # here we explicitly want to reset jobsize to NULL if needed -
pykota/trunk/pykota/tool.py
r1196 r1200 22 22 # 23 23 # $Log$ 24 # Revision 1.58 2003/11/21 14:28:45 jalet 25 # More complete job history. 26 # 24 27 # Revision 1.57 2003/11/19 23:19:38 jalet 25 28 # Code refactoring work. … … 624 627 self.options, \ 625 628 self.originalbackend) = self.extractInfoFromCupsOrLprng() 629 self.preserveinputfile = self.inputfile 626 630 self.accounter = openAccounter(self) 627 631 … … 669 673 else : 670 674 # Try to detect LPRng 675 # TODO : try to extract filename, job's title, and options if available 671 676 jseen = Pseen = nseen = rseen = Kseen = None 672 677 for arg in sys.argv : -
pykota/trunk/pykota/version.py
r1194 r1200 22 22 # 23 23 24 __version__ = "1.16alpha1 0_unofficial"24 __version__ = "1.16alpha11_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""