Changeset 2147 for pykota/trunk/pykota

Show
Ignore:
Timestamp:
03/06/05 17:52:43 (19 years ago)
Author:
jerome
Message:

Removed all references to $Log$

Location:
pykota/trunk/pykota
Files:
20 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounter.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.21  2004/10/24 12:49:02  jalet 
    25 # Fixed bad indentation 
    26 # 
    27 # Revision 1.20  2004/09/13 16:02:45  jalet 
    28 # Added fix for incorrect job's size when hardware accounting fails 
    29 # 
    30 # Revision 1.19  2004/08/31 23:29:53  jalet 
    31 # Introduction of the new 'onaccountererror' configuration directive. 
    32 # Small fix for software accounter's return code which can't be None anymore. 
    33 # Make software and hardware accounting code look similar : will be factorized 
    34 # later. 
    35 # 
    36 # Revision 1.18  2004/07/22 22:41:48  jalet 
    37 # Hardware accounting for LPRng should be OK now. UNTESTED. 
    38 # 
    39 # Revision 1.17  2004/07/16 12:22:47  jalet 
    40 # LPRng support early version 
    41 # 
    42 # Revision 1.16  2004/05/25 09:15:15  jalet 
    43 # accounter.py : old code deleted 
    44 # the rest : now exports PYKOTAPRECOMPUTEDJOBSIZE and PYKOTAPRECOMPUTEDJOBPRICE 
    45 # 
    46 # Revision 1.15  2004/05/24 22:45:49  jalet 
    47 # New 'enforcement' directive added 
    48 # Polling loop improvements 
    49 # 
    50 # Revision 1.14  2004/05/18 14:49:19  jalet 
    51 # Big code changes to completely remove the need for "requester" directives, 
    52 # jsut use "hardware(... your previous requester directive's content ...)" 
    53 # 
    54 # Revision 1.13  2004/01/12 22:43:40  jalet 
    55 # New formula to compute a job's price 
    56 # 
    57 # Revision 1.12  2004/01/11 23:43:31  jalet 
    58 # Bug wrt number of copies with CUPS should be fixed. 
    59 # 
    60 # Revision 1.11  2004/01/11 23:22:42  jalet 
    61 # Major code refactoring, it's way cleaner, and now allows automated addition 
    62 # of printers on first print. 
    63 # 
    64 # Revision 1.10  2004/01/08 14:10:32  jalet 
    65 # Copyright year changed. 
    66 # 
    67 # Revision 1.9  2003/12/27 16:49:25  uid67467 
    68 # Should be ok now. 
    69 # 
    70 # Revision 1.7  2003/11/25 23:46:40  jalet 
    71 # Don't try to verify if module name is valid, Python does this better than us. 
    72 # 
    73 # Revision 1.6  2003/11/12 23:28:55  jalet 
    74 # More work on new backend. This commit may be unstable. 
    75 # 
    76 # Revision 1.5  2003/10/07 09:07:28  jalet 
    77 # Character encoding added to please latest version of Python 
    78 # 
    79 # Revision 1.4  2003/07/14 14:14:59  jalet 
    80 # Old template 
    81 # 
    82 # Revision 1.3  2003/04/30 19:53:58  jalet 
    83 # 1.05 
    84 # 
    85 # Revision 1.2  2003/04/30 13:36:40  jalet 
    86 # Stupid accounting method was added. 
    87 # 
    88 # Revision 1.1  2003/04/29 18:37:54  jalet 
    89 # Pluggable accounting methods (actually doesn't support external scripts) 
    90 # 
    9122# 
    9223# 
  • pykota/trunk/pykota/accounters/hardware.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.36  2005/02/20 22:58:55  jalet 
    25 # Added some informations from RFC3805 and RFC2790 
    26 # 
    27 # Revision 1.35  2005/01/12 22:44:06  jalet 
    28 # Tried to fix a problem with printers which are slow to pass into printing mode. 
    29 # 
    30 # Revision 1.34  2004/11/19 11:57:51  jalet 
    31 # Modified the SNMP fix as hinted by pysnmp's maintainer 
    32 # 
    33 # Revision 1.33  2004/11/19 10:35:37  jalet 
    34 # Catches TypeMismatchError in SNMP answer handling code 
    35 # 
    36 # Revision 1.32  2004/11/16 23:23:40  jalet 
    37 # Fixed internal PJL handling wrt the 35078 PowerSave mode. 
    38 # 
    39 # Revision 1.31  2004/11/01 14:32:26  jalet 
    40 # Fix for unneeded out of band status in pjl_over_tcp/9100 
    41 # 
    42 # Revision 1.30  2004/10/05 09:21:34  jalet 
    43 # Removed misleading comments 
    44 # 
    45 # Revision 1.29  2004/10/05 09:20:07  jalet 
    46 # Reduced delay from 2 to 1 seconds in internal SNMP and PJL_over_TCP 
    47 # handlers 
    48 # 
    49 # Revision 1.28  2004/09/27 20:09:30  jalet 
    50 # Lowered timeout delay for PJL queries 
    51 # 
    52 # Revision 1.27  2004/09/27 20:00:35  jalet 
    53 # Typo 
    54 # 
    55 # Revision 1.26  2004/09/27 19:56:27  jalet 
    56 # Added internal handling for PJL queries over port tcp/9100. Now waits 
    57 # for printer being idle before asking, just like with SNMP. 
    58 # 
    59 # Revision 1.25  2004/09/27 09:21:37  jalet 
    60 # Now includes printer's hostname in SNMP error messages 
    61 # 
    62 # Revision 1.24  2004/09/24 21:19:48  jalet 
    63 # Did a pass of PyChecker 
    64 # 
    65 # Revision 1.23  2004/09/23 19:18:12  jalet 
    66 # Now loops when the external hardware accounter fails, until it returns a correct value 
    67 # 
    68 # Revision 1.22  2004/09/22 19:48:01  jalet 
    69 # Logs the looping message as debug instead of as info 
    70 # 
    71 # Revision 1.21  2004/09/22 19:27:41  jalet 
    72 # Bad import statement 
    73 # 
    74 # Revision 1.20  2004/09/22 19:22:27  jalet 
    75 # Just loop in case a network error occur 
    76 # 
    77 # Revision 1.19  2004/09/22 14:29:01  jalet 
    78 # Fixed nasty typo 
    79 # 
    80 # Revision 1.18  2004/09/21 16:00:46  jalet 
    81 # More informational messages 
    82 # 
    83 # Revision 1.17  2004/09/21 13:42:18  jalet 
    84 # Typo 
    85 # 
    86 # Revision 1.16  2004/09/21 13:30:53  jalet 
    87 # First try at full SNMP handling from the Python code. 
    88 # 
    89 # Revision 1.15  2004/09/14 11:38:59  jalet 
    90 # Minor fix 
    91 # 
    92 # Revision 1.14  2004/09/14 06:53:53  jalet 
    93 # Small test added 
    94 # 
    95 # Revision 1.13  2004/09/13 16:02:45  jalet 
    96 # Added fix for incorrect job's size when hardware accounting fails 
    97 # 
    98 # Revision 1.12  2004/09/06 15:42:34  jalet 
    99 # Fix missing import statement for the signal module 
    100 # 
    101 # Revision 1.11  2004/08/31 23:29:53  jalet 
    102 # Introduction of the new 'onaccountererror' configuration directive. 
    103 # Small fix for software accounter's return code which can't be None anymore. 
    104 # Make software and hardware accounting code look similar : will be factorized 
    105 # later. 
    106 # 
    107 # Revision 1.10  2004/08/27 22:49:04  jalet 
    108 # No answer from subprocess now is really a fatal error. Waiting for some 
    109 # time to make this configurable... 
    110 # 
    111 # Revision 1.9  2004/08/25 22:34:39  jalet 
    112 # Now both software and hardware accounting raise an exception when no valid 
    113 # result can be extracted from the subprocess' output. 
    114 # Hardware accounting now reads subprocess' output until an integer is read 
    115 # or data is exhausted : it now behaves just like software accounting in this 
    116 # aspect. 
    117 # 
    118 # Revision 1.8  2004/07/22 22:41:48  jalet 
    119 # Hardware accounting for LPRng should be OK now. UNTESTED. 
    120 # 
    121 # Revision 1.7  2004/07/16 12:22:47  jalet 
    122 # LPRng support early version 
    123 # 
    124 # Revision 1.6  2004/07/01 19:56:42  jalet 
    125 # Better dispatching of error messages 
    126 # 
    127 # Revision 1.5  2004/06/10 22:42:06  jalet 
    128 # Better messages in logs 
    129 # 
    130 # Revision 1.4  2004/05/24 22:45:49  jalet 
    131 # New 'enforcement' directive added 
    132 # Polling loop improvements 
    133 # 
    134 # Revision 1.3  2004/05/24 14:36:40  jalet 
    135 # Revert to old polling loop. Will need optimisations 
    136 # 
    137 # Revision 1.2  2004/05/18 14:49:22  jalet 
    138 # Big code changes to completely remove the need for "requester" directives, 
    139 # jsut use "hardware(... your previous requester directive's content ...)" 
    140 # 
    141 # Revision 1.1  2004/05/13 13:59:30  jalet 
    142 # Code simplifications 
    143 # 
    14422# 
    14523# 
  • pykota/trunk/pykota/accounters/software.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.12  2005/02/19 18:16:06  jalet 
    25 # Optimize print job parsing by avoiding to pass the job's datas through 
    26 # PyKota's internal parser if the special construct "software()" is used 
    27 # with no argument in the 'accounter' directive. 
    28 # 
    29 # Revision 1.11  2004/09/24 21:19:48  jalet 
    30 # Did a pass of PyChecker 
    31 # 
    32 # Revision 1.10  2004/08/31 23:29:53  jalet 
    33 # Introduction of the new 'onaccountererror' configuration directive. 
    34 # Small fix for software accounter's return code which can't be None anymore. 
    35 # Make software and hardware accounting code look similar : will be factorized 
    36 # later. 
    37 # 
    38 # Revision 1.9  2004/08/25 22:34:39  jalet 
    39 # Now both software and hardware accounting raise an exception when no valid 
    40 # result can be extracted from the subprocess' output. 
    41 # Hardware accounting now reads subprocess' output until an integer is read 
    42 # or data is exhausted : it now behaves just like software accounting in this 
    43 # aspect. 
    44 # 
    45 # Revision 1.8  2004/08/22 14:04:47  jalet 
    46 # Tries to fix problem with subprocesses outputting more datas than needed 
    47 # 
    48 # Revision 1.7  2004/08/06 13:45:51  jalet 
    49 # Fixed french translation problem. 
    50 # Fixed problem with group quotas and strict enforcement. 
    51 # 
    52 # Revision 1.6  2004/07/01 19:56:43  jalet 
    53 # Better dispatching of error messages 
    54 # 
    55 # Revision 1.5  2004/06/10 22:42:06  jalet 
    56 # Better messages in logs 
    57 # 
    58 # Revision 1.4  2004/06/02 21:51:14  jalet 
    59 # Moved the sigterm capturing elsewhere 
    60 # 
    61 # Revision 1.3  2004/05/24 22:45:49  jalet 
    62 # New 'enforcement' directive added 
    63 # Polling loop improvements 
    64 # 
    65 # Revision 1.2  2004/05/18 14:49:23  jalet 
    66 # Big code changes to completely remove the need for "requester" directives, 
    67 # jsut use "hardware(... your previous requester directive's content ...)" 
    68 # 
    69 # Revision 1.1  2004/05/13 13:59:30  jalet 
    70 # Code simplifications 
    7122# 
    7223# 
  • pykota/trunk/pykota/cgifuncs.py

    r2146 r2147  
    1818# $Id$ 
    1919# 
    20 # $Log$ 
    21 # Revision 1.1  2005/01/08 17:13:01  jalet 
    22 # Move some functions outside of the CGI to allow their use in other CGI scripts 
    23 # 
    2420# 
    2521 
  • pykota/trunk/pykota/config.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.62  2005/02/19 18:16:06  jalet 
    25 # Optimize print job parsing by avoiding to pass the job's datas through 
    26 # PyKota's internal parser if the special construct "software()" is used 
    27 # with no argument in the 'accounter' directive. 
    28 # 
    29 # Revision 1.61  2005/02/16 00:29:33  jalet 
    30 # Fixed the maxdenybanners directive. 
    31 # Introduced the denyduplicates directive. 
    32 # Fixed some database related glitches. 
    33 # 
    34 # Revision 1.60  2005/02/14 23:39:50  jalet 
    35 # Introduces the new 'trustjobsize' directive to workaround some printers 
    36 # generating unstable internal page counter values when queried through SNMP. 
    37 # 
    38 # Revision 1.59  2005/02/13 22:02:29  jalet 
    39 # Big database structure changes. Upgrade script is now included as well as 
    40 # the new LDAP schema. 
    41 # Introduction of the -o | --overcharge command line option to edpykota. 
    42 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    43 # Introduction of the new 'maxdenybanners' directive. 
    44 # 
    45 # Revision 1.58  2004/12/02 22:01:58  jalet 
    46 # TLS is now supported with the LDAP backend 
    47 # 
    48 # Revision 1.57  2004/11/22 21:53:38  jalet 
    49 # Added the reject_unknown directive to pykota.conf to reject user/group 
    50 # creation if user or group is unknown to the system 
    51 # 
    52 # Revision 1.56  2004/11/15 15:23:07  jalet 
    53 # Strips spaces just in case 
    54 # 
    55 # Revision 1.55  2004/11/15 15:14:06  jalet 
    56 # Preliminary integration of Matt's patch for banners. 
    57 # 
    58 # Revision 1.54  2004/10/25 14:12:25  jalet 
    59 # For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
    60 # to hide print jobs' title, filename, and options. 
    61 # 
    62 # Revision 1.53  2004/10/06 10:05:47  jalet 
    63 # Minor changes to allow any PyKota administrator to launch enhanced versions 
    64 # of the commands, and not only the root user. 
    65 # 
    66 # Revision 1.52  2004/09/29 20:20:52  jalet 
    67 # Added the winbind_separator directive to pykota.conf to allow the admin to 
    68 # strip out the Samba/Winbind domain name when users print. 
    69 # 
    70 # Revision 1.51  2004/08/31 23:29:53  jalet 
    71 # Introduction of the new 'onaccountererror' configuration directive. 
    72 # Small fix for software accounter's return code which can't be None anymore. 
    73 # Make software and hardware accounting code look similar : will be factorized 
    74 # later. 
    75 # 
    76 # Revision 1.50  2004/07/27 07:07:27  jalet 
    77 # Typo : treshold ==> threshold 
    78 # 
    79 # Revision 1.49  2004/06/03 21:53:24  jalet 
    80 # crashrecipient directive 
    81 # 
    82 # Revision 1.48  2004/05/24 22:45:49  jalet 
    83 # New 'enforcement' directive added 
    84 # Polling loop improvements 
    85 # 
    86 # Revision 1.47  2004/05/18 14:49:20  jalet 
    87 # Big code changes to completely remove the need for "requester" directives, 
    88 # jsut use "hardware(... your previous requester directive's content ...)" 
    89 # 
    90 # Revision 1.46  2004/05/13 13:59:28  jalet 
    91 # Code simplifications 
    92 # 
    93 # Revision 1.45  2004/03/01 10:22:30  jalet 
    94 # Can now extract per printer pre and post hooks from the configuration file 
    95 # 
    96 # Revision 1.44  2004/02/20 14:42:21  jalet 
    97 # Experimental ldapcache directive added 
    98 # 
    99 # Revision 1.43  2004/02/19 14:20:21  jalet 
    100 # maildomain pykota.conf directive added. 
    101 # Small improvements on mail headers quality. 
    102 # 
    103 # Revision 1.42  2004/01/08 14:10:32  jalet 
    104 # Copyright year changed. 
    105 # 
    106 # Revision 1.41  2003/11/29 20:06:20  jalet 
    107 # Added 'utolower' configuration option to convert all usernames to 
    108 # lowercase when printing. All database accesses are still and will 
    109 # remain case sensitive though. 
    110 # 
    111 # Revision 1.40  2003/11/18 23:43:12  jalet 
    112 # Mailto can be any external command now, as usual. 
    113 # 
    114 # Revision 1.39  2003/10/08 21:41:38  jalet 
    115 # External policies for printers works ! 
    116 # We can now auto-add users on first print, and do other useful things if needed. 
    117 # 
    118 # Revision 1.38  2003/10/07 22:06:05  jalet 
    119 # Preliminary code to disable job history 
    120 # 
    121 # Revision 1.37  2003/10/07 09:07:28  jalet 
    122 # Character encoding added to please latest version of Python 
    123 # 
    124 # Revision 1.36  2003/10/02 20:23:18  jalet 
    125 # Storage caching mechanism added. 
    126 # 
    127 # Revision 1.35  2003/07/29 09:54:03  jalet 
    128 # Added configurable LDAP mail attribute support 
    129 # 
    130 # Revision 1.34  2003/07/28 09:11:12  jalet 
    131 # PyKota now tries to add its attributes intelligently in existing LDAP 
    132 # directories. 
    133 # 
    134 # Revision 1.33  2003/07/16 21:53:07  jalet 
    135 # Really big modifications wrt new configuration file's location and content. 
    136 # 
    137 # Revision 1.32  2003/07/08 19:43:51  jalet 
    138 # Configurable warning messages. 
    139 # Poor man's treshold value added. 
    140 # 
    141 # Revision 1.31  2003/07/07 11:49:24  jalet 
    142 # Lots of small fixes with the help of PyChecker 
    143 # 
    144 # Revision 1.30  2003/06/25 14:10:01  jalet 
    145 # Hey, it may work (edpykota --reset excepted) ! 
    146 # 
    147 # Revision 1.29  2003/06/14 22:44:21  jalet 
    148 # More work on LDAP storage backend. 
    149 # 
    150 # Revision 1.28  2003/06/10 16:37:54  jalet 
    151 # Deletion of the second user which is not needed anymore. 
    152 # Added a debug configuration field in /etc/pykota.conf 
    153 # All queries can now be sent to the logger in debug mode, this will 
    154 # greatly help improve performance when time for this will come. 
    155 # 
    156 # Revision 1.27  2003/05/27 23:00:21  jalet 
    157 # Big rewrite of external accounting methods. 
    158 # Should work well now. 
    159 # 
    160 # Revision 1.26  2003/04/30 19:53:58  jalet 
    161 # 1.05 
    162 # 
    163 # Revision 1.25  2003/04/30 13:36:40  jalet 
    164 # Stupid accounting method was added. 
    165 # 
    166 # Revision 1.24  2003/04/29 18:37:54  jalet 
    167 # Pluggable accounting methods (actually doesn't support external scripts) 
    168 # 
    169 # Revision 1.23  2003/04/24 11:53:48  jalet 
    170 # Default policy for unknown users/groups is to DENY printing instead 
    171 # of the previous default to ALLOW printing. This is to solve an accuracy 
    172 # problem. If you set the policy to ALLOW, jobs printed by in nexistant user 
    173 # (from PyKota's POV) will be charged to the next user who prints on the 
    174 # same printer. 
    175 # 
    176 # Revision 1.22  2003/04/23 22:13:57  jalet 
    177 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    178 # 
    179 # Revision 1.21  2003/03/29 13:45:27  jalet 
    180 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    181 # Two README files were added. 
    182 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    183 # 
    184 # Revision 1.20  2003/03/29 13:08:28  jalet 
    185 # Configuration is now expected to be found in /etc/pykota.conf instead of 
    186 # in /etc/cups/pykota.conf 
    187 # Installation script can move old config files to the new location if needed. 
    188 # Better error handling if configuration file is absent. 
    189 # 
    190 # Revision 1.19  2003/03/16 09:56:52  jalet 
    191 # Mailto option now accepts some additional values which all mean that 
    192 # nobody will receive any email message. 
    193 # Mailto option now works. Version 1.01 is now officially out. 
    194 # 
    195 # Revision 1.18  2003/03/16 08:00:50  jalet 
    196 # Default hard coded options are now used if they are not set in the 
    197 # configuration file. 
    198 # 
    199 # Revision 1.17  2003/03/15 23:01:28  jalet 
    200 # New mailto option in configuration file added. 
    201 # No time to test this tonight (although it should work). 
    202 # 
    203 # Revision 1.16  2003/02/17 23:01:56  jalet 
    204 # Typos 
    205 # 
    206 # Revision 1.15  2003/02/17 22:55:01  jalet 
    207 # More options can now be set per printer or globally : 
    208 # 
    209 #       admin 
    210 #       adminmail 
    211 #       gracedelay 
    212 #       requester 
    213 # 
    214 # the printer option has priority when both are defined. 
    215 # 
    216 # Revision 1.14  2003/02/17 22:05:50  jalet 
    217 # Storage backend now supports admin and user passwords (untested) 
    218 # 
    219 # Revision 1.13  2003/02/10 11:47:39  jalet 
    220 # Moved some code down into the requesters 
    221 # 
    222 # Revision 1.12  2003/02/10 10:36:33  jalet 
    223 # Small problem wrt external requester 
    224 # 
    225 # Revision 1.11  2003/02/10 08:50:45  jalet 
    226 # External requester seems to be finally ok now 
    227 # 
    228 # Revision 1.10  2003/02/10 08:19:57  jalet 
    229 # tell ConfigParser to return raw data, this allows our own strings 
    230 # interpolations in the requester 
    231 # 
    232 # Revision 1.9  2003/02/10 00:44:38  jalet 
    233 # Typos 
    234 # 
    235 # Revision 1.8  2003/02/10 00:42:17  jalet 
    236 # External requester should be ok (untested) 
    237 # New syntax for configuration file wrt requesters 
    238 # 
    239 # Revision 1.7  2003/02/09 13:05:43  jalet 
    240 # Internationalization continues... 
    241 # 
    242 # Revision 1.6  2003/02/07 22:00:09  jalet 
    243 # Bad cut&paste 
    244 # 
    245 # Revision 1.5  2003/02/06 23:58:05  jalet 
    246 # repykota should be ok 
    247 # 
    248 # Revision 1.4  2003/02/06 09:19:02  jalet 
    249 # More robust behavior (hopefully) when the user or printer is not managed 
    250 # correctly by the Quota System : e.g. cupsFilter added in ppd file, but 
    251 # printer and/or user not 'yet?' in storage. 
    252 # 
    253 # Revision 1.3  2003/02/05 23:26:22  jalet 
    254 # Incorrect handling of grace delay 
    255 # 
    256 # Revision 1.2  2003/02/05 23:09:20  jalet 
    257 # Name conflict 
    258 # 
    259 # Revision 1.1  2003/02/05 21:28:17  jalet 
    260 # Initial import into CVS 
    261 # 
    26222# 
    26323# 
  • pykota/trunk/pykota/dumper.py

    r2146 r2147  
    1919# 
    2020# $Id$ 
    21 # 
    22 # $Log$ 
    23 # Revision 1.3  2005/01/19 09:00:54  jalet 
    24 # Small fix for Python2.1 and variables scopes 
    25 # 
    26 # Revision 1.2  2005/01/19 08:49:41  jalet 
    27 # Now dumpykota.cgi behaves like printquota.cgi wrt the REMOTE_USER environment 
    28 # variables if the script is username+password protected. 
    29 # Small fix in printquota.cgi wrt ldap auth with Apache : the workaround was 
    30 # not used everywhere. 
    31 # 
    32 # Revision 1.1  2005/01/08 17:03:07  jalet 
    33 # "--format cups" output more resembling CUPS' page_log. 
    34 # Split into a command line tool and a module, to allow easier coding of 
    35 # a CGI interface. 
    36 # 
    3721# 
    3822# 
  • pykota/trunk/pykota/ipp.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.2  2004/12/03 20:29:33  jalet 
    25 # ipp.py can now be run in standalone mode for testing purposes 
    26 # 
    27 # Revision 1.1  2004/11/06 22:35:58  jalet 
    28 # Added a miniparser for IPP messages (RFC 2910). The job-originating-host-name 
    29 # retrieval is now fiable, unless the CUPS developpers change something... 
    3022# 
    3123# 
  • pykota/trunk/pykota/logger.py

    r2146 r2147  
    2121# $Id$ 
    2222# 
    23 # $Log$ 
    24 # Revision 1.12  2004/01/08 14:10:32  jalet 
    25 # Copyright year changed. 
    26 # 
    27 # Revision 1.11  2003/12/27 16:49:25  uid67467 
    28 # Should be ok now. 
    29 # 
    30 # Revision 1.10  2003/11/25 22:37:22  jalet 
    31 # Small code move 
    32 # 
    33 # Revision 1.9  2003/10/07 09:07:28  jalet 
    34 # Character encoding added to please latest version of Python 
    35 # 
    36 # Revision 1.8  2003/07/07 11:49:24  jalet 
    37 # Lots of small fixes with the help of PyChecker 
    38 # 
    39 # Revision 1.7  2003/06/10 16:37:54  jalet 
    40 # Deletion of the second user which is not needed anymore. 
    41 # Added a debug configuration field in /etc/pykota.conf 
    42 # All queries can now be sent to the logger in debug mode, this will 
    43 # greatly help improve performance when time for this will come. 
    44 # 
    45 # Revision 1.6  2003/04/23 22:13:57  jalet 
    46 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    47 # 
    48 # Revision 1.5  2003/03/29 13:45:27  jalet 
    49 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    50 # Two README files were added. 
    51 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    52 # 
    53 # Revision 1.4  2003/02/09 13:05:43  jalet 
    54 # Internationalization continues... 
    55 # 
    56 # Revision 1.3  2003/02/05 22:10:29  jalet 
    57 # Typos 
    58 # 
    59 # Revision 1.2  2003/02/05 22:02:22  jalet 
    60 # __import__ statement didn't work as expected 
    61 # 
    62 # Revision 1.1  2003/02/05 21:28:17  jalet 
    63 # Initial import into CVS 
    64 # 
    65 # 
    6623# 
    6724 
  • pykota/trunk/pykota/loggers/stderr.py

    r2146 r2147  
    2121# $Id$ 
    2222# 
    23 # $Log$ 
    24 # Revision 1.7  2004/05/24 11:59:49  jalet 
    25 # More robust (?) code 
    26 # 
    27 # Revision 1.6  2004/05/07 14:43:44  jalet 
    28 # Now logs the PID too 
    29 # 
    30 # Revision 1.5  2004/01/08 14:10:33  jalet 
    31 # Copyright year changed. 
    32 # 
    33 # Revision 1.4  2003/10/07 09:07:29  jalet 
    34 # Character encoding added to please latest version of Python 
    35 # 
    36 # Revision 1.3  2003/04/23 22:13:57  jalet 
    37 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    38 # 
    39 # Revision 1.2  2003/03/29 13:45:27  jalet 
    40 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    41 # Two README files were added. 
    42 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    43 # 
    44 # Revision 1.1  2003/02/05 21:28:17  jalet 
    45 # Initial import into CVS 
    46 # 
    47 # 
    4823# 
    4924 
  • pykota/trunk/pykota/loggers/system.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.11  2004/05/24 11:59:51  jalet 
    25 # More robust (?) code 
    26 # 
    27 # Revision 1.10  2004/05/07 14:43:46  jalet 
    28 # Now logs the PID too 
    29 # 
    30 # Revision 1.9  2004/01/08 14:10:33  jalet 
    31 # Copyright year changed. 
    32 # 
    33 # Revision 1.8  2003/10/07 09:07:29  jalet 
    34 # Character encoding added to please latest version of Python 
    35 # 
    36 # Revision 1.7  2003/07/07 11:49:24  jalet 
    37 # Lots of small fixes with the help of PyChecker 
    38 # 
    39 # Revision 1.6  2003/04/23 22:13:57  jalet 
    40 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    41 # 
    42 # Revision 1.5  2003/03/29 13:45:27  jalet 
    43 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    44 # Two README files were added. 
    45 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    46 # 
    47 # Revision 1.4  2003/02/27 23:48:41  jalet 
    48 # Correctly maps PyKota's log levels to syslog log levels 
    49 # 
    50 # Revision 1.3  2003/02/27 22:55:20  jalet 
    51 # WARN log priority doesn't exist. 
    52 # 
    53 # Revision 1.2  2003/02/05 23:47:54  jalet 
    54 # Forgotten default argument 
    55 # 
    56 # Revision 1.1  2003/02/05 23:09:20  jalet 
    57 # Name conflict 
    58 # 
    5922# 
    6023# 
  • pykota/trunk/pykota/pdlanalyzer.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.52  2005/02/13 21:26:34  jalet 
    25 # Better detection of number of copies in PostScript parser 
    26 # 
    27 # Revision 1.51  2005/01/12 14:44:27  jalet 
    28 # Fixed a fuckingly strange exception by cleverly ignoring it entirely :-) 
    29 # 
    30 # Revision 1.50  2005/01/07 15:53:58  jalet 
    31 # Another fix for PCL3/4/5 
    32 # 
    33 # Revision 1.49  2005/01/06 17:41:34  jalet 
    34 # Of course if I forget some files during the commits, the software doesn't 
    35 # work as expected ;-) 
    36 # 
    37 # Revision 1.48  2004/12/16 15:11:00  jalet 
    38 # Added some debugging code to PCL3/4/5 parser 
    39 # 
    40 # Revision 1.47  2004/12/13 20:49:53  jalet 
    41 # Bad typo 
    42 # 
    43 # Revision 1.46  2004/12/13 20:48:33  jalet 
    44 # Outputs debug info to stderr 
    45 # 
    46 # Revision 1.45  2004/12/13 20:39:46  jalet 
    47 # Added a --debug command line option to pkpgcounter, for people interested 
    48 # in seeing what happens, and what will be available in the future :-) 
    49 # 
    50 # Revision 1.44  2004/11/17 15:10:31  jalet 
    51 # Fixed Epson Stylus Photo problem in software accounting 
    52 # 
    53 # Revision 1.43  2004/11/13 20:52:26  jalet 
    54 # Heavy work done on PCL3/4/5 and PCLXL job analyzis 
    55 # 
    56 # Revision 1.42  2004/09/24 21:19:48  jalet 
    57 # Did a pass of PyChecker 
    58 # 
    59 # Revision 1.41  2004/09/04 14:18:55  jalet 
    60 # Support for more laserjet models added. 
    61 # 
    62 # Revision 1.40  2004/09/04 14:01:47  jalet 
    63 # Support for PCL3 (HP Deskjets) added to generic PDL parser 
    64 # 
    65 # Revision 1.39  2004/09/02 23:30:05  jalet 
    66 # Comments 
    67 # 
    68 # Revision 1.38  2004/09/02 22:08:37  jalet 
    69 # First draft of PCL3GUI analyzer. 
    70 # 
    71 # Revision 1.37  2004/09/02 21:22:49  jalet 
    72 # One more PCL tag 
    73 # 
    74 # Revision 1.36  2004/09/01 22:31:49  jalet 
    75 # Some more work on ESC/P2 analyzer to avoid missing \r\n sequences. Not 
    76 # exactly optimal though... 
    77 # 
    78 # Revision 1.35  2004/08/30 23:10:24  jalet 
    79 # Improved the ESC/P2 analyzer so that more GhostScript devices are supported 
    80 # 
    81 # Revision 1.34  2004/08/27 09:08:22  jalet 
    82 # Improvement in PostScript parser to avoid being fooled by clever "students" 
    83 # 
    84 # Revision 1.33  2004/08/27 09:02:34  jalet 
    85 # Forgot to remove some special debugging code... 
    86 # 
    87 # Revision 1.32  2004/08/27 08:58:50  jalet 
    88 # Relax checks for PCL5 header to accomodate strange printer drivers 
    89 # 
    90 # Revision 1.31  2004/08/22 08:25:33  jalet 
    91 # Improved ESC/P2 miniparser thanks to Paulo Silva 
    92 # 
    93 # Revision 1.30  2004/08/21 23:16:57  jalet 
    94 # First draft of ESC/P2 (mini-)parser. 
    95 # 
    96 # Revision 1.29  2004/08/11 16:25:38  jalet 
    97 # Fixed index problem in PCLXL parser when retrieving number of copies for 
    98 # each page 
    99 # 
    100 # Revision 1.28  2004/08/10 23:01:49  jalet 
    101 # Fixed number of copies in PCL5 parser 
    102 # 
    103 # Revision 1.27  2004/08/09 18:14:22  jalet 
    104 # Added workaround for number of copies and some PostScript drivers 
    105 # 
    106 # Revision 1.26  2004/07/22 13:49:51  jalet 
    107 # Added support for binary PostScript through GhostScript if native DSC 
    108 # compliant PostScript analyzer doesn't find any page. This is much 
    109 # slower though, so native analyzer is tried first. 
    110 # 
    111 # Revision 1.25  2004/07/10 14:06:36  jalet 
    112 # Fix for Python2.1 incompatibilities 
    113 # 
    114 # Revision 1.24  2004/07/05 21:00:39  jalet 
    115 # Fix for number of copies for each page in PCLXL parser 
    116 # 
    117 # Revision 1.23  2004/07/03 08:21:59  jalet 
    118 # Testsuite for PDL Analyzer added 
    119 # 
    120 # Revision 1.22  2004/06/29 14:21:41  jalet 
    121 # Smallish optimization 
    122 # 
    123 # Revision 1.21  2004/06/28 23:11:26  jalet 
    124 # Code de-factorization in PCLXL parser 
    125 # 
    126 # Revision 1.20  2004/06/28 22:38:41  jalet 
    127 # Increased speed by a factor of 2 in PCLXL parser 
    128 # 
    129 # Revision 1.19  2004/06/28 21:20:30  jalet 
    130 # PCLXL support now works ! 
    131 # 
    132 # Revision 1.18  2004/06/27 22:59:37  jalet 
    133 # More work on PCLXL parser 
    134 # 
    135 # Revision 1.17  2004/06/26 23:20:01  jalet 
    136 # Additionnal speedup for GhostScript generated PCL5 files 
    137 # 
    138 # Revision 1.16  2004/06/26 15:31:00  jalet 
    139 # mmap reintroduced in PCL5 parser 
    140 # 
    141 # Revision 1.15  2004/06/26 14:14:31  jalet 
    142 # Now uses Psyco if it is available 
    143 # 
    144 # Revision 1.14  2004/06/25 09:50:28  jalet 
    145 # More debug info in PCLXL parser 
    146 # 
    147 # Revision 1.13  2004/06/25 08:10:08  jalet 
    148 # Another fix for PCL5 parser 
    149 # 
    150 # Revision 1.12  2004/06/24 23:09:53  jalet 
    151 # Fix for number of copies in PCL5 parser 
    152 # 
    153 # Revision 1.11  2004/06/23 22:07:50  jalet 
    154 # Fixed PCL5 parser according to the sources of rastertohp 
    155 # 
    156 # Revision 1.10  2004/06/18 22:24:03  jalet 
    157 # Removed old comments 
    158 # 
    159 # Revision 1.9  2004/06/18 22:21:27  jalet 
    160 # Native PDF parser greatly improved. 
    161 # GhostScript based PDF parser completely removed because native code 
    162 # is now portable across Python versions. 
    163 # 
    164 # Revision 1.8  2004/06/18 20:49:46  jalet 
    165 # "ERROR:" prefix added 
    166 # 
    167 # Revision 1.7  2004/06/18 17:48:04  jalet 
    168 # Added native fast PDF parsing method 
    169 # 
    170 # Revision 1.6  2004/06/18 14:00:16  jalet 
    171 # Added PDF support in smart PDL analyzer (through GhostScript for now) 
    172 # 
    173 # Revision 1.5  2004/06/18 10:09:05  jalet 
    174 # Resets file pointer to start of file in all cases 
    175 # 
    176 # Revision 1.4  2004/06/18 06:16:14  jalet 
    177 # Fixes PostScript detection code for incorrect drivers 
    178 # 
    179 # Revision 1.3  2004/05/21 20:40:08  jalet 
    180 # All the code for pkpgcounter is now in pdlanalyzer.py 
    181 # 
    182 # Revision 1.2  2004/05/19 19:09:36  jalet 
    183 # Speed improvement 
    184 # 
    185 # Revision 1.1  2004/05/18 09:59:54  jalet 
    186 # pkpgcounter is now just a wrapper around the PDLAnalyzer class 
    187 # 
    18822# 
    18923# 
  • pykota/trunk/pykota/reporter.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.12  2005/02/15 13:13:27  jalet 
    25 # Fixes output when user has got a negative or nul overcharging factor. 
    26 # 
    27 # Revision 1.11  2005/02/13 22:02:29  jalet 
    28 # Big database structure changes. Upgrade script is now included as well as 
    29 # the new LDAP schema. 
    30 # Introduction of the -o | --overcharge command line option to edpykota. 
    31 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    32 # Introduction of the new 'maxdenybanners' directive. 
    33 # 
    34 # Revision 1.10  2004/09/02 10:09:30  jalet 
    35 # Fixed bug in LDAP user deletion code which didn't correctly delete the user's 
    36 # pykotaLastJob entries. 
    37 # 
    38 # Revision 1.9  2004/07/01 17:45:49  jalet 
    39 # Added code to handle the description field for printers 
    40 # 
    41 # Revision 1.8  2004/03/24 15:15:24  jalet 
    42 # Began integration of Henrik Janhagen's work on quota-then-balance 
    43 # and balance-then-quota 
    44 # 
    45 # Revision 1.7  2004/01/08 14:10:32  jalet 
    46 # Copyright year changed. 
    47 # 
    48 # Revision 1.6  2003/12/27 16:49:25  uid67467 
    49 # Should be ok now. 
    50 # 
    51 # Revision 1.4  2003/12/02 14:40:21  jalet 
    52 # Some code refactoring. 
    53 # New HTML reporter added, which is now used in the CGI script for web based 
    54 # print quota reports. It will need some de-uglyfication though... 
    55 # 
    56 # Revision 1.3  2003/11/25 23:46:40  jalet 
    57 # Don't try to verify if module name is valid, Python does this better than us. 
    58 # 
    59 # Revision 1.2  2003/10/07 09:07:28  jalet 
    60 # Character encoding added to please latest version of Python 
    61 # 
    62 # Revision 1.1  2003/06/30 12:46:15  jalet 
    63 # Extracted reporting code. 
    64 # 
    6522# 
    6623# 
  • pykota/trunk/pykota/reporters/html.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.9  2005/02/13 22:02:29  jalet 
    25 # Big database structure changes. Upgrade script is now included as well as 
    26 # the new LDAP schema. 
    27 # Introduction of the -o | --overcharge command line option to edpykota. 
    28 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    29 # Introduction of the new 'maxdenybanners' directive. 
    30 # 
    31 # Revision 1.8  2004/01/12 15:28:45  jalet 
    32 # Now can output the user's history on several printers at the same time. 
    33 # 
    34 # Revision 1.7  2004/01/12 15:12:50  jalet 
    35 # Small fix for history 
    36 # 
    37 # Revision 1.6  2004/01/12 14:35:01  jalet 
    38 # Printing history added to CGI script. 
    39 # 
    40 # Revision 1.5  2004/01/08 14:10:33  jalet 
    41 # Copyright year changed. 
    42 # 
    43 # Revision 1.4  2004/01/06 15:51:46  jalet 
    44 # Code factorization 
    45 # 
    46 # Revision 1.3  2003/12/27 16:49:25  uid67467 
    47 # Should be ok now. 
    48 # 
    49 # Revision 1.1  2003/12/02 14:41:17  jalet 
    50 # And as always, I forgot most of the new files :-) 
    51 # 
    5222# 
    5323# 
  • pykota/trunk/pykota/reporters/text.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.10  2005/02/13 22:02:29  jalet 
    25 # Big database structure changes. Upgrade script is now included as well as 
    26 # the new LDAP schema. 
    27 # Introduction of the -o | --overcharge command line option to edpykota. 
    28 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    29 # Introduction of the new 'maxdenybanners' directive. 
    30 # 
    31 # Revision 1.9  2004/01/08 14:10:33  jalet 
    32 # Copyright year changed. 
    33 # 
    34 # Revision 1.8  2004/01/06 15:51:46  jalet 
    35 # Code factorization 
    36 # 
    37 # Revision 1.7  2003/12/27 16:49:25  uid67467 
    38 # Should be ok now. 
    39 # 
    40 # Revision 1.6  2003/12/02 14:40:21  jalet 
    41 # Some code refactoring. 
    42 # New HTML reporter added, which is now used in the CGI script for web based 
    43 # print quota reports. It will need some de-uglyfication though... 
    44 # 
    45 # Revision 1.5  2003/10/07 09:07:29  jalet 
    46 # Character encoding added to please latest version of Python 
    47 # 
    48 # Revision 1.4  2003/07/07 11:49:24  jalet 
    49 # Lots of small fixes with the help of PyChecker 
    50 # 
    51 # Revision 1.3  2003/07/05 07:46:50  jalet 
    52 # The previous bug fix was incomplete. 
    53 # 
    54 # Revision 1.2  2003/07/02 09:29:12  jalet 
    55 # Bug fixed when wanting a report and an user/group was limited by account balance 
    56 # 
    57 # Revision 1.1  2003/06/30 12:46:15  jalet 
    58 # Extracted reporting code. 
    59 # 
    6022# 
    6123# 
  • pykota/trunk/pykota/storage.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.70  2005/02/16 00:29:33  jalet 
    25 # Fixed the maxdenybanners directive. 
    26 # Introduced the denyduplicates directive. 
    27 # Fixed some database related glitches. 
    28 # 
    29 # Revision 1.69  2005/02/13 22:48:37  jalet 
    30 # Added the md5sum to the history 
    31 # 
    32 # Revision 1.68  2005/02/13 22:02:29  jalet 
    33 # Big database structure changes. Upgrade script is now included as well as 
    34 # the new LDAP schema. 
    35 # Introduction of the -o | --overcharge command line option to edpykota. 
    36 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    37 # Introduction of the new 'maxdenybanners' directive. 
    38 # 
    39 # Revision 1.67  2005/01/18 19:47:50  jalet 
    40 # Big bug fix wrt the datelimit attribute 
    41 # 
    42 # Revision 1.66  2004/12/02 21:24:50  jalet 
    43 # Integrated the patch by Wilson Roberto Afonso and Matt Hyclak to allow 
    44 # edpykota to accept the -U | --used value command line option. 
    45 # 
    46 # Revision 1.65  2004/10/25 14:12:25  jalet 
    47 # For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
    48 # to hide print jobs' title, filename, and options. 
    49 # 
    50 # Revision 1.64  2004/10/08 20:19:18  jalet 
    51 # Added ugly workaround for strange locale problem 
    52 # 
    53 # Revision 1.63  2004/10/07 21:14:28  jalet 
    54 # Hopefully final fix for data encoding to and from the database 
    55 # 
    56 # Revision 1.62  2004/09/28 17:45:31  jalet 
    57 # Added the --hardreset command line option to edpykota 
    58 # 
    59 # Revision 1.61  2004/09/24 21:19:48  jalet 
    60 # Did a pass of PyChecker 
    61 # 
    62 # Revision 1.60  2004/09/24 20:21:50  jalet 
    63 # Fixed pykotaAccountBalance object location during creation 
    64 # 
    65 # Revision 1.59  2004/09/10 21:32:52  jalet 
    66 # Small fixes for incomplete entry intialization 
    67 # 
    68 # Revision 1.58  2004/09/02 10:09:30  jalet 
    69 # Fixed bug in LDAP user deletion code which didn't correctly delete the user's 
    70 # pykotaLastJob entries. 
    71 # 
    72 # Revision 1.57  2004/07/22 22:41:48  jalet 
    73 # Hardware accounting for LPRng should be OK now. UNTESTED. 
    74 # 
    75 # Revision 1.56  2004/07/01 17:45:49  jalet 
    76 # Added code to handle the description field for printers 
    77 # 
    78 # Revision 1.55  2004/06/05 22:18:04  jalet 
    79 # Now catches some exceptions earlier. 
    80 # storage.py and ldapstorage.py : removed old comments 
    81 # 
    82 # Revision 1.54  2004/06/05 22:03:49  jalet 
    83 # Payments history is now stored in database 
    84 # 
    85 # Revision 1.53  2004/06/03 23:14:10  jalet 
    86 # Now stores the job's size in bytes in the database. 
    87 # Preliminary work on payments storage : database schemas are OK now, 
    88 # but no code to store payments yet. 
    89 # Removed schema picture, not relevant anymore. 
    90 # 
    91 # Revision 1.52  2004/05/26 14:49:57  jalet 
    92 # First try at saving the job-originating-hostname in the database 
    93 # 
    94 # Revision 1.51  2004/03/24 15:15:24  jalet 
    95 # Began integration of Henrik Janhagen's work on quota-then-balance 
    96 # and balance-then-quota 
    97 # 
    98 # Revision 1.50  2004/03/09 08:05:27  jalet 
    99 # Small fix : only keeps existing quota entries when searching parents 
    100 # 
    101 # Revision 1.49  2004/03/01 15:06:51  jalet 
    102 # Pre and Post hooks should now work in the pykota filter too. 
    103 # The pykota filter doesn't check the last user's quota anymore 
    104 # when delayed hardware accounting is used : this will be checked 
    105 # anyway the next time the last user will print 
    106 # 
    107 # Revision 1.48  2004/02/27 13:50:12  jalet 
    108 # Hopefully the final fix for groups (users and printers) 
    109 # 
    110 # Revision 1.47  2004/02/27 09:30:33  jalet 
    111 # datelimit wasn't reset when modifying soft and hard limits with the LDAP backend 
    112 # 
    113 # Revision 1.46  2004/02/26 14:18:07  jalet 
    114 # Should fix the remaining bugs wrt printers groups and users groups. 
    115 # 
    116 # Revision 1.45  2004/02/26 10:40:40  jalet 
    117 # Fixed nested printer groups accounting. 
    118 # 
    119 # Revision 1.44  2004/02/25 19:09:24  jalet 
    120 # Fix for LDAP problem when job price was 0. 
    121 # 
    122 # Revision 1.43  2004/02/25 12:36:34  jalet 
    123 # Avoids a database query even if caching was disabled. 
    124 # 
    125 # Revision 1.42  2004/02/23 22:53:21  jalet 
    126 # Don't retrieve data when it's not needed, to avoid database queries 
    127 # 
    128 # Revision 1.41  2004/02/04 17:12:33  jalet 
    129 # Removing a printer from a printers group should work now. 
    130 # 
    131 # Revision 1.40  2004/02/04 13:24:41  jalet 
    132 # pkprinters can now remove printers from printers groups. 
    133 # 
    134 # Revision 1.39  2004/02/04 11:16:59  jalet 
    135 # pkprinters command line tool added. 
    136 # 
    137 # Revision 1.38  2004/01/12 22:43:40  jalet 
    138 # New formula to compute a job's price 
    139 # 
    140 # Revision 1.37  2004/01/12 14:35:01  jalet 
    141 # Printing history added to CGI script. 
    142 # 
    143 # Revision 1.36  2004/01/10 09:44:02  jalet 
    144 # Fixed potential accuracy problem if a user printed on several printers at 
    145 # the very same time. 
    146 # 
    147 # Revision 1.35  2004/01/08 16:33:27  jalet 
    148 # Additionnal check to not create a circular printers group. 
    149 # 
    150 # Revision 1.34  2004/01/08 16:24:49  jalet 
    151 # edpykota now supports adding printers to printer groups. 
    152 # 
    153 # Revision 1.33  2004/01/08 14:10:32  jalet 
    154 # Copyright year changed. 
    155 # 
    156 # Revision 1.32  2004/01/06 16:02:57  jalet 
    157 # This time printer groups caching works. 
    158 # 
    159 # Revision 1.31  2004/01/06 15:51:24  jalet 
    160 # Fixed caching of printer groups 
    161 # 
    162 # Revision 1.30  2004/01/06 14:24:59  jalet 
    163 # Printer groups should be cached now, if caching is enabled. 
    164 # 
    165 # Revision 1.29  2003/12/27 16:49:25  uid67467 
    166 # Should be ok now. 
    167 # 
    168 # Revision 1.28  2003/11/25 23:46:40  jalet 
    169 # Don't try to verify if module name is valid, Python does this better than us. 
    170 # 
    171 # Revision 1.27  2003/11/23 19:01:36  jalet 
    172 # Job price added to history 
    173 # 
    174 # Revision 1.26  2003/11/21 14:28:45  jalet 
    175 # More complete job history. 
    176 # 
    177 # Revision 1.25  2003/10/08 21:12:27  jalet 
    178 # Do not cache anymore entries which don't exist. 
    179 # 
    180 # Revision 1.24  2003/10/07 22:06:05  jalet 
    181 # Preliminary code to disable job history 
    182 # 
    183 # Revision 1.23  2003/10/07 09:07:28  jalet 
    184 # Character encoding added to please latest version of Python 
    185 # 
    186 # Revision 1.22  2003/10/06 13:12:27  jalet 
    187 # More work on caching 
    188 # 
    189 # Revision 1.21  2003/10/03 09:02:20  jalet 
    190 # Logs cache store actions too 
    191 # 
    192 # Revision 1.20  2003/10/02 20:23:18  jalet 
    193 # Storage caching mechanism added. 
    194 # 
    195 # Revision 1.19  2003/07/16 21:53:07  jalet 
    196 # Really big modifications wrt new configuration file's location and content. 
    197 # 
    198 # Revision 1.18  2003/07/07 08:33:18  jalet 
    199 # Bug fix due to a typo in LDAP code 
    200 # 
    201 # Revision 1.17  2003/07/05 07:46:50  jalet 
    202 # The previous bug fix was incomplete. 
    203 # 
    204 # Revision 1.16  2003/06/25 19:52:31  jalet 
    205 # Should be ready for testing :-) 
    206 # 
    207 # Revision 1.15  2003/06/25 14:10:58  jalet 
    208 # Exception raising for now. 
    209 # 
    210 # Revision 1.14  2003/06/25 14:10:01  jalet 
    211 # Hey, it may work (edpykota --reset excepted) ! 
    212 # 
    213 # Revision 1.13  2003/06/10 16:37:54  jalet 
    214 # Deletion of the second user which is not needed anymore. 
    215 # Added a debug configuration field in /etc/pykota.conf 
    216 # All queries can now be sent to the logger in debug mode, this will 
    217 # greatly help improve performance when time for this will come. 
    218 # 
    219 # Revision 1.12  2003/04/23 22:13:57  jalet 
    220 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    221 # 
    222 # Revision 1.11  2003/04/10 21:47:20  jalet 
    223 # Job history added. Upgrade script neutralized for now ! 
    224 # 
    225 # Revision 1.10  2003/03/29 13:45:27  jalet 
    226 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    227 # Two README files were added. 
    228 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    229 # 
    230 # Revision 1.9  2003/02/17 22:55:01  jalet 
    231 # More options can now be set per printer or globally : 
    232 # 
    233 #       admin 
    234 #       adminmail 
    235 #       gracedelay 
    236 #       requester 
    237 # 
    238 # the printer option has priority when both are defined. 
    239 # 
    240 # Revision 1.8  2003/02/17 22:05:50  jalet 
    241 # Storage backend now supports admin and user passwords (untested) 
    242 # 
    243 # Revision 1.7  2003/02/10 12:07:31  jalet 
    244 # Now repykota should output the recorded total page number for each printer too. 
    245 # 
    246 # Revision 1.6  2003/02/09 13:05:43  jalet 
    247 # Internationalization continues... 
    248 # 
    249 # Revision 1.5  2003/02/08 22:39:46  jalet 
    250 # --reset command line option added 
    251 # 
    252 # Revision 1.4  2003/02/08 09:59:59  jalet 
    253 # Added preliminary base class for all storages 
    254 # 
    255 # Revision 1.3  2003/02/05 22:10:29  jalet 
    256 # Typos 
    257 # 
    258 # Revision 1.2  2003/02/05 22:02:22  jalet 
    259 # __import__ statement didn't work as expected 
    260 # 
    261 # Revision 1.1  2003/02/05 21:28:17  jalet 
    262 # Initial import into CVS 
    263 # 
    26422# 
    26523# 
  • pykota/trunk/pykota/storages/dbistorage.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.2  2004/09/24 21:19:48  jalet 
    25 # Did a pass of PyChecker 
    26 # 
    27 # Revision 1.1  2004/02/02 22:44:15  jalet 
    28 # Preliminary work on Relationnal Database Independance via DB-API 2.0 
    29 # 
    3022# 
    3123# 
  • pykota/trunk/pykota/storages/ldapstorage.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.103  2005/02/25 14:47:27  jalet 
    25 # Improved robustness for manually modified LDAP trees 
    26 # 
    27 # Revision 1.102  2005/02/25 14:31:07  jalet 
    28 # Improved robustness 
    29 # 
    30 # Revision 1.101  2005/02/13 22:48:37  jalet 
    31 # Added the md5sum to the history 
    32 # 
    33 # Revision 1.100  2005/02/13 22:02:29  jalet 
    34 # Big database structure changes. Upgrade script is now included as well as 
    35 # the new LDAP schema. 
    36 # Introduction of the -o | --overcharge command line option to edpykota. 
    37 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    38 # Introduction of the new 'maxdenybanners' directive. 
    39 # 
    40 # Revision 1.99  2005/01/24 17:44:17  jalet 
    41 # Same fix for group print quota entries wrt LDAP performance 
    42 # 
    43 # Revision 1.98  2005/01/24 17:35:24  jalet 
    44 # Performance improvement for user print quota entries search 
    45 # 
    46 # Revision 1.97  2005/01/24 17:27:35  jalet 
    47 # typo 
    48 # 
    49 # Revision 1.96  2005/01/24 15:38:51  jalet 
    50 # Fixed some ldap filters 
    51 # 
    52 # Revision 1.95  2005/01/18 19:47:50  jalet 
    53 # Big bug fix wrt the datelimit attribute 
    54 # 
    55 # Revision 1.94  2005/01/01 18:53:27  jalet 
    56 # Implemented in the LDAP backend code the same fix than in PostgreSQL backend 
    57 # code for people who don't use PyKota tools to manage accounts. 
    58 # 
    59 # Revision 1.93  2004/12/31 16:10:57  jalet 
    60 # Fixed recently introduced bugs due to extended userquotabase and groupquotabase 
    61 # directives. 
    62 # 
    63 # Revision 1.92  2004/12/26 14:50:51  jalet 
    64 # Normalized fields names in dumpykota's output so that an LDAP or PostgreSQL 
    65 # dump is parseable the same way. 
    66 # 
    67 # Revision 1.91  2004/12/21 16:46:25  jalet 
    68 # dumpykota's filtering capabilities are now supported within the LDAP 
    69 # backend as well as within the PostgreSQL backend. Untested though since 
    70 # my only PyKota+LDAP setup is on my laptop at work :-) 
    71 # 
    72 # Revision 1.90  2004/12/21 14:45:31  jalet 
    73 # Prepared dumpykota to accept the new --filter command line option. Some 
    74 # additionnal work needs to be done in the backends though. 
    75 # 
    76 # Revision 1.89  2004/12/02 22:27:11  jalet 
    77 # Integrated and extended Stefan Wold's patch to store print quota entries 
    78 # directly below the user or the group object with the LDAP backend 
    79 # 
    80 # Revision 1.88  2004/12/02 22:01:58  jalet 
    81 # TLS is now supported with the LDAP backend 
    82 # 
    83 # Revision 1.87  2004/12/02 12:34:00  jalet 
    84 # Now automates LDAP reconnections if the server dropped the connection due 
    85 # to a timeout. 
    86 # 
    87 # Revision 1.86  2004/10/25 14:12:25  jalet 
    88 # For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
    89 # to hide print jobs' title, filename, and options. 
    90 # 
    91 # Revision 1.85  2004/10/24 12:55:09  jalet 
    92 # Missing spaces 
    93 # 
    94 # Revision 1.84  2004/10/12 08:58:53  jalet 
    95 # Now warnpykota only warns users who have already printed, to not confuse 
    96 # users who have just opened their account. 
    97 # 
    98 # Revision 1.83  2004/10/07 21:14:28  jalet 
    99 # Hopefully final fix for data encoding to and from the database 
    100 # 
    101 # Revision 1.82  2004/10/05 09:59:20  jalet 
    102 # Restore compatibility with Python 2.1 
    103 # 
    104 # Revision 1.81  2004/10/04 11:27:57  jalet 
    105 # Finished LDAP support for dumpykota. 
    106 # 
    107 # Revision 1.80  2004/10/03 19:57:57  jalet 
    108 # Dump of payments should work with LDAP backend now. 
    109 # 
    110 # Revision 1.79  2004/10/03 19:52:59  jalet 
    111 # More work done on LDAP and dumpykota 
    112 # 
    113 # Revision 1.78  2004/10/02 05:48:56  jalet 
    114 # Should now correctly deal with charsets both when storing into databases and when 
    115 # retrieving datas. Works with both PostgreSQL and LDAP. 
    116 # 
    117 # Revision 1.77  2004/09/28 14:29:00  jalet 
    118 # dumpykota for LDAP backend is almost there. 
    119 # 
    120 # Revision 1.76  2004/09/28 09:11:56  jalet 
    121 # Fix for accented chars in print job's title, filename, and options 
    122 # 
    123 # Revision 1.75  2004/09/24 20:21:50  jalet 
    124 # Fixed pykotaAccountBalance object location during creation 
    125 # 
    126 # Revision 1.74  2004/09/02 10:09:30  jalet 
    127 # Fixed bug in LDAP user deletion code which didn't correctly delete the user's 
    128 # pykotaLastJob entries. 
    129 # 
    130 # Revision 1.73  2004/07/17 20:37:27  jalet 
    131 # Missing file... Am I really stupid ? 
    132 # 
    133 # Revision 1.72  2004/07/01 19:56:43  jalet 
    134 # Better dispatching of error messages 
    135 # 
    136 # Revision 1.71  2004/07/01 17:45:49  jalet 
    137 # Added code to handle the description field for printers 
    138 # 
    139 # Revision 1.70  2004/06/10 20:50:25  jalet 
    140 # Better log message 
    141 # 
    142 # Revision 1.69  2004/06/05 22:18:04  jalet 
    143 # Now catches some exceptions earlier. 
    144 # storage.py and ldapstorage.py : removed old comments 
    145 # 
    146 # Revision 1.68  2004/06/05 22:03:50  jalet 
    147 # Payments history is now stored in database 
    148 # 
    149 # Revision 1.67  2004/06/03 23:14:10  jalet 
    150 # Now stores the job's size in bytes in the database. 
    151 # Preliminary work on payments storage : database schemas are OK now, 
    152 # but no code to store payments yet. 
    153 # Removed schema picture, not relevant anymore. 
    154 # 
    155 # Revision 1.66  2004/05/28 20:56:45  jalet 
    156 # Extended syntax for LDAP specific newuser and newgroup directives. Untested. 
    157 # 
    158 # Revision 1.65  2004/05/27 12:52:12  jalet 
    159 # More useful error message in case of misconfiguration of an LDAP  search base 
    160 # in pykota.conf 
    161 # 
    162 # Revision 1.64  2004/05/26 14:50:01  jalet 
    163 # First try at saving the job-originating-hostname in the database 
    164 # 
    165 # Revision 1.63  2004/05/06 12:37:46  jalet 
    166 # pkpgcounter : comments 
    167 # pkprinters : when --add is used, existing printers are now skipped. 
    168 # 
    169 # Revision 1.62  2004/03/05 14:31:58  jalet 
    170 # Improvement on strange history entries 
    171 # 
    172 # Revision 1.61  2004/03/05 13:19:53  jalet 
    173 # Code safer wrt entries created in other tools 
    174 # 
    175 # Revision 1.60  2004/03/02 14:39:02  jalet 
    176 # Final fix for printers searching 
    177 # 
    178 # Revision 1.59  2004/03/02 14:35:46  jalet 
    179 # Missing test when searching printer objects when these objects were manually 
    180 # created and don't contain the pykotaPrinterName attribute 
    181 # 
    182 # Revision 1.58  2004/02/27 09:30:33  jalet 
    183 # datelimit wasn't reset when modifying soft and hard limits with the LDAP backend 
    184 # 
    185 # Revision 1.57  2004/02/26 14:18:07  jalet 
    186 # Should fix the remaining bugs wrt printers groups and users groups. 
    187 # 
    188 # Revision 1.56  2004/02/25 16:52:39  jalet 
    189 # Small fix wrt empty user groups 
    190 # 
    191 # Revision 1.55  2004/02/23 22:53:21  jalet 
    192 # Don't retrieve data when it's not needed, to avoid database queries 
    193 # 
    194 # Revision 1.54  2004/02/20 16:38:39  jalet 
    195 # ldapcache directive marked as experimental 
    196 # 
    197 # Revision 1.53  2004/02/20 14:42:21  jalet 
    198 # Experimental ldapcache directive added 
    199 # 
    200 # Revision 1.52  2004/02/17 23:41:48  jalet 
    201 # Preliminary work on low-level LDAP specific cache. 
    202 # 
    203 # Revision 1.51  2004/02/04 13:24:41  jalet 
    204 # pkprinters can now remove printers from printers groups. 
    205 # 
    206 # Revision 1.50  2004/02/04 11:17:00  jalet 
    207 # pkprinters command line tool added. 
    208 # 
    209 # Revision 1.49  2004/01/29 22:35:45  jalet 
    210 # Small fix from Matt. 
    211 # 
    212 # Revision 1.48  2004/01/12 14:35:02  jalet 
    213 # Printing history added to CGI script. 
    214 # 
    215 # Revision 1.47  2004/01/10 09:44:02  jalet 
    216 # Fixed potential accuracy problem if a user printed on several printers at 
    217 # the very same time. 
    218 # 
    219 # Revision 1.46  2004/01/08 16:33:27  jalet 
    220 # Additionnal check to not create a circular printers group. 
    221 # 
    222 # Revision 1.45  2004/01/08 16:24:49  jalet 
    223 # edpykota now supports adding printers to printer groups. 
    224 # 
    225 # Revision 1.44  2004/01/08 14:10:33  jalet 
    226 # Copyright year changed. 
    227 # 
    228 # Revision 1.43  2004/01/06 14:24:59  jalet 
    229 # Printer groups should be cached now, if caching is enabled. 
    230 # 
    231 # Revision 1.42  2003/12/29 14:12:48  uid67467 
    232 # Tries to workaround possible integrity violations when retrieving printer groups 
    233 # 
    234 # Revision 1.41  2003/12/27 16:49:25  uid67467 
    235 # Should be ok now. 
    236 # 
    237 # Revision 1.40  2003/11/29 22:02:14  jalet 
    238 # Don't try to retrieve the user print quota information if current printer 
    239 # doesn't exist. 
    240 # 
    241 # Revision 1.39  2003/11/26 23:35:32  jalet 
    242 # Added a bit of code to support the setting of the user's email address 
    243 # which was ignored during writes for now. 
    244 # 
    245 # Revision 1.38  2003/11/24 09:54:06  jalet 
    246 # Small fix for LDAP when pykotaOptions attribute wasn't present. 
    247 # 
    248 # Revision 1.37  2003/11/23 19:01:37  jalet 
    249 # Job price added to history 
    250 # 
    251 # Revision 1.36  2003/11/21 14:28:46  jalet 
    252 # More complete job history. 
    253 # 
    254 # Revision 1.35  2003/11/12 13:06:37  jalet 
    255 # Bug fix wrt no user/group name command line argument to edpykota 
    256 # 
    257 # Revision 1.34  2003/10/24 08:37:55  jalet 
    258 # More complete messages in case of LDAP failure. 
    259 # LDAP database connection is now unbound on exit too. 
    260 # 
    261 # Revision 1.33  2003/10/08 07:01:20  jalet 
    262 # Job history can be disabled. 
    263 # Some typos in README. 
    264 # More messages in setup script. 
    265 # 
    266 # Revision 1.32  2003/10/07 14:23:25  jalet 
    267 # More work on cache 
    268 # 
    269 # Revision 1.31  2003/10/07 09:07:30  jalet 
    270 # Character encoding added to please latest version of Python 
    271 # 
    272 # Revision 1.30  2003/10/06 14:42:36  jalet 
    273 # LDAP group access will be slower when cache is disabled, but at least code 
    274 # is consistent with the rest of the caching mechanis, but at least code 
    275 # is consistent with the rest of the caching mechanism 
    276 # 
    277 # Revision 1.29  2003/10/06 13:12:28  jalet 
    278 # More work on caching 
    279 # 
    280 # Revision 1.28  2003/10/03 12:27:02  jalet 
    281 # Several optimizations, especially with LDAP backend 
    282 # 
    283 # Revision 1.27  2003/10/03 08:57:55  jalet 
    284 # Caching mechanism now caches all that's cacheable. 
    285 # 
    286 # Revision 1.26  2003/10/02 20:23:18  jalet 
    287 # Storage caching mechanism added. 
    288 # 
    289 # Revision 1.25  2003/08/20 15:56:24  jalet 
    290 # Better user and group deletion 
    291 # 
    292 # Revision 1.24  2003/07/29 20:55:17  jalet 
    293 # 1.14 is out ! 
    294 # 
    295 # Revision 1.23  2003/07/29 19:52:32  jalet 
    296 # Forgot to read the email field from LDAP 
    297 # 
    298 # Revision 1.22  2003/07/29 09:54:03  jalet 
    299 # Added configurable LDAP mail attribute support 
    300 # 
    301 # Revision 1.21  2003/07/28 09:11:12  jalet 
    302 # PyKota now tries to add its attributes intelligently in existing LDAP 
    303 # directories. 
    304 # 
    305 # Revision 1.20  2003/07/25 10:41:30  jalet 
    306 # Better documentation. 
    307 # pykotme now displays the current user's account balance. 
    308 # Some test changed in ldap module. 
    309 # 
    310 # Revision 1.19  2003/07/14 14:18:16  jalet 
    311 # Wrong documentation strings 
    312 # 
    313 # Revision 1.18  2003/07/11 14:23:13  jalet 
    314 # When adding an user only adds one object containing both the user and 
    315 # its account balance instead of two objects. 
    316 # 
    317 # Revision 1.17  2003/07/07 12:51:07  jalet 
    318 # Small fix 
    319 # 
    320 # Revision 1.16  2003/07/07 12:11:13  jalet 
    321 # Small fix 
    322 # 
    323 # Revision 1.15  2003/07/07 11:49:24  jalet 
    324 # Lots of small fixes with the help of PyChecker 
    325 # 
    326 # Revision 1.14  2003/07/07 08:33:18  jalet 
    327 # Bug fix due to a typo in LDAP code 
    328 # 
    329 # Revision 1.13  2003/07/05 07:46:50  jalet 
    330 # The previous bug fix was incomplete. 
    331 # 
    332 # Revision 1.12  2003/06/30 13:54:21  jalet 
    333 # Sorts by user / group name 
    334 # 
    335 # Revision 1.11  2003/06/25 14:10:01  jalet 
    336 # Hey, it may work (edpykota --reset excepted) ! 
    337 # 
    338 # Revision 1.10  2003/06/16 21:55:15  jalet 
    339 # More work on LDAP, again. Problem detected. 
    340 # 
    341 # Revision 1.9  2003/06/16 11:59:09  jalet 
    342 # More work on LDAP 
    343 # 
    344 # Revision 1.8  2003/06/15 22:26:52  jalet 
    345 # More work on LDAP 
    346 # 
    347 # Revision 1.7  2003/06/14 22:44:21  jalet 
    348 # More work on LDAP storage backend. 
    349 # 
    350 # Revision 1.6  2003/06/13 19:07:57  jalet 
    351 # Two big bugs fixed, time to release something ;-) 
    352 # 
    353 # Revision 1.5  2003/06/10 16:37:54  jalet 
    354 # Deletion of the second user which is not needed anymore. 
    355 # Added a debug configuration field in /etc/pykota.conf 
    356 # All queries can now be sent to the logger in debug mode, this will 
    357 # greatly help improve performance when time for this will come. 
    358 # 
    359 # Revision 1.4  2003/06/10 10:45:32  jalet 
    360 # Not implemented methods now raise an exception when called. 
    361 # 
    362 # Revision 1.3  2003/06/06 20:49:15  jalet 
    363 # Very latest schema. UNTESTED. 
    364 # 
    365 # Revision 1.2  2003/06/06 14:21:08  jalet 
    366 # New LDAP schema. 
    367 # Small bug fixes. 
    368 # 
    369 # Revision 1.1  2003/06/05 11:19:13  jalet 
    370 # More good work on LDAP storage. 
    371 # 
    37222# 
    37323# 
  • pykota/trunk/pykota/storages/pgstorage.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.39  2005/01/19 08:56:30  jalet 
    25 # Convert PygreSQL's new exception into a string before re-raising it 
    26 # 
    27 # Revision 1.38  2005/01/19 08:48:17  jalet 
    28 # Fix exception's name wrt newer versions of PygreSQL 
    29 # 
    30 # Revision 1.37  2004/09/14 22:29:12  jalet 
    31 # First version of dumpykota. Works fine but only with PostgreSQL backend 
    32 # for now. 
    33 # 
    34 # Revision 1.36  2004/06/03 23:14:11  jalet 
    35 # Now stores the job's size in bytes in the database. 
    36 # Preliminary work on payments storage : database schemas are OK now, 
    37 # but no code to store payments yet. 
    38 # Removed schema picture, not relevant anymore. 
    39 # 
    40 # Revision 1.35  2004/02/02 22:44:16  jalet 
    41 # Preliminary work on Relationnal Database Independance via DB-API 2.0 
    42 # 
    43 # Revision 1.34  2004/01/12 15:12:50  jalet 
    44 # Small fix for history 
    45 # 
    46 # Revision 1.33  2004/01/12 14:44:47  jalet 
    47 # Missing space in SQL query 
    48 # 
    49 # Revision 1.32  2004/01/12 14:35:02  jalet 
    50 # Printing history added to CGI script. 
    51 # 
    52 # Revision 1.31  2004/01/10 09:44:02  jalet 
    53 # Fixed potential accuracy problem if a user printed on several printers at 
    54 # the very same time. 
    55 # 
    56 # Revision 1.30  2004/01/08 16:33:27  jalet 
    57 # Additionnal check to not create a circular printers group. 
    58 # 
    59 # Revision 1.29  2004/01/08 16:24:49  jalet 
    60 # edpykota now supports adding printers to printer groups. 
    61 # 
    62 # Revision 1.28  2004/01/08 14:10:33  jalet 
    63 # Copyright year changed. 
    64 # 
    65 # Revision 1.27  2004/01/06 14:24:59  jalet 
    66 # Printer groups should be cached now, if caching is enabled. 
    67 # 
    68 # Revision 1.26  2003/12/29 14:12:48  uid67467 
    69 # Tries to workaround possible integrity violations when retrieving printer groups 
    70 # 
    71 # Revision 1.25  2003/12/27 16:49:25  uid67467 
    72 # Should be ok now. 
    73 # 
    74 # Revision 1.24  2003/11/29 22:02:14  jalet 
    75 # Don't try to retrieve the user print quota information if current printer 
    76 # doesn't exist. 
    77 # 
    78 # Revision 1.23  2003/11/23 19:01:37  jalet 
    79 # Job price added to history 
    80 # 
    81 # Revision 1.22  2003/11/21 14:28:46  jalet 
    82 # More complete job history. 
    83 # 
    84 # Revision 1.21  2003/11/12 13:06:38  jalet 
    85 # Bug fix wrt no user/group name command line argument to edpykota 
    86 # 
    87 # Revision 1.20  2003/10/09 21:25:26  jalet 
    88 # Multiple printer names or wildcards can be passed on the command line 
    89 # separated with commas. 
    90 # Beta phase. 
    91 # 
    92 # Revision 1.19  2003/10/08 07:01:20  jalet 
    93 # Job history can be disabled. 
    94 # Some typos in README. 
    95 # More messages in setup script. 
    96 # 
    97 # Revision 1.18  2003/10/07 09:07:30  jalet 
    98 # Character encoding added to please latest version of Python 
    99 # 
    100 # Revision 1.17  2003/10/06 13:12:28  jalet 
    101 # More work on caching 
    102 # 
    103 # Revision 1.16  2003/10/03 18:01:49  jalet 
    104 # Nothing interesting... 
    105 # 
    106 # Revision 1.15  2003/10/03 12:27:03  jalet 
    107 # Several optimizations, especially with LDAP backend 
    108 # 
    109 # Revision 1.14  2003/10/03 08:57:55  jalet 
    110 # Caching mechanism now caches all that's cacheable. 
    111 # 
    112 # Revision 1.13  2003/10/02 20:23:18  jalet 
    113 # Storage caching mechanism added. 
    114 # 
    115 # Revision 1.12  2003/08/17 14:20:25  jalet 
    116 # Bug fix by Oleg Biteryakov 
    117 # 
    118 # Revision 1.11  2003/07/29 20:55:17  jalet 
    119 # 1.14 is out ! 
    120 # 
    121 # Revision 1.10  2003/07/16 21:53:08  jalet 
    122 # Really big modifications wrt new configuration file's location and content. 
    123 # 
    124 # Revision 1.9  2003/07/14 17:20:15  jalet 
    125 # Bug in postgresql storage when modifying the prices for a printer 
    126 # 
    127 # Revision 1.8  2003/07/14 14:18:17  jalet 
    128 # Wrong documentation strings 
    129 # 
    130 # Revision 1.7  2003/07/09 20:17:07  jalet 
    131 # Email field added to PostgreSQL schema 
    132 # 
    133 # Revision 1.6  2003/07/07 11:49:24  jalet 
    134 # Lots of small fixes with the help of PyChecker 
    135 # 
    136 # Revision 1.5  2003/07/07 08:33:19  jalet 
    137 # Bug fix due to a typo in LDAP code 
    138 # 
    139 # Revision 1.4  2003/06/30 13:54:21  jalet 
    140 # Sorts by user / group name 
    141 # 
    142 # Revision 1.3  2003/06/25 14:10:01  jalet 
    143 # Hey, it may work (edpykota --reset excepted) ! 
    144 # 
    145 # Revision 1.2  2003/06/12 21:09:57  jalet 
    146 # wrongly placed code. 
    147 # 
    148 # Revision 1.1  2003/06/10 16:37:54  jalet 
    149 # Deletion of the second user which is not needed anymore. 
    150 # Added a debug configuration field in /etc/pykota.conf 
    151 # All queries can now be sent to the logger in debug mode, this will 
    152 # greatly help improve performance when time for this will come. 
    153 # 
    154 # 
    15522# 
    15623# 
  • pykota/trunk/pykota/storages/sql.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.67  2005/02/16 00:29:33  jalet 
    25 # Fixed the maxdenybanners directive. 
    26 # Introduced the denyduplicates directive. 
    27 # Fixed some database related glitches. 
    28 # 
    29 # Revision 1.66  2005/02/13 22:48:38  jalet 
    30 # Added the md5sum to the history 
    31 # 
    32 # Revision 1.65  2005/02/13 22:02:29  jalet 
    33 # Big database structure changes. Upgrade script is now included as well as 
    34 # the new LDAP schema. 
    35 # Introduction of the -o | --overcharge command line option to edpykota. 
    36 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    37 # Introduction of the new 'maxdenybanners' directive. 
    38 # 
    39 # Revision 1.64  2005/01/18 19:47:50  jalet 
    40 # Big bug fix wrt the datelimit attribute 
    41 # 
    42 # Revision 1.63  2005/01/01 08:16:17  jalet 
    43 # Fixed a problem which occured when 'limitby' was unset in the PostgreSQL 
    44 # database 
    45 # 
    46 # Revision 1.62  2004/12/21 16:19:44  jalet 
    47 # Fixed the problem with dumpykota's filtering of printers groups membership 
    48 # 
    49 # Revision 1.61  2004/12/21 15:49:59  jalet 
    50 # The dumpykota command now supports extended filtering capabilities with 
    51 # the PostgreSQL backend. LDAP doesn't yet support such possibilities. 
    52 # 
    53 # Revision 1.60  2004/12/21 14:45:31  jalet 
    54 # Prepared dumpykota to accept the new --filter command line option. Some 
    55 # additionnal work needs to be done in the backends though. 
    56 # 
    57 # Revision 1.59  2004/10/25 14:12:25  jalet 
    58 # For URGENT legal reasons (Italy), a new "privacy" directive was added to pykota.conf 
    59 # to hide print jobs' title, filename, and options. 
    60 # 
    61 # Revision 1.58  2004/10/12 08:58:53  jalet 
    62 # Now warnpykota only warns users who have already printed, to not confuse 
    63 # users who have just opened their account. 
    64 # 
    65 # Revision 1.57  2004/10/10 10:12:21  jalet 
    66 # Improved SQL queries for groups. Same work has to be done for groups print quotas. 
    67 # 
    68 # Revision 1.56  2004/10/07 21:14:28  jalet 
    69 # Hopefully final fix for data encoding to and from the database 
    70 # 
    71 # Revision 1.55  2004/10/07 09:37:53  jalet 
    72 # Fixes recently introduced bug wrt users groups (was it three days ago ?) 
    73 # 
    74 # Revision 1.54  2004/10/05 10:05:04  jalet 
    75 # UnicodeEncodeError isn't defined in Python2.1 
    76 # 
    77 # Revision 1.53  2004/10/05 09:59:20  jalet 
    78 # Restore compatibility with Python 2.1 
    79 # 
    80 # Revision 1.52  2004/10/04 22:23:54  jalet 
    81 # Charset conversions for dumps from the PostgreSQL backend 
    82 # 
    83 # Revision 1.51  2004/10/04 16:11:38  jalet 
    84 # Now outputs page counters when dumping user groups quotas 
    85 # 
    86 # Revision 1.50  2004/10/04 16:01:15  jalet 
    87 # More complete dumps for groups and groups quotas 
    88 # 
    89 # Revision 1.49  2004/10/02 13:33:13  jalet 
    90 # Some work done of user's charset handling in database dumps. 
    91 # 
    92 # Revision 1.48  2004/10/02 05:48:56  jalet 
    93 # Should now correctly deal with charsets both when storing into databases and when 
    94 # retrieving datas. Works with both PostgreSQL and LDAP. 
    95 # 
    96 # Revision 1.47  2004/09/15 07:26:20  jalet 
    97 # Data dumps are now ordered by entry creation date if applicable. 
    98 # Now dumpykota exits with a message when there's a broken pipe like 
    99 # in dumpykota --data history | head -3 
    100 # 
    101 # Revision 1.46  2004/09/15 06:58:25  jalet 
    102 # User groups membership and printer groups membership can now be dumped too 
    103 # 
    104 # Revision 1.45  2004/09/14 22:29:13  jalet 
    105 # First version of dumpykota. Works fine but only with PostgreSQL backend 
    106 # for now. 
    107 # 
    108 # Revision 1.44  2004/09/10 21:32:54  jalet 
    109 # Small fixes for incomplete entry intialization 
    110 # 
    111 # Revision 1.43  2004/07/01 17:45:49  jalet 
    112 # Added code to handle the description field for printers 
    113 # 
    114 # Revision 1.42  2004/06/08 17:44:43  jalet 
    115 # Payment now gets deleted when the user is deleted 
    116 # 
    117 # Revision 1.41  2004/06/05 22:03:50  jalet 
    118 # Payments history is now stored in database 
    119 # 
    120 # Revision 1.40  2004/06/03 23:14:11  jalet 
    121 # Now stores the job's size in bytes in the database. 
    122 # Preliminary work on payments storage : database schemas are OK now, 
    123 # but no code to store payments yet. 
    124 # Removed schema picture, not relevant anymore. 
    125 # 
    126 # Revision 1.39  2004/05/26 14:50:12  jalet 
    127 # First try at saving the job-originating-hostname in the database 
    128 # 
    129 # Revision 1.38  2004/05/06 12:37:47  jalet 
    130 # pkpgcounter : comments 
    131 # pkprinters : when --add is used, existing printers are now skipped. 
    132 # 
    133 # Revision 1.37  2004/02/23 22:53:21  jalet 
    134 # Don't retrieve data when it's not needed, to avoid database queries 
    135 # 
    136 # Revision 1.36  2004/02/04 13:24:41  jalet 
    137 # pkprinters can now remove printers from printers groups. 
    138 # 
    139 # Revision 1.35  2004/02/04 11:17:00  jalet 
    140 # pkprinters command line tool added. 
    141 # 
    142 # Revision 1.34  2004/02/02 22:44:16  jalet 
    143 # Preliminary work on Relationnal Database Independance via DB-API 2.0 
    144 # 
    14522# 
    14623# 
  • pykota/trunk/pykota/tool.py

    r2146 r2147  
    2020# 
    2121# $Id$ 
    22 # 
    23 # $Log$ 
    24 # Revision 1.151  2005/02/22 17:56:58  jalet 
    25 # Now logs the type of user running the command : mere mortal vs PyKota Admin 
    26 # 
    27 # Revision 1.150  2005/02/14 22:53:44  jalet 
    28 # Now always precomputes the job's size with the internal PDL parser, and not 
    29 # only when 'enforcement: strict' was set in pykota.conf 
    30 # 
    31 # Revision 1.149  2005/02/13 22:02:29  jalet 
    32 # Big database structure changes. Upgrade script is now included as well as 
    33 # the new LDAP schema. 
    34 # Introduction of the -o | --overcharge command line option to edpykota. 
    35 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    36 # Introduction of the new 'maxdenybanners' directive. 
    37 # 
    38 # Revision 1.148  2005/01/06 23:24:21  jalet 
    39 # Regain priviledge the time to open the job's data file when printing in 
    40 # raw mode with CUPS. 
    41 # 
    42 # Revision 1.147  2005/01/06 22:52:53  jalet 
    43 # Implemented the dropping of priviledges. Beware, beware... 
    44 # 
    45 # Revision 1.146  2004/12/09 23:03:57  jalet 
    46 # Fixed a bug when pkbanner's output was piped into another command (e.g. gs) 
    47 # 
    48 # Revision 1.145  2004/11/27 22:52:07  jalet 
    49 # Now PyKota searches its configuration files first in system user pykota's 
    50 # home directory 
    51 # 
    52 # Revision 1.144  2004/11/18 06:01:53  jalet 
    53 # Fix for the fix 
    54 # 
    55 # Revision 1.143  2004/11/18 05:54:15  jalet 
    56 # Fix problem with spaces at the end of filenames in LPRng 
    57 # 
    58 # Revision 1.142  2004/11/16 23:15:05  jalet 
    59 # Fix for LPRng job's file detection code 
    60 # 
    61 # Revision 1.141  2004/11/15 22:01:34  jalet 
    62 # Improved banner handling. 
    63 # Fix for raw printing and banners. 
    64 # 
    65 # Revision 1.140  2004/11/15 19:59:34  jalet 
    66 # PyKota banners now basically work ! 
    67 # 
    68 # Revision 1.139  2004/11/15 15:54:03  jalet 
    69 # Continued integration of Matt's patch for banners 
    70 # 
    71 # Revision 1.138  2004/11/12 23:46:44  jalet 
    72 # Heavy work on pkbanner. Not finished yet though, but mostly works. 
    73 # 
    74 # Revision 1.137  2004/11/01 16:21:17  jalet 
    75 # Little change for locale+gettext 
    76 # 
    77 # Revision 1.136  2004/10/24 09:06:46  jalet 
    78 # Added debug messages for LPRng support possible problem ??? 
    79 # 
    80 # Revision 1.135  2004/10/20 14:29:30  jalet 
    81 # Now logs something when locale settings are incorrect. 
    82 # 
    83 # Revision 1.134  2004/10/20 08:12:27  jalet 
    84 # Another fix for charset detection and Python2.3 
    85 # 
    86 # Revision 1.133  2004/10/19 22:24:00  jalet 
    87 # Should fix the printer's hostname or IP address detection code. 
    88 # 
    89 # Revision 1.132  2004/10/19 21:45:25  jalet 
    90 # Now correctly logs command line arguments 
    91 # 
    92 # Revision 1.131  2004/10/19 21:37:57  jalet 
    93 # Fixes recently introduced bug 
    94 # 
    95 # Revision 1.130  2004/10/19 15:21:48  jalet 
    96 # Fixed incorrect setting of the user's locale 
    97 # 
    98 # Revision 1.129  2004/10/13 20:51:27  jalet 
    99 # Made debugging levels be the same in cupspykota and lprngpykota. 
    100 # Now outputs more information in informational messages : user, printer, jobid 
    101 # 
    102 # Revision 1.128  2004/10/11 22:53:06  jalet 
    103 # Postponed string interpolation to help message's output method 
    104 # 
    105 # Revision 1.127  2004/10/11 12:48:38  jalet 
    106 # Adds fake translation marker 
    107 # 
    108 # Revision 1.126  2004/10/05 09:41:13  jalet 
    109 # Small fix for errors caused by unknown locale 
    110 # 
    111 # Revision 1.125  2004/10/04 11:18:10  jalet 
    112 # Now exports the MD5 sum of the job's datas as an hexadecimal digest 
    113 # 
    114 # Revision 1.124  2004/10/02 05:48:56  jalet 
    115 # Should now correctly deal with charsets both when storing into databases and when 
    116 # retrieving datas. Works with both PostgreSQL and LDAP. 
    117 # 
    118 # Revision 1.123  2004/09/29 20:20:52  jalet 
    119 # Added the winbind_separator directive to pykota.conf to allow the admin to 
    120 # strip out the Samba/Winbind domain name when users print. 
    121 # 
    122 # Revision 1.122  2004/09/28 21:38:56  jalet 
    123 # Now computes the job's datas MD5 checksum to later forbid duplicate print jobs. 
    124 # The checksum is not yet saved into the database. 
    125 # 
    126 # Revision 1.121  2004/09/15 18:47:58  jalet 
    127 # Re-Extends the list of invalid characters in names to prevent 
    128 # people from adding user "*" for example, or to prevent 
    129 # print administrators to hijack the system by putting dangerous 
    130 # datas into the database which would cause commands later run by root 
    131 # to compromise the system. 
    132 # 
    133 # Revision 1.120  2004/09/02 13:26:29  jalet 
    134 # Small fix for old versions of LPRng 
    135 # 
    136 # Revision 1.119  2004/09/02 13:09:58  jalet 
    137 # Now exports PYKOTAPRINTERHOSTNAME 
    138 # 
    139 # Revision 1.118  2004/08/06 20:46:45  jalet 
    140 # Finished group quota fix for balance when no user in group has a balance 
    141 # 
    142 # Revision 1.117  2004/08/06 13:45:51  jalet 
    143 # Fixed french translation problem. 
    144 # Fixed problem with group quotas and strict enforcement. 
    145 # 
    146 # Revision 1.116  2004/07/24 20:20:29  jalet 
    147 # Unitialized variable 
    148 # 
    149 # Revision 1.115  2004/07/21 09:35:48  jalet 
    150 # Software accounting seems to be OK with LPRng support now 
    151 # 
    152 # Revision 1.114  2004/07/20 22:19:45  jalet 
    153 # Sanitized a bit + use of gettext 
    154 # 
    155 # Revision 1.113  2004/07/17 20:37:27  jalet 
    156 # Missing file... Am I really stupid ? 
    157 # 
    158 # Revision 1.112  2004/07/16 12:22:47  jalet 
    159 # LPRng support early version 
    160 # 
    161 # Revision 1.111  2004/07/06 18:09:42  jalet 
    162 # Reduced the set of invalid characters in names 
    163 # 
    164 # Revision 1.110  2004/07/01 19:56:42  jalet 
    165 # Better dispatching of error messages 
    166 # 
    167 # Revision 1.109  2004/07/01 17:45:49  jalet 
    168 # Added code to handle the description field for printers 
    169 # 
    170 # Revision 1.108  2004/06/24 23:09:30  jalet 
    171 # Also prints read size on last block 
    172 # 
    173 # Revision 1.107  2004/06/23 13:03:28  jalet 
    174 # Catches accounter configuration errors earlier 
    175 # 
    176 # Revision 1.106  2004/06/22 09:31:18  jalet 
    177 # Always send some debug info to CUPS' back channel stream (stderr) as 
    178 # informationnal messages. 
    179 # 
    180 # Revision 1.105  2004/06/21 08:17:38  jalet 
    181 # Added version number in subject message for directive crashrecipient. 
    182 # 
    183 # Revision 1.104  2004/06/18 13:34:49  jalet 
    184 # Now all tracebacks include PyKota's version number 
    185 # 
    186 # Revision 1.103  2004/06/18 13:17:26  jalet 
    187 # Now includes PyKota's version number in messages sent by the crashrecipient 
    188 # directive. 
    189 # 
    190 # Revision 1.102  2004/06/17 13:26:51  jalet 
    191 # Better exception handling code 
    192 # 
    193 # Revision 1.101  2004/06/16 20:56:34  jalet 
    194 # Smarter initialisation code 
    195 # 
    196 # Revision 1.100  2004/06/11 08:16:03  jalet 
    197 # More exceptions catched in case of very early failure. 
    198 # 
    199 # Revision 1.99  2004/06/11 07:07:38  jalet 
    200 # Now detects and logs configuration syntax errors instead of failing without 
    201 # any notice message. 
    202 # 
    203 # Revision 1.98  2004/06/08 19:27:12  jalet 
    204 # Doesn't ignore SIGCHLD anymore 
    205 # 
    206 # Revision 1.97  2004/06/07 22:45:35  jalet 
    207 # Now accepts a job when enforcement is STRICT and predicted account balance 
    208 # is equal to 0.0 : since the job hasn't been printed yet, only its printing 
    209 # will really render balance equal to 0.0, so we should be allowed to print. 
    210 # 
    211 # Revision 1.96  2004/06/05 22:18:04  jalet 
    212 # Now catches some exceptions earlier. 
    213 # storage.py and ldapstorage.py : removed old comments 
    214 # 
    215 # Revision 1.95  2004/06/03 21:50:34  jalet 
    216 # Improved error logging. 
    217 # crashrecipient directive added. 
    218 # Now exports the job's size in bytes too. 
    219 # 
    220 # Revision 1.94  2004/06/03 08:51:03  jalet 
    221 # logs job's size in bytes now 
    222 # 
    223 # Revision 1.93  2004/06/02 21:51:02  jalet 
    224 # Moved the sigterm capturing elsewhere 
    225 # 
    226 # Revision 1.92  2004/06/02 13:21:38  jalet 
    227 # Debug message added 
    228 # 
    229 # Revision 1.91  2004/05/25 05:17:52  jalet 
    230 # Now precomputes the job's size only if current printer's enforcement 
    231 # is "STRICT" 
    232 # 
    233 # Revision 1.90  2004/05/24 22:45:49  jalet 
    234 # New 'enforcement' directive added 
    235 # Polling loop improvements 
    236 # 
    237 # Revision 1.89  2004/05/21 22:02:52  jalet 
    238 # Preliminary work on pre-accounting 
    239 # 
    240 # Revision 1.88  2004/05/18 14:49:20  jalet 
    241 # Big code changes to completely remove the need for "requester" directives, 
    242 # jsut use "hardware(... your previous requester directive's content ...)" 
    243 # 
    244 # Revision 1.87  2004/05/17 19:14:59  jalet 
    245 # Now catches SIGPIPE and SIGCHLD 
    246 # 
    247 # Revision 1.86  2004/05/13 13:59:28  jalet 
    248 # Code simplifications 
    249 # 
    250 # Revision 1.85  2004/05/11 08:26:27  jalet 
    251 # Now catches connection problems to SMTP server 
    252 # 
    253 # Revision 1.84  2004/04/21 08:36:32  jalet 
    254 # Exports the PYKOTASTATUS environment variable when SIGTERM is received. 
    255 # 
    256 # Revision 1.83  2004/04/16 17:03:49  jalet 
    257 # The list of printers groups the current printer is a member of is 
    258 # now exported in the PYKOTAPGROUPS environment variable 
    259 # 
    260 # Revision 1.82  2004/04/13 09:38:03  jalet 
    261 # More work on correct child processes handling 
    262 # 
    263 # Revision 1.81  2004/04/09 22:24:47  jalet 
    264 # Began work on correct handling of child processes when jobs are cancelled by 
    265 # the user. Especially important when an external requester is running for a 
    266 # long time. 
    267 # 
    268 # Revision 1.80  2004/04/06 12:00:21  jalet 
    269 # uninitialized values caused problems 
    270 # 
    271 # Revision 1.79  2004/03/28 21:01:29  jalet 
    272 # PYKOTALIMITBY environment variable is now exported too 
    273 # 
    274 # Revision 1.78  2004/03/08 20:13:25  jalet 
    275 # Allow names to begin with a digit 
    276 # 
    277 # Revision 1.77  2004/03/03 13:10:35  jalet 
    278 # Now catches all smtplib exceptions when there's a problem sending messages 
    279 # 
    280 # Revision 1.76  2004/03/01 14:34:15  jalet 
    281 # PYKOTAPHASE wasn't set at the right time at the end of data transmission 
    282 # to underlying layer (real backend) 
    283 # 
    284 # Revision 1.75  2004/03/01 11:23:25  jalet 
    285 # Pre and Post hooks to external commands are available in the cupspykota 
    286 # backend. Forthe pykota filter they will be implemented real soon now. 
    287 # 
    288 # Revision 1.74  2004/02/26 14:18:07  jalet 
    289 # Should fix the remaining bugs wrt printers groups and users groups. 
    290 # 
    291 # Revision 1.73  2004/02/19 14:20:21  jalet 
    292 # maildomain pykota.conf directive added. 
    293 # Small improvements on mail headers quality. 
    294 # 
    295 # Revision 1.72  2004/01/14 15:51:19  jalet 
    296 # Docstring added. 
    297 # 
    298 # Revision 1.71  2004/01/11 23:22:42  jalet 
    299 # Major code refactoring, it's way cleaner, and now allows automated addition 
    300 # of printers on first print. 
    301 # 
    302 # Revision 1.70  2004/01/08 14:10:32  jalet 
    303 # Copyright year changed. 
    304 # 
    305 # Revision 1.69  2004/01/05 16:02:18  jalet 
    306 # Dots in user, groups and printer names should be allowed. 
    307 # 
    308 # Revision 1.68  2004/01/02 17:38:40  jalet 
    309 # This time it should be better... 
    310 # 
    311 # Revision 1.67  2004/01/02 17:37:09  jalet 
    312 # I'm completely stupid !!! Better to not talk while coding ! 
    313 # 
    314 # Revision 1.66  2004/01/02 17:31:26  jalet 
    315 # Forgot to remove some code 
    316 # 
    317 # Revision 1.65  2003/12/06 08:14:38  jalet 
    318 # Added support for CUPS device uris which contain authentication information. 
    319 # 
    320 # Revision 1.64  2003/11/29 22:03:17  jalet 
    321 # Some code refactoring work. New code is not used at this time. 
    322 # 
    323 # Revision 1.63  2003/11/29 20:06:20  jalet 
    324 # Added 'utolower' configuration option to convert all usernames to 
    325 # lowercase when printing. All database accesses are still and will 
    326 # remain case sensitive though. 
    327 # 
    328 # Revision 1.62  2003/11/25 22:37:22  jalet 
    329 # Small code move 
    330 # 
    331 # Revision 1.61  2003/11/25 22:03:28  jalet 
    332 # No more message on stderr when the translation is not available. 
    333 # 
    334 # Revision 1.60  2003/11/25 21:54:05  jalet 
    335 # updated FAQ 
    336 # 
    337 # Revision 1.59  2003/11/25 13:33:43  jalet 
    338 # Puts 'root' instead of '' when printing from CUPS web interface (which 
    339 # gives an empty username) 
    340 # 
    341 # Revision 1.58  2003/11/21 14:28:45  jalet 
    342 # More complete job history. 
    343 # 
    344 # Revision 1.57  2003/11/19 23:19:38  jalet 
    345 # Code refactoring work. 
    346 # Explicit redirection to /dev/null has to be set in external policy now, just 
    347 # like in external mailto. 
    348 # 
    349 # Revision 1.56  2003/11/19 07:40:20  jalet 
    350 # Missing import statement. 
    351 # Better documentation for mailto: external(...) 
    352 # 
    353 # Revision 1.55  2003/11/18 23:43:12  jalet 
    354 # Mailto can be any external command now, as usual. 
    355 # 
    356 # Revision 1.54  2003/10/24 21:52:46  jalet 
    357 # Now can force language when coming from CGI script. 
    358 # 
    359 # Revision 1.53  2003/10/08 21:41:38  jalet 
    360 # External policies for printers works ! 
    361 # We can now auto-add users on first print, and do other useful things if needed. 
    362 # 
    363 # Revision 1.52  2003/10/07 09:07:28  jalet 
    364 # Character encoding added to please latest version of Python 
    365 # 
    366 # Revision 1.51  2003/10/06 14:21:41  jalet 
    367 # Test reversed to not retrieve group members when no messages for them. 
    368 # 
    369 # Revision 1.50  2003/10/02 20:23:18  jalet 
    370 # Storage caching mechanism added. 
    371 # 
    372 # Revision 1.49  2003/07/29 20:55:17  jalet 
    373 # 1.14 is out ! 
    374 # 
    375 # Revision 1.48  2003/07/21 23:01:56  jalet 
    376 # Modified some messages aout soft limit 
    377 # 
    378 # Revision 1.47  2003/07/16 21:53:08  jalet 
    379 # Really big modifications wrt new configuration file's location and content. 
    380 # 
    381 # Revision 1.46  2003/07/09 20:17:07  jalet 
    382 # Email field added to PostgreSQL schema 
    383 # 
    384 # Revision 1.45  2003/07/08 19:43:51  jalet 
    385 # Configurable warning messages. 
    386 # Poor man's treshold value added. 
    387 # 
    388 # Revision 1.44  2003/07/07 11:49:24  jalet 
    389 # Lots of small fixes with the help of PyChecker 
    390 # 
    391 # Revision 1.43  2003/07/04 09:06:32  jalet 
    392 # Small bug fix wrt undefined "LimitBy" field. 
    393 # 
    394 # Revision 1.42  2003/06/30 12:46:15  jalet 
    395 # Extracted reporting code. 
    396 # 
    397 # Revision 1.41  2003/06/25 14:10:01  jalet 
    398 # Hey, it may work (edpykota --reset excepted) ! 
    399 # 
    400 # Revision 1.40  2003/06/10 16:37:54  jalet 
    401 # Deletion of the second user which is not needed anymore. 
    402 # Added a debug configuration field in /etc/pykota.conf 
    403 # All queries can now be sent to the logger in debug mode, this will 
    404 # greatly help improve performance when time for this will come. 
    405 # 
    406 # Revision 1.39  2003/04/29 18:37:54  jalet 
    407 # Pluggable accounting methods (actually doesn't support external scripts) 
    408 # 
    409 # Revision 1.38  2003/04/24 11:53:48  jalet 
    410 # Default policy for unknown users/groups is to DENY printing instead 
    411 # of the previous default to ALLOW printing. This is to solve an accuracy 
    412 # problem. If you set the policy to ALLOW, jobs printed by in nexistant user 
    413 # (from PyKota's POV) will be charged to the next user who prints on the 
    414 # same printer. 
    415 # 
    416 # Revision 1.37  2003/04/24 08:08:27  jalet 
    417 # Debug message forgotten 
    418 # 
    419 # Revision 1.36  2003/04/24 07:59:40  jalet 
    420 # LPRng support now works ! 
    421 # 
    422 # Revision 1.35  2003/04/23 22:13:57  jalet 
    423 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    424 # 
    425 # Revision 1.34  2003/04/17 09:26:21  jalet 
    426 # repykota now reports account balances too. 
    427 # 
    428 # Revision 1.33  2003/04/16 12:35:49  jalet 
    429 # Groups quota work now ! 
    430 # 
    431 # Revision 1.32  2003/04/16 08:53:14  jalet 
    432 # Printing can now be limited either by user's account balance or by 
    433 # page quota (the default). Quota report doesn't include account balance 
    434 # yet, though. 
    435 # 
    436 # Revision 1.31  2003/04/15 11:30:57  jalet 
    437 # More work done on money print charging. 
    438 # Minor bugs corrected. 
    439 # All tools now access to the storage as priviledged users, repykota excepted. 
    440 # 
    441 # Revision 1.30  2003/04/10 21:47:20  jalet 
    442 # Job history added. Upgrade script neutralized for now ! 
    443 # 
    444 # Revision 1.29  2003/03/29 13:45:27  jalet 
    445 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    446 # Two README files were added. 
    447 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    448 # 
    449 # Revision 1.28  2003/03/29 13:08:28  jalet 
    450 # Configuration is now expected to be found in /etc/pykota.conf instead of 
    451 # in /etc/cups/pykota.conf 
    452 # Installation script can move old config files to the new location if needed. 
    453 # Better error handling if configuration file is absent. 
    454 # 
    455 # Revision 1.27  2003/03/15 23:01:28  jalet 
    456 # New mailto option in configuration file added. 
    457 # No time to test this tonight (although it should work). 
    458 # 
    459 # Revision 1.26  2003/03/09 23:58:16  jalet 
    460 # Comment 
    461 # 
    462 # Revision 1.25  2003/03/07 22:56:14  jalet 
    463 # 0.99 is out with some bug fixes. 
    464 # 
    465 # Revision 1.24  2003/02/27 23:48:41  jalet 
    466 # Correctly maps PyKota's log levels to syslog log levels 
    467 # 
    468 # Revision 1.23  2003/02/27 22:55:20  jalet 
    469 # WARN log priority doesn't exist. 
    470 # 
    471 # Revision 1.22  2003/02/27 09:09:20  jalet 
    472 # Added a method to match strings against wildcard patterns 
    473 # 
    474 # Revision 1.21  2003/02/17 23:01:56  jalet 
    475 # Typos 
    476 # 
    477 # Revision 1.20  2003/02/17 22:55:01  jalet 
    478 # More options can now be set per printer or globally : 
    479 # 
    480 #       admin 
    481 #       adminmail 
    482 #       gracedelay 
    483 #       requester 
    484 # 
    485 # the printer option has priority when both are defined. 
    486 # 
    487 # Revision 1.19  2003/02/10 11:28:45  jalet 
    488 # Localization 
    489 # 
    490 # Revision 1.18  2003/02/10 01:02:17  jalet 
    491 # External requester is about to work, but I must sleep 
    492 # 
    493 # Revision 1.17  2003/02/09 13:05:43  jalet 
    494 # Internationalization continues... 
    495 # 
    496 # Revision 1.16  2003/02/09 12:56:53  jalet 
    497 # Internationalization begins... 
    498 # 
    499 # Revision 1.15  2003/02/08 22:09:52  jalet 
    500 # Name check method moved here 
    501 # 
    502 # Revision 1.14  2003/02/07 10:42:45  jalet 
    503 # Indentation problem 
    504 # 
    505 # Revision 1.13  2003/02/07 08:34:16  jalet 
    506 # Test wrt date limit was wrong 
    507 # 
    508 # Revision 1.12  2003/02/06 23:20:02  jalet 
    509 # warnpykota doesn't need any user/group name argument, mimicing the 
    510 # warnquota disk quota tool. 
    511 # 
    512 # Revision 1.11  2003/02/06 22:54:33  jalet 
    513 # warnpykota should be ok 
    514 # 
    515 # Revision 1.10  2003/02/06 15:03:11  jalet 
    516 # added a method to set the limit date 
    517 # 
    518 # Revision 1.9  2003/02/06 10:39:23  jalet 
    519 # Preliminary edpykota work. 
    520 # 
    521 # Revision 1.8  2003/02/06 09:19:02  jalet 
    522 # More robust behavior (hopefully) when the user or printer is not managed 
    523 # correctly by the Quota System : e.g. cupsFilter added in ppd file, but 
    524 # printer and/or user not 'yet?' in storage. 
    525 # 
    526 # Revision 1.7  2003/02/06 00:00:45  jalet 
    527 # Now includes the printer name in email messages 
    528 # 
    529 # Revision 1.6  2003/02/05 23:55:02  jalet 
    530 # Cleaner email messages 
    531 # 
    532 # Revision 1.5  2003/02/05 23:45:09  jalet 
    533 # Better DateTime manipulation wrt grace delay 
    534 # 
    535 # Revision 1.4  2003/02/05 23:26:22  jalet 
    536 # Incorrect handling of grace delay 
    537 # 
    538 # Revision 1.3  2003/02/05 22:16:20  jalet 
    539 # DEVICE_URI is undefined outside of CUPS, i.e. for normal command line tools 
    540 # 
    541 # Revision 1.2  2003/02/05 22:10:29  jalet 
    542 # Typos 
    543 # 
    544 # Revision 1.1  2003/02/05 21:28:17  jalet 
    545 # Initial import into CVS 
    546 # 
    54722# 
    54823#