Changeset 2147

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

Removed all references to $Log$

Location:
pykota/trunk
Files:
59 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/autopykota

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.9  2005/01/17 08:44:23  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.8  2004/10/21 22:21:21  jalet 
    30 # Fixes a string interpolation problem 
    31 # 
    32 # Revision 1.7  2004/10/13 08:09:19  jalet 
    33 # More complete PATH. 
    34 # pkhint doesn't use absolute path to search for helper commands anymore. 
    35 # 
    36 # Revision 1.6  2004/10/11 22:53:05  jalet 
    37 # Postponed string interpolation to help message's output method 
    38 # 
    39 # Revision 1.5  2004/10/11 22:08:06  jalet 
    40 # Incorrect doc for autopykota 
    41 # 
    42 # Revision 1.4  2004/10/11 12:49:05  jalet 
    43 # Renders help translatable 
    44 # 
    45 # Revision 1.3  2004/10/06 07:51:07  jalet 
    46 # Now autopykota uses 0.0 as the default value for initial account balance 
    47 # if the --initbalance command line option is not used. 
    48 # 
    49 # Revision 1.2  2004/09/30 11:22:30  jalet 
    50 # Extends the PATH and doesn't use absolute path anymore to launch edpykota. 
    51 # 
    52 # Revision 1.1  2004/09/30 09:52:45  jalet 
    53 # Initial release of autopykota. Reading help or manpage is greatly 
    54 # encouraged ! 
    55 # 
    5624# 
    5725# 
  • pykota/trunk/bin/cupspykota

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.89  2005/02/16 00:29:33  jalet 
    27 # Fixed the maxdenybanners directive. 
    28 # Introduced the denyduplicates directive. 
    29 # Fixed some database related glitches. 
    30 # 
    31 # Revision 1.88  2005/02/14 23:39:50  jalet 
    32 # Introduces the new 'trustjobsize' directive to workaround some printers 
    33 # generating unstable internal page counter values when queried through SNMP. 
    34 # 
    35 # Revision 1.87  2005/02/14 22:53:44  jalet 
    36 # Now always precomputes the job's size with the internal PDL parser, and not 
    37 # only when 'enforcement: strict' was set in pykota.conf 
    38 # 
    39 # Revision 1.86  2005/02/13 22:48:37  jalet 
    40 # Added the md5sum to the history 
    41 # 
    42 # Revision 1.85  2005/02/13 22:02:28  jalet 
    43 # Big database structure changes. Upgrade script is now included as well as 
    44 # the new LDAP schema. 
    45 # Introduction of the -o | --overcharge command line option to edpykota. 
    46 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    47 # Introduction of the new 'maxdenybanners' directive. 
    48 # 
    49 # Revision 1.84  2005/01/17 08:44:23  jalet 
    50 # Modified copyright years 
    51 # 
    52 # Revision 1.83  2005/01/06 23:23:35  jalet 
    53 # Regain priviledge the time to read the job control file to extract the client 
    54 # hostname 
    55 # 
    56 # Revision 1.82  2005/01/06 22:52:53  jalet 
    57 # Implemented the dropping of priviledges. Beware, beware... 
    58 # 
    59 # Revision 1.81  2004/12/07 16:54:02  jalet 
    60 # Now logs as errors differences between computed and precomputed job's sizes 
    61 # 
    62 # Revision 1.80  2004/11/15 22:12:46  jalet 
    63 # Fix for the Fix !!! 
    64 # 
    65 # Revision 1.79  2004/11/15 22:01:34  jalet 
    66 # Improved banner handling. 
    67 # Fix for raw printing and banners. 
    68 # 
    69 # Revision 1.78  2004/11/15 19:59:34  jalet 
    70 # PyKota banners now basically work ! 
    71 # 
    72 # Revision 1.77  2004/11/06 22:40:57  jalet 
    73 # Safer code 
    74 # 
    75 # Revision 1.76  2004/11/06 22:35:58  jalet 
    76 # Added a miniparser for IPP messages (RFC 2910). The job-originating-host-name 
    77 # retrieval is now fiable, unless the CUPS developpers change something... 
    78 # 
    79 # Revision 1.75  2004/11/01 15:45:25  jalet 
    80 # Added many debug messages. 
    81 # Added some code to prevent short writes. 
    82 # 
    83 # Revision 1.74  2004/10/13 20:51:27  jalet 
    84 # Made debugging levels be the same in cupspykota and lprngpykota. 
    85 # Now outputs more information in informational messages : user, printer, jobid 
    86 # 
    87 # Revision 1.73  2004/10/13 16:56:45  jalet 
    88 # Added a space to the pattern to differentiate jobs which id begins with 
    89 # the same digits, like jobs 87 and 879 for example : if printed by same 
    90 # user on same printer, but from a different host this could have broken 
    91 # the result. (In reality this couldn't happen because 879 would be the 
    92 # last line to match anyway because of job ordering, but we never know 
    93 # if the page_log file gets corrupt somewhat) 
    94 # 
    95 # Revision 1.72  2004/09/13 16:02:44  jalet 
    96 # Added fix for incorrect job's size when hardware accounting fails 
    97 # 
    98 # Revision 1.71  2004/09/06 17:05:06  jalet 
    99 # Fix for autodetection of SC_OPEN_MAX 
    100 # 
    101 # Revision 1.70  2004/07/26 09:20:27  jalet 
    102 # Unneeded module 
    103 # 
    104 # Revision 1.69  2004/07/22 22:41:47  jalet 
    105 # Hardware accounting for LPRng should be OK now. UNTESTED. 
    106 # 
    107 # Revision 1.68  2004/07/20 22:19:44  jalet 
    108 # Sanitized a bit + use of gettext 
    109 # 
    110 # Revision 1.67  2004/07/16 12:22:45  jalet 
    111 # LPRng support early version 
    112 # 
    113 # Revision 1.66  2004/07/01 19:56:25  jalet 
    114 # Better dispatching of error messages 
    115 # 
    116 # Revision 1.65  2004/06/22 09:31:17  jalet 
    117 # Always send some debug info to CUPS' back channel stream (stderr) as 
    118 # informationnal messages. 
    119 # 
    120 # Revision 1.64  2004/06/18 13:34:46  jalet 
    121 # Now all tracebacks include PyKota's version number 
    122 # 
    123 # Revision 1.63  2004/06/17 13:26:50  jalet 
    124 # Better exception handling code 
    125 # 
    126 # Revision 1.62  2004/06/16 20:56:34  jalet 
    127 # Smarter initialisation code 
    128 # 
    129 # Revision 1.61  2004/06/08 09:00:04  jalet 
    130 # Fixed problem when username was passed in uppercase from Samba and we 
    131 # tried to find correct line in CUPS page_log to extract the hostname. 
    132 # 
    133 # Revision 1.60  2004/06/03 23:14:08  jalet 
    134 # Now stores the job's size in bytes in the database. 
    135 # Preliminary work on payments storage : database schemas are OK now, 
    136 # but no code to store payments yet. 
    137 # Removed schema picture, not relevant anymore. 
    138 # 
    139 # Revision 1.59  2004/06/03 22:12:53  jalet 
    140 # Now denies empty jobs 
    141 # 
    142 # Revision 1.58  2004/06/03 21:50:33  jalet 
    143 # Improved error logging. 
    144 # crashrecipient directive added. 
    145 # Now exports the job's size in bytes too. 
    146 # 
    147 # Revision 1.57  2004/06/02 22:18:07  jalet 
    148 # I think the bug when cancelling jobs should be fixed right now 
    149 # 
    150 # Revision 1.56  2004/06/02 21:50:56  jalet 
    151 # Moved the sigterm capturing elsewhere 
    152 # 
    153 # Revision 1.55  2004/06/02 14:25:07  jalet 
    154 # Should correctly capture ALL errors now 
    155 # 
    156 # Revision 1.54  2004/05/26 16:44:48  jalet 
    157 # Now logs something when client hostname can't be extracted 
    158 # 
    159 # Revision 1.53  2004/05/26 14:49:35  jalet 
    160 # First try at saving the job-originating-hostname in the database 
    161 # 
    162 # Revision 1.52  2004/05/25 09:15:13  jalet 
    163 # accounter.py : old code deleted 
    164 # the rest : now exports PYKOTAPRECOMPUTEDJOBSIZE and PYKOTAPRECOMPUTEDJOBPRICE 
    165 # 
    166 # Revision 1.51  2004/05/25 08:31:16  jalet 
    167 # Heavy CPU usage seems to be fixed at least ! 
    168 # 
    169 # Revision 1.50  2004/05/25 05:17:50  jalet 
    170 # Now precomputes the job's size only if current printer's enforcement 
    171 # is "STRICT" 
    172 # 
    173 # Revision 1.49  2004/05/24 22:45:48  jalet 
    174 # New 'enforcement' directive added 
    175 # Polling loop improvements 
    176 # 
    177 # Revision 1.48  2004/05/24 14:36:24  jalet 
    178 # Revert to old polling loop. Will need optimisations 
    179 # 
    180 # Revision 1.47  2004/05/24 11:59:46  jalet 
    181 # More robust (?) code 
    182 # 
    183 # Revision 1.46  2004/05/21 22:02:51  jalet 
    184 # Preliminary work on pre-accounting 
    185 # 
    186 # Revision 1.45  2004/05/19 07:15:32  jalet 
    187 # Could the 'misterious' bug in my loop be finally fixed ??? 
    188 # 
    189 # Revision 1.44  2004/05/18 14:48:47  jalet 
    190 # Big code changes to completely remove the need for "requester" directives, 
    191 # jsut use "hardware(... your previous requester directive's content ...)" 
    192 # 
    193 # Revision 1.43  2004/05/17 11:46:05  jalet 
    194 # First try at cupspykota's main loop rewrite 
    195 # 
    196 # Revision 1.42  2004/05/10 11:22:28  jalet 
    197 # Typo 
    198 # 
    199 # Revision 1.41  2004/05/10 10:07:30  jalet 
    200 # Catches OSError while reading 
    201 # 
    202 # Revision 1.40  2004/05/10 09:29:48  jalet 
    203 # Should be more robust if we receive a SIGTERM during an I/O operation 
    204 # 
    205 # Revision 1.39  2004/05/07 14:44:53  jalet 
    206 # Fix for file handles unregistered twice from the polling object 
    207 # 
    208 # Revision 1.38  2004/04/09 22:24:46  jalet 
    209 # Began work on correct handling of child processes when jobs are cancelled by 
    210 # the user. Especially important when an external requester is running for a 
    211 # long time. 
    212 # 
    213 # Revision 1.37  2004/03/18 19:11:25  jalet 
    214 # Fix for raw jobs in cupspykota 
    215 # 
    216 # Revision 1.36  2004/03/18 14:03:18  jalet 
    217 # Added fsync() calls 
    218 # 
    219 # Revision 1.35  2004/03/16 12:05:01  jalet 
    220 # Small fix for new waitprinter.sh : when job was denied, would wait forever 
    221 # for printer being in printing mode. 
    222 # 
    223 # Revision 1.34  2004/03/15 10:47:56  jalet 
    224 # This time the traceback formatting should be correct ! 
    225 # 
    226 # Revision 1.33  2004/03/05 12:46:07  jalet 
    227 # Improve tracebacks 
    228 # 
    229 # Revision 1.32  2004/03/05 12:31:35  jalet 
    230 # Now should output full traceback when crashing 
    231 # 
    232 # Revision 1.31  2004/03/01 14:35:56  jalet 
    233 # PYKOTAPHASE wasn't set soon enough at the start of the job 
    234 # 
    235 # Revision 1.30  2004/03/01 14:34:15  jalet 
    236 # PYKOTAPHASE wasn't set at the right time at the end of data transmission 
    237 # to underlying layer (real backend) 
    238 # 
    239 # Revision 1.29  2004/03/01 11:23:25  jalet 
    240 # Pre and Post hooks to external commands are available in the cupspykota 
    241 # backend. Forthe pykota filter they will be implemented real soon now. 
    242 # 
    243 # Revision 1.28  2004/02/26 14:18:07  jalet 
    244 # Should fix the remaining bugs wrt printers groups and users groups. 
    245 # 
    246 # Revision 1.27  2004/02/04 23:41:27  jalet 
    247 # Should fix the incorrect "backend died abnormally" problem. 
    248 # 
    249 # Revision 1.26  2004/01/30 16:35:03  jalet 
    250 # Fixes stupid software accounting bug in CUPS backend 
    251 # 
    252 # Revision 1.25  2004/01/16 17:51:46  jalet 
    253 # Fuck Fuck Fuck !!! 
    254 # 
    255 # Revision 1.24  2004/01/14 15:52:01  jalet 
    256 # Small fix for job cancelling code. 
    257 # 
    258 # Revision 1.23  2004/01/13 10:48:28  jalet 
    259 # Small streams polling loop modification. 
    260 # 
    261 # Revision 1.22  2004/01/12 22:43:40  jalet 
    262 # New formula to compute a job's price 
    263 # 
    264 # Revision 1.21  2004/01/12 18:17:36  jalet 
    265 # Denied jobs weren't stored into the history anymore, this is now fixed. 
    266 # 
    267 # Revision 1.20  2004/01/11 23:22:42  jalet 
    268 # Major code refactoring, it's way cleaner, and now allows automated addition 
    269 # of printers on first print. 
    270 # 
    271 # Revision 1.19  2004/01/08 14:10:32  jalet 
    272 # Copyright year changed. 
    273 # 
    274 # Revision 1.18  2004/01/07 16:16:32  jalet 
    275 # Better debugging information 
    276 # 
    277 # Revision 1.17  2003/12/27 16:49:25  uid67467 
    278 # Should be ok now. 
    279 # 
    280 # Revision 1.17  2003/12/06 08:54:29  jalet 
    281 # Code simplifications. 
    282 # Added many debugging messages. 
    283 # 
    284 # Revision 1.16  2003/11/26 20:43:29  jalet 
    285 # Inadvertantly introduced a bug, which is fixed. 
    286 # 
    287 # Revision 1.15  2003/11/26 19:17:35  jalet 
    288 # Printing on a printer not present in the Quota Storage now results 
    289 # in the job being stopped or cancelled depending on the system. 
    290 # 
    291 # Revision 1.14  2003/11/25 13:25:45  jalet 
    292 # Boolean problem with old Python, replaced with 0 
    293 # 
    294 # Revision 1.13  2003/11/23 19:01:35  jalet 
    295 # Job price added to history 
    296 # 
    297 # Revision 1.12  2003/11/21 14:28:43  jalet 
    298 # More complete job history. 
    299 # 
    300 # Revision 1.11  2003/11/19 23:19:35  jalet 
    301 # Code refactoring work. 
    302 # Explicit redirection to /dev/null has to be set in external policy now, just 
    303 # like in external mailto. 
    304 # 
    305 # Revision 1.10  2003/11/18 17:54:24  jalet 
    306 # SIGTERMs are now transmitted to original backends. 
    307 # 
    308 # Revision 1.9  2003/11/18 14:11:07  jalet 
    309 # Small fix for bizarre urls 
    310 # 
    311 # Revision 1.8  2003/11/15 14:26:44  jalet 
    312 # General improvements to the documentation. 
    313 # Email address changed in sample configuration file, because 
    314 # I receive low quota messages almost every day... 
    315 # 
    316 # Revision 1.7  2003/11/14 22:05:12  jalet 
    317 # New CUPS backend fully functionnal. 
    318 # Old CUPS configuration method is now officially deprecated. 
    319 # 
    320 # Revision 1.6  2003/11/14 20:13:11  jalet 
    321 # We exit the loop too soon. 
    322 # 
    323 # Revision 1.5  2003/11/14 18:31:27  jalet 
    324 # Not perfect, but seems to work with the poll() loop. 
    325 # 
    326 # Revision 1.4  2003/11/14 17:04:15  jalet 
    327 # More (untested) work on the CUPS backend. 
    328 # 
    329 # Revision 1.3  2003/11/12 23:27:44  jalet 
    330 # More work on new backend. This commit may be unstable. 
    331 # 
    332 # Revision 1.2  2003/11/12 09:33:34  jalet 
    333 # New CUPS backend supports device enumeration 
    334 # 
    335 # Revision 1.1  2003/11/08 16:05:31  jalet 
    336 # CUPS backend added for people to experiment. 
    337 # 
    33824# 
    33925# 
  • pykota/trunk/bin/dumpykota

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.22  2005/01/17 08:44:23  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.21  2005/01/08 17:03:06  jalet 
    30 # "--format cups" output more resembling CUPS' page_log. 
    31 # Split into a command line tool and a module, to allow easier coding of 
    32 # a CGI interface. 
    33 # 
    34 # Revision 1.20  2005/01/08 11:25:48  jalet 
    35 # Fixed the time zone field in page_log output to make PrintAnalyzer happy 
    36 # 
    37 # Revision 1.19  2005/01/08 10:52:01  jalet 
    38 # Now dumpykota can dump the history into CUPS' page_log format, allowing the 
    39 # use of tools like PrintAnalyzer or phpPrintAnalyzer along with PyKota 
    40 # 
    41 # Revision 1.18  2005/01/07 12:40:53  jalet 
    42 # Fixed field type's name in XML dumps. 
    43 # 
    44 # Revision 1.17  2004/12/21 15:50:00  jalet 
    45 # The dumpykota command now supports extended filtering capabilities with 
    46 # the PostgreSQL backend. LDAP doesn't yet support such possibilities. 
    47 # 
    48 # Revision 1.16  2004/12/21 14:45:31  jalet 
    49 # Prepared dumpykota to accept the new --filter command line option. Some 
    50 # additionnal work needs to be done in the backends though. 
    51 # 
    52 # Revision 1.15  2004/10/12 15:37:00  jalet 
    53 # Now outputs the name of the offending user if a mere mortal tries to use 
    54 # one of these commands !!! 
    55 # 
    56 # Revision 1.14  2004/10/11 22:53:05  jalet 
    57 # Postponed string interpolation to help message's output method 
    58 # 
    59 # Revision 1.13  2004/10/11 12:49:06  jalet 
    60 # Renders help translatable 
    61 # 
    62 # Revision 1.12  2004/10/07 21:14:28  jalet 
    63 # Hopefully final fix for data encoding to and from the database 
    64 # 
    65 # Revision 1.11  2004/10/07 14:35:40  jalet 
    66 # Now edpykota refuses to launch if the user is not a PyKota administrator. 
    67 # dumpykota : now has the same error message than edpykota in this case. 
    68 # 
    69 # Revision 1.10  2004/10/06 10:05:47  jalet 
    70 # Minor changes to allow any PyKota administrator to launch enhanced versions 
    71 # of the commands, and not only the root user. 
    72 # 
    73 # Revision 1.9  2004/10/05 20:08:46  jalet 
    74 # Misleading help message. Thx to Johannes Laemmermann. 
    75 # 
    76 # Revision 1.8  2004/10/05 09:59:19  jalet 
    77 # Restore compatibility with Python 2.1 
    78 # 
    79 # Revision 1.7  2004/10/04 21:25:29  jalet 
    80 # dumpykota can now output datas in the XML format 
    81 # 
    82 # Revision 1.6  2004/09/15 18:28:41  jalet 
    83 # Updated help for dumpykota 
    84 # 
    85 # Revision 1.5  2004/09/15 07:38:05  jalet 
    86 # Fix for uninitialized variable 
    87 # 
    88 # Revision 1.4  2004/09/15 07:26:19  jalet 
    89 # Data dumps are now ordered by entry creation date if applicable. 
    90 # Now dumpykota exits with a message when there's a broken pipe like 
    91 # in dumpykota --data history | head -3 
    92 # 
    93 # Revision 1.3  2004/09/15 06:58:25  jalet 
    94 # User groups membership and printer groups membership can now be dumped too 
    95 # 
    96 # Revision 1.2  2004/09/14 22:29:12  jalet 
    97 # First version of dumpykota. Works fine but only with PostgreSQL backend 
    98 # for now. 
    99 # 
    100 # Revision 1.1  2004/07/01 19:22:37  jalet 
    101 # First draft of dumpykota 
    102 # 
    10324# 
    10425# 
  • pykota/trunk/bin/edpykota

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.88  2005/02/19 17:47:19  jalet 
    27 # Fixed the --prototype command line option to edpykota 
    28 # 
    29 # Revision 1.87  2005/02/13 22:02:28  jalet 
    30 # Big database structure changes. Upgrade script is now included as well as 
    31 # the new LDAP schema. 
    32 # Introduction of the -o | --overcharge command line option to edpykota. 
    33 # The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    34 # Introduction of the new 'maxdenybanners' directive. 
    35 # 
    36 # Revision 1.86  2005/01/21 14:40:01  jalet 
    37 # edpykota's --delete command line tool doesn't use "*" as its default argument 
    38 # anymore when the user doesn't pass any real argument :-) 
    39 # 
    40 # Revision 1.85  2005/01/18 19:47:49  jalet 
    41 # Big bug fix wrt the datelimit attribute 
    42 # 
    43 # Revision 1.84  2005/01/17 08:44:23  jalet 
    44 # Modified copyright years 
    45 # 
    46 # Revision 1.83  2004/12/02 21:24:50  jalet 
    47 # Integrated the patch by Wilson Roberto Afonso and Matt Hyclak to allow 
    48 # edpykota to accept the -U | --used value command line option. 
    49 # 
    50 # Revision 1.82  2004/11/22 21:53:38  jalet 
    51 # Added the reject_unknown directive to pykota.conf to reject user/group 
    52 # creation if user or group is unknown to the system 
    53 # 
    54 # Revision 1.81  2004/10/12 15:37:00  jalet 
    55 # Now outputs the name of the offending user if a mere mortal tries to use 
    56 # one of these commands !!! 
    57 # 
    58 # Revision 1.80  2004/10/11 22:53:05  jalet 
    59 # Postponed string interpolation to help message's output method 
    60 # 
    61 # Revision 1.79  2004/10/11 12:49:06  jalet 
    62 # Renders help translatable 
    63 # 
    64 # Revision 1.78  2004/10/07 14:35:40  jalet 
    65 # Now edpykota refuses to launch if the user is not a PyKota administrator. 
    66 # dumpykota : now has the same error message than edpykota in this case. 
    67 # 
    68 # Revision 1.77  2004/09/28 17:45:31  jalet 
    69 # Added the --hardreset command line option to edpykota 
    70 # 
    71 # Revision 1.76  2004/07/01 19:56:40  jalet 
    72 # Better dispatching of error messages 
    73 # 
    74 # Revision 1.75  2004/06/18 13:34:47  jalet 
    75 # Now all tracebacks include PyKota's version number 
    76 # 
    77 # Revision 1.74  2004/06/07 18:43:40  jalet 
    78 # Fixed over-verbose exits when displaying help or version number 
    79 # 
    80 # Revision 1.73  2004/06/03 21:50:34  jalet 
    81 # Improved error logging. 
    82 # crashrecipient directive added. 
    83 # Now exports the job's size in bytes too. 
    84 # 
    85 # Revision 1.72  2004/04/16 16:20:19  jalet 
    86 # Note about not implemented limitby values 
    87 # 
    88 # Revision 1.71  2004/03/24 15:15:24  jalet 
    89 # Began integration of Henrik Janhagen's work on quota-then-balance 
    90 # and balance-then-quota 
    91 # 
    92 # Revision 1.70  2004/02/27 09:23:21  jalet 
    93 # Minor code reorganisation 
    94 # 
    95 # Revision 1.69  2004/02/19 15:05:56  jalet 
    96 # domain names changed to example.com in the doc, according to RFC2606 
    97 # 
    98 # Revision 1.68  2004/01/28 10:05:22  jalet 
    99 # New user/group deletion code 
    100 # 
    101 # Revision 1.67  2004/01/15 11:19:07  jalet 
    102 # Typos in messages wrt gettext. 
    103 # 
    104 # Revision 1.66  2004/01/12 21:54:36  jalet 
    105 # User's email address can now be set at user's creation time. 
    106 # 
    107 # Revision 1.65  2004/01/08 16:24:49  jalet 
    108 # edpykota now supports adding printers to printer groups. 
    109 # 
    110 # Revision 1.64  2004/01/08 14:10:32  jalet 
    111 # Copyright year changed. 
    112 # 
    113 # Revision 1.63  2003/11/24 16:50:58  jalet 
    114 # Old help message deletedd 
    115 # 
    116 # Revision 1.62  2003/11/12 23:28:38  jalet 
    117 # More work on new backend. This commit may be unstable. 
    118 # 
    119 # Revision 1.61  2003/11/12 13:06:35  jalet 
    120 # Bug fix wrt no user/group name command line argument to edpykota 
    121 # 
    122 # Revision 1.60  2003/10/09 21:25:24  jalet 
    123 # Multiple printer names or wildcards can be passed on the command line 
    124 # separated with commas. 
    125 # Beta phase. 
    126 # 
    127 # Revision 1.59  2003/10/07 09:07:27  jalet 
    128 # Character encoding added to please latest version of Python 
    129 # 
    130 # Revision 1.58  2003/10/03 12:27:01  jalet 
    131 # Several optimizations, especially with LDAP backend 
    132 # 
    133 # Revision 1.57  2003/08/20 16:01:19  jalet 
    134 # Comment added. 
    135 # 
    136 # Revision 1.56  2003/07/29 20:55:17  jalet 
    137 # 1.14 is out ! 
    138 # 
    139 # Revision 1.55  2003/07/28 09:11:12  jalet 
    140 # PyKota now tries to add its attributes intelligently in existing LDAP 
    141 # directories. 
    142 # 
    143 # Revision 1.54  2003/07/21 06:32:42  jalet 
    144 # Prevents email messages to be sent at modification/creation time for 
    145 # a user/group quota 
    146 # 
    147 # Revision 1.53  2003/07/09 06:03:41  jalet 
    148 # Fixed typo when using edpykota --prototype 
    149 # 
    150 # Revision 1.52  2003/07/07 12:11:13  jalet 
    151 # Small fix 
    152 # 
    153 # Revision 1.51  2003/07/07 11:55:50  jalet 
    154 # Small fix 
    155 # 
    156 # Revision 1.50  2003/07/05 12:33:53  jalet 
    157 # More on previous fix. 
    158 # 
    159 # Revision 1.49  2003/07/05 12:32:07  jalet 
    160 # Ensure that the user don't pass more than two prices for a printer. 
    161 # 
    162 # Revision 1.48  2003/06/25 19:52:30  jalet 
    163 # Should be ready for testing :-) 
    164 # 
    165 # Revision 1.47  2003/06/25 14:10:01  jalet 
    166 # Hey, it may work (edpykota --reset excepted) ! 
    167 # 
    168 # Revision 1.46  2003/06/16 11:59:09  jalet 
    169 # More work on LDAP 
    170 # 
    171 # Revision 1.45  2003/06/11 19:32:00  jalet 
    172 # Severe bug wrt account balance setting should be corrected. 
    173 # 
    174 # Revision 1.44  2003/04/29 22:03:38  jalet 
    175 # Better error handling. 
    176 # 
    177 # Revision 1.43  2003/04/23 22:13:56  jalet 
    178 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    179 # 
    180 # Revision 1.42  2003/04/17 13:38:47  jalet 
    181 # Docstring corrected for better manual page 
    182 # 
    183 # Revision 1.41  2003/04/16 12:35:49  jalet 
    184 # Groups quota work now ! 
    185 # 
    186 # Revision 1.40  2003/04/16 08:22:09  jalet 
    187 # More strict error detection. 
    188 # Minor code rewrite to avoid some repetitive tests. 
    189 # 
    190 # Revision 1.39  2003/04/16 08:01:53  jalet 
    191 # edpykota --charge command line option works now. 
    192 # 
    193 # Revision 1.38  2003/04/15 22:02:43  jalet 
    194 # More complete docstring 
    195 # 
    196 # Revision 1.37  2003/04/15 21:58:33  jalet 
    197 # edpykota now accepts a --delete option. 
    198 # Preparation to allow edpykota to accept much more command line options 
    199 # (WARNING : docstring is OK, but code isn't !) 
    200 # 
    201 # Revision 1.36  2003/04/15 13:55:28  jalet 
    202 # Options --limitby and --balance added to edpykota 
    203 # 
    204 # Revision 1.35  2003/04/15 13:06:39  jalet 
    205 # Allow to add a printer without any user 
    206 # 
    207 # Revision 1.34  2003/04/11 16:51:11  jalet 
    208 # Bug fix for edpykota --add with users who already had a quota on the printer. 
    209 # 
    210 # Revision 1.33  2003/04/10 21:47:20  jalet 
    211 # Job history added. Upgrade script neutralized for now ! 
    212 # 
    213 # Revision 1.32  2003/04/08 21:31:39  jalet 
    214 # (anything or 0) = anything !!! Go back to school Jerome ! 
    215 # 
    216 # Revision 1.31  2003/04/08 21:13:44  jalet 
    217 # Prepare --groups option to work. 
    218 # 
    219 # Revision 1.30  2003/04/08 21:10:18  jalet 
    220 # Checks --groups option presence instead of --users because --users is the default. 
    221 # 
    222 # Revision 1.29  2003/04/05 09:28:56  jalet 
    223 # Unnecessary message was logged 
    224 # 
    225 # Revision 1.28  2003/03/29 13:45:26  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.27  2003/03/10 00:23:04  jalet 
    231 # Bad english 
    232 # 
    233 # Revision 1.26  2003/03/10 00:11:27  jalet 
    234 # Cleaner example. 
    235 # 
    236 # Revision 1.25  2003/03/09 23:56:21  jalet 
    237 # Option noquota added to do accounting only. 
    238 # 
    239 # Revision 1.24  2003/02/27 23:48:41  jalet 
    240 # Correctly maps PyKota's log levels to syslog log levels 
    241 # 
    242 # Revision 1.23  2003/02/27 22:55:20  jalet 
    243 # WARN log priority doesn't exist. 
    244 # 
    245 # Revision 1.22  2003/02/27 09:37:02  jalet 
    246 # Wildcards seem to work now 
    247 # 
    248 # Revision 1.21  2003/02/27 09:04:46  jalet 
    249 # user and group names can be passed as wildcards if the --add option 
    250 # is not set. The default is to act on all users or groups. 
    251 # 
    252 # Revision 1.20  2003/02/10 12:07:30  jalet 
    253 # Now repykota should output the recorded total page number for each printer too. 
    254 # 
    255 # Revision 1.19  2003/02/09 13:40:29  jalet 
    256 # typo 
    257 # 
    258 # Revision 1.18  2003/02/09 12:56:53  jalet 
    259 # Internationalization begins... 
    260 # 
    261 # Revision 1.17  2003/02/08 22:47:23  jalet 
    262 # Option --reset can now be used without having to use soft and hard limits 
    263 # on the command line. 
    264 # 
    265 # Revision 1.16  2003/02/08 22:39:46  jalet 
    266 # --reset command line option added 
    267 # 
    268 # Revision 1.15  2003/02/08 22:20:01  jalet 
    269 # Clarification on why we don't check with /etc/passwd to see if the user 
    270 # name is valid or not. 
    271 # 
    272 # Revision 1.14  2003/02/08 22:18:15  jalet 
    273 # Now checks user and group names for validity before adding them 
    274 # 
    275 # Revision 1.13  2003/02/08 22:09:02  jalet 
    276 # Only printer was added the first time. 
    277 # 
    278 # Revision 1.12  2003/02/08 21:44:49  jalet 
    279 # Python 2.1 string module doesn't define ascii_letters 
    280 # 
    281 # Revision 1.11  2003/02/08 09:42:44  jalet 
    282 # Better handle wrong or bad command line arguments 
    283 # 
    284 # Revision 1.10  2003/02/08 09:39:20  jalet 
    285 # typos 
    286 # 
    287 # Revision 1.9  2003/02/08 09:38:06  jalet 
    288 # Badly placed test 
    289 # 
    290 # Revision 1.8  2003/02/07 22:53:57  jalet 
    291 # Checks if printer name is valid before adding it 
    292 # 
    293 # Revision 1.7  2003/02/07 22:17:58  jalet 
    294 # Incomplete test 
    295 # 
    296 # Revision 1.6  2003/02/07 22:13:13  jalet 
    297 # Perhaps edpykota is now able to add printers !!! Oh, stupid me ! 
    298 # 
    299 # Revision 1.5  2003/02/06 14:49:04  jalet 
    300 # edpykota should be ok now 
    301 # 
    302 # Revision 1.4  2003/02/06 14:28:59  jalet 
    303 # edpykota should be ok, minus some typos 
    304 # 
    305 # Revision 1.3  2003/02/06 10:47:21  jalet 
    306 # Documentation string and command line options didn't match. 
    307 # 
    308 # Revision 1.2  2003/02/06 10:39:23  jalet 
    309 # Preliminary edpykota work. 
    310 # 
    311 # Revision 1.1  2003/02/05 21:41:09  jalet 
    312 # Skeletons added for all command line tools 
    313 # 
    31424# 
    31525# 
  • pykota/trunk/bin/lprngpykota

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.18  2005/03/02 17:00:03  jalet 
    27 # Fixed a bad copy&paste 
    28 # 
    29 # Revision 1.17  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.16  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.15  2005/02/14 22:53:44  jalet 
    39 # Now always precomputes the job's size with the internal PDL parser, and not 
    40 # only when 'enforcement: strict' was set in pykota.conf 
    41 # 
    42 # Revision 1.14  2005/02/13 22:48:37  jalet 
    43 # Added the md5sum to the history 
    44 # 
    45 # Revision 1.13  2005/01/17 08:44:23  jalet 
    46 # Modified copyright years 
    47 # 
    48 # Revision 1.12  2004/10/25 17:05:36  jalet 
    49 # Another fix for LPRng support debug messages : I'm sure I'm completely stupid now. 
    50 # 
    51 # Revision 1.11  2004/10/25 15:14:59  jalet 
    52 # Fixed typo in code added to debug LPRng problem 
    53 # 
    54 # Revision 1.10  2004/10/24 09:06:46  jalet 
    55 # Added debug messages for LPRng support possible problem ??? 
    56 # 
    57 # Revision 1.9  2004/10/19 21:37:57  jalet 
    58 # Fixes recently introduced bug 
    59 # 
    60 # Revision 1.8  2004/10/13 20:51:27  jalet 
    61 # Made debugging levels be the same in cupspykota and lprngpykota. 
    62 # Now outputs more information in informational messages : user, printer, jobid 
    63 # 
    64 # Revision 1.7  2004/09/13 16:02:44  jalet 
    65 # Added fix for incorrect job's size when hardware accounting fails 
    66 # 
    67 # Revision 1.6  2004/09/02 14:40:13  jalet 
    68 # Another bunch of LPRng fixes 
    69 # 
    70 # Revision 1.5  2004/07/23 11:19:48  jalet 
    71 # 1.19beta is out ! 
    72 # 
    73 # Revision 1.4  2004/07/22 22:41:48  jalet 
    74 # Hardware accounting for LPRng should be OK now. UNTESTED. 
    75 # 
    76 # Revision 1.3  2004/07/21 09:35:48  jalet 
    77 # Software accounting seems to be OK with LPRng support now 
    78 # 
    79 # Revision 1.2  2004/07/20 22:47:38  jalet 
    80 # Sanitizing 
    81 # 
    82 # Revision 1.1  2004/07/17 20:37:27  jalet 
    83 # Missing file... Am I really stupid ? 
    84 # 
    8524# 
    8625# 
  • pykota/trunk/bin/pkbanner

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.12  2005/01/17 08:44:23  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.11  2004/12/03 12:34:28  jalet 
    30 # Fixed the default value for the --savetoner command line option 
    31 # 
    32 # Revision 1.10  2004/11/17 13:28:19  jalet 
    33 # Fixed some typo in the help 
    34 # 
    35 # Revision 1.9  2004/11/17 13:24:05  jalet 
    36 # Improved pkbanner's help 
    37 # 
    38 # Revision 1.8  2004/11/17 13:12:04  jalet 
    39 # Implemented the --savetoner command line option 
    40 # 
    41 # Revision 1.7  2004/11/15 22:29:01  jalet 
    42 # Moved title and filename to the left to free some space. 
    43 # 
    44 # Revision 1.6  2004/11/15 22:20:27  jalet 
    45 # Now outputs strings as-is, and not title-ized 
    46 # 
    47 # Revision 1.5  2004/11/15 22:01:34  jalet 
    48 # Improved banner handling. 
    49 # Fix for raw printing and banners. 
    50 # 
    51 # Revision 1.4  2004/11/15 19:59:34  jalet 
    52 # PyKota banners now basically work ! 
    53 # 
    54 # Revision 1.3  2004/11/12 23:46:44  jalet 
    55 # Heavy work on pkbanner. Not finished yet though, but mostly works. 
    56 # 
    57 # Revision 1.2  2004/11/11 14:25:48  jalet 
    58 # Added some TODO comments 
    59 # 
    60 # Revision 1.1  2004/11/10 22:48:47  jalet 
    61 # Banner generator's skeleton added 
    62 # 
    6324# 
    6425# 
  • pykota/trunk/bin/pkhint

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.23  2005/02/22 17:18:18  jalet 
    27 # Simplified pkhint's output to take care of the software() accounter 
    28 # optimization and of the internal PJL accounter. 
    29 # 
    30 # Revision 1.22  2005/01/17 08:44:23  jalet 
    31 # Modified copyright years 
    32 # 
    33 # Revision 1.21  2004/10/13 08:26:06  jalet 
    34 # Doesn't suggest hardware(snmp) anymore if the command used was not snmpget. 
    35 # This caused problem when snmpwalk was successful but not snmpget for example 
    36 # 
    37 # Revision 1.20  2004/10/13 08:09:19  jalet 
    38 # More complete PATH. 
    39 # pkhint doesn't use absolute path to search for helper commands anymore. 
    40 # 
    41 # Revision 1.19  2004/10/11 22:53:05  jalet 
    42 # Postponed string interpolation to help message's output method 
    43 # 
    44 # Revision 1.18  2004/10/11 12:49:06  jalet 
    45 # Renders help translatable 
    46 # 
    47 # Revision 1.17  2004/09/23 19:29:36  jalet 
    48 # If SNMP accounting is possible, pkhint now suggests to use the internal 
    49 # SNMP handling instead of the external one. No real test is done for now, 
    50 # though. 
    51 # 
    52 # Revision 1.16  2004/07/27 21:50:29  jalet 
    53 # Small fix for %(port)s thanks to rpinheiro 
    54 # 
    55 # Revision 1.15  2004/07/20 22:19:45  jalet 
    56 # Sanitized a bit + use of gettext 
    57 # 
    58 # Revision 1.14  2004/07/01 19:56:40  jalet 
    59 # Better dispatching of error messages 
    60 # 
    61 # Revision 1.13  2004/06/29 07:55:18  jalet 
    62 # Doesn't output the warning message when --help or --version is asked 
    63 # 
    64 # Revision 1.12  2004/06/29 07:53:11  jalet 
    65 # Improved pkhint 
    66 # 
    67 # Revision 1.11  2004/06/18 13:34:48  jalet 
    68 # Now all tracebacks include PyKota's version number 
    69 # 
    70 # Revision 1.10  2004/06/07 18:43:40  jalet 
    71 # Fixed over-verbose exits when displaying help or version number 
    72 # 
    73 # Revision 1.9  2004/06/03 21:50:34  jalet 
    74 # Improved error logging. 
    75 # crashrecipient directive added. 
    76 # Now exports the job's size in bytes too. 
    77 # 
    78 # Revision 1.8  2004/05/18 14:48:47  jalet 
    79 # Big code changes to completely remove the need for "requester" directives, 
    80 # jsut use "hardware(... your previous requester directive's content ...)" 
    81 # 
    82 # Revision 1.7  2004/05/13 13:59:27  jalet 
    83 # Code simplifications 
    84 # 
    85 # Revision 1.6  2004/03/30 12:59:47  jalet 
    86 # Fixed path problem 
    87 # 
    88 # Revision 1.5  2004/02/09 13:07:06  jalet 
    89 # Should now be able to handle network + pjl printers 
    90 # 
    91 # Revision 1.4  2004/02/09 12:35:19  jalet 
    92 # De-uglyfication. 
    93 # Now works with older CUPS (1.14) which don't detect the cupspykota backend but accept it anyway. 
    94 # 
    95 # Revision 1.3  2004/02/07 13:56:03  jalet 
    96 # Help 
    97 # 
    98 # Revision 1.2  2004/02/07 13:47:55  jalet 
    99 # More warnings 
    100 # 
    101 # Revision 1.1  2004/02/07 13:45:51  jalet 
    102 # Preliminary work on the pkhint command 
    103 # 
    10424# 
    10525# 
  • pykota/trunk/bin/pkmail

    r2146 r2147  
    2323# $Id$ 
    2424# 
    25 # $Log$ 
    26 # Revision 1.4  2005/02/22 17:36:58  jalet 
    27 # Fixed the command's help 
    28 # 
    29 # Revision 1.3  2005/01/17 08:44:24  jalet 
    30 # Modified copyright years 
    31 # 
    32 # Revision 1.2  2004/11/21 22:16:11  jalet 
    33 # Added some kind of protection against bad guys 
    34 # 
    35 # Revision 1.1  2004/11/21 21:50:03  jalet 
    36 # Introduced the new pkmail command as a simple email gateway 
    3725# 
    3826 
  • pykota/trunk/bin/pkpgcounter

    r2146 r2147  
    2323# $Id$ 
    2424# 
    25 # $Log$ 
    26 # Revision 1.12  2005/01/17 08:44:24  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.11  2004/05/21 20:40:07  jalet 
    30 # All the code for pkpgcounter is now in pdlanalyzer.py 
    31 # 
    32 # Revision 1.10  2004/05/18 09:59:54  jalet 
    33 # pkpgcounter is now just a wrapper around the PDLAnalyzer class 
    34 # 
    35 # Revision 1.9  2004/05/10 07:23:21  jalet 
    36 # pykotme now uses pkpgcounter to compute the job's size. 
    37 # 
    38 # Revision 1.8  2004/05/08 15:12:23  jalet 
    39 # Improved PCL6 support 
    40 # 
    41 # Revision 1.7  2004/05/07 23:08:21  jalet 
    42 # Skeleton for PCLXL aka PCL6 
    43 # Added the "potential" fix for rastertoprinter's output 
    44 # 
    45 # Revision 1.6  2004/05/06 21:19:27  jalet 
    46 # Doesn't exit anymore on the first nul byte 
    47 # 
    48 # Revision 1.5  2004/05/06 12:37:29  jalet 
    49 # pkpgcounter : comments 
    50 # pkprinters : when --add is used, existing printers are now skipped. 
    51 # 
    52 # Revision 1.4  2004/05/04 12:21:55  jalet 
    53 # Now uses mmap in PCL mode 
    54 # 
    55 # Revision 1.3  2004/05/04 04:39:26  jalet 
    56 # Better PCL support 
    57 # 
    58 # Revision 1.2  2004/05/04 03:14:26  jalet 
    59 # fixed copy&paste problem in pkpgcounter 
    60 # 
    61 # Revision 1.1  2004/04/08 17:07:42  jalet 
    62 # pkpgcounter added 
    63 # 
    6425# 
    6526 
  • pykota/trunk/bin/pkprinters

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.19  2005/01/17 08:44:24  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.18  2004/10/20 12:32:51  jalet 
    30 # Fixed typo in help 
    31 # 
    32 # Revision 1.17  2004/10/13 21:40:10  jalet 
    33 # Now mandates that the user be a PyKota administrator to allow dangerous 
    34 # command line options. --list is still allowed to mere mortals though. 
    35 # 
    36 # Revision 1.16  2004/10/11 22:53:05  jalet 
    37 # Postponed string interpolation to help message's output method 
    38 # 
    39 # Revision 1.15  2004/10/11 12:49:06  jalet 
    40 # Renders help translatable 
    41 # 
    42 # Revision 1.14  2004/07/19 22:37:13  jalet 
    43 # pykosd is now a very good tool 
    44 # 
    45 # Revision 1.13  2004/07/01 19:56:41  jalet 
    46 # Better dispatching of error messages 
    47 # 
    48 # Revision 1.12  2004/07/01 17:45:47  jalet 
    49 # Added code to handle the description field for printers 
    50 # 
    51 # Revision 1.11  2004/06/18 13:34:48  jalet 
    52 # Now all tracebacks include PyKota's version number 
    53 # 
    54 # Revision 1.10  2004/06/07 18:43:40  jalet 
    55 # Fixed over-verbose exits when displaying help or version number 
    56 # 
    57 # Revision 1.9  2004/06/03 21:50:34  jalet 
    58 # Improved error logging. 
    59 # crashrecipient directive added. 
    60 # Now exports the job's size in bytes too. 
    61 # 
    62 # Revision 1.8  2004/05/06 20:30:24  jalet 
    63 # Added --skipexisting command line option to pkprinters 
    64 # 
    65 # Revision 1.7  2004/05/06 12:51:58  jalet 
    66 # Documentation 
    67 # 
    68 # Revision 1.6  2004/05/06 12:37:29  jalet 
    69 # pkpgcounter : comments 
    70 # pkprinters : when --add is used, existing printers are now skipped. 
    71 # 
    72 # Revision 1.5  2004/04/16 16:52:09  jalet 
    73 # Better formatting 
    74 # 
    75 # Revision 1.4  2004/04/16 16:47:57  jalet 
    76 # pkprinters now accept the --list command line option 
    77 # 
    78 # Revision 1.3  2004/02/04 13:24:41  jalet 
    79 # pkprinters can now remove printers from printers groups. 
    80 # 
    81 # Revision 1.2  2004/02/04 12:52:37  jalet 
    82 # pkprinters' help 
    83 # 
    84 # Revision 1.1  2004/02/04 11:16:59  jalet 
    85 # pkprinters command line tool added. 
    86 # 
    8724# 
    8825# 
  • pykota/trunk/bin/pykosd

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.12  2005/01/17 08:44:24  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.11  2004/10/17 19:41:54  jalet 
    30 # Fixed help message which displayed "pkprinters" instead of "pykosd" 
    31 # 
    32 # Revision 1.10  2004/10/11 22:53:05  jalet 
    33 # Postponed string interpolation to help message's output method 
    34 # 
    35 # Revision 1.9  2004/10/11 12:49:06  jalet 
    36 # Renders help translatable 
    37 # 
    38 # Revision 1.8  2004/10/06 10:05:47  jalet 
    39 # Minor changes to allow any PyKota administrator to launch enhanced versions 
    40 # of the commands, and not only the root user. 
    41 # 
    42 # Revision 1.7  2004/07/20 22:42:26  jalet 
    43 # pykosd now supports setting color 
    44 # 
    45 # Revision 1.6  2004/07/20 22:29:49  jalet 
    46 # pykosd now supports setting the font 
    47 # 
    48 # Revision 1.5  2004/07/20 22:19:45  jalet 
    49 # Sanitized a bit + use of gettext 
    50 # 
    51 # Revision 1.4  2004/07/19 22:37:13  jalet 
    52 # pykosd is now a very good tool 
    53 # 
    54 # Revision 1.3  2004/07/07 21:44:15  jalet 
    55 # Formatting improvements 
    56 # 
    57 # Revision 1.2  2004/07/07 14:14:31  jalet 
    58 # Now handles limits by quota in addition to limits by balance 
    59 # 
    60 # Revision 1.1  2004/07/07 13:21:27  jalet 
    61 # Introduction of the pykosd command 
    62 # 
    6324# 
    6425# 
  • pykota/trunk/bin/pykotme

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.18  2005/01/17 08:44:24  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.17  2004/11/12 23:46:44  jalet 
    30 # Heavy work on pkbanner. Not finished yet though, but mostly works. 
    31 # 
    32 # Revision 1.16  2004/10/11 22:53:05  jalet 
    33 # Postponed string interpolation to help message's output method 
    34 # 
    35 # Revision 1.15  2004/10/11 12:49:06  jalet 
    36 # Renders help translatable 
    37 # 
    38 # Revision 1.14  2004/10/06 10:05:47  jalet 
    39 # Minor changes to allow any PyKota administrator to launch enhanced versions 
    40 # of the commands, and not only the root user. 
    41 # 
    42 # Revision 1.13  2004/07/01 19:56:42  jalet 
    43 # Better dispatching of error messages 
    44 # 
    45 # Revision 1.12  2004/06/18 13:34:49  jalet 
    46 # Now all tracebacks include PyKota's version number 
    47 # 
    48 # Revision 1.11  2004/06/07 18:43:40  jalet 
    49 # Fixed over-verbose exits when displaying help or version number 
    50 # 
    51 # Revision 1.10  2004/06/03 21:50:34  jalet 
    52 # Improved error logging. 
    53 # crashrecipient directive added. 
    54 # Now exports the job's size in bytes too. 
    55 # 
    56 # Revision 1.9  2004/05/21 20:53:34  jalet 
    57 # Now pykotme doesn't spawn a new process anymore to compute job's size, but 
    58 # use the PDLAnalyzer class directly 
    59 # 
    60 # Revision 1.8  2004/05/10 07:23:21  jalet 
    61 # pykotme now uses pkpgcounter to compute the job's size. 
    62 # 
    63 # Revision 1.7  2004/01/12 22:43:40  jalet 
    64 # New formula to compute a job's price 
    65 # 
    66 # Revision 1.6  2004/01/08 14:10:32  jalet 
    67 # Copyright year changed. 
    68 # 
    69 # Revision 1.5  2003/10/09 21:25:25  jalet 
    70 # Multiple printer names or wildcards can be passed on the command line 
    71 # separated with commas. 
    72 # Beta phase. 
    73 # 
    74 # Revision 1.4  2003/10/07 09:07:27  jalet 
    75 # Character encoding added to please latest version of Python 
    76 # 
    77 # Revision 1.3  2003/07/29 20:55:17  jalet 
    78 # 1.14 is out ! 
    79 # 
    80 # Revision 1.2  2003/07/25 10:41:29  jalet 
    81 # Better documentation. 
    82 # pykotme now displays the current user's account balance. 
    83 # Some test changed in ldap module. 
    84 # 
    85 # Revision 1.1  2003/07/03 09:44:01  jalet 
    86 # Now includes the pykotme utility 
    87 # 
    8824# 
    8925# 
  • pykota/trunk/bin/repykota

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.53  2005/01/17 08:44:24  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.52  2004/10/11 22:53:05  jalet 
    30 # Postponed string interpolation to help message's output method 
    31 # 
    32 # Revision 1.51  2004/10/11 12:49:06  jalet 
    33 # Renders help translatable 
    34 # 
    35 # Revision 1.50  2004/10/06 10:05:47  jalet 
    36 # Minor changes to allow any PyKota administrator to launch enhanced versions 
    37 # of the commands, and not only the root user. 
    38 # 
    39 # Revision 1.49  2004/06/18 13:34:49  jalet 
    40 # Now all tracebacks include PyKota's version number 
    41 # 
    42 # Revision 1.48  2004/06/07 18:43:41  jalet 
    43 # Fixed over-verbose exits when displaying help or version number 
    44 # 
    45 # Revision 1.47  2004/06/03 21:50:34  jalet 
    46 # Improved error logging. 
    47 # crashrecipient directive added. 
    48 # Now exports the job's size in bytes too. 
    49 # 
    50 # Revision 1.46  2004/01/08 14:10:32  jalet 
    51 # Copyright year changed. 
    52 # 
    53 # Revision 1.45  2003/10/09 21:25:25  jalet 
    54 # Multiple printer names or wildcards can be passed on the command line 
    55 # separated with commas. 
    56 # Beta phase. 
    57 # 
    58 # Revision 1.44  2003/10/07 09:07:27  jalet 
    59 # Character encoding added to please latest version of Python 
    60 # 
    61 # Revision 1.43  2003/08/18 16:35:28  jalet 
    62 # New pychecker pass, on the tools this time. 
    63 # 
    64 # Revision 1.42  2003/07/29 20:55:17  jalet 
    65 # 1.14 is out ! 
    66 # 
    67 # Revision 1.41  2003/07/07 12:19:52  jalet 
    68 # Now repykota and warnpykota --groups check the groups the user is a member of 
    69 # in the print quota database, not in the system passwd/group files 
    70 # 
    71 # Revision 1.40  2003/06/30 12:46:15  jalet 
    72 # Extracted reporting code. 
    73 # 
    74 # Revision 1.39  2003/06/25 14:10:01  jalet 
    75 # Hey, it may work (edpykota --reset excepted) ! 
    76 # 
    77 # Revision 1.38  2003/06/15 22:26:52  jalet 
    78 # More work on LDAP 
    79 # 
    80 # Revision 1.37  2003/06/10 16:37:54  jalet 
    81 # Deletion of the second user which is not needed anymore. 
    82 # Added a debug configuration field in /etc/pykota.conf 
    83 # All queries can now be sent to the logger in debug mode, this will 
    84 # greatly help improve performance when time for this will come. 
    85 # 
    86 # Revision 1.36  2003/06/06 14:21:08  jalet 
    87 # New LDAP schema. 
    88 # Small bug fixes. 
    89 # 
    90 # Revision 1.35  2003/05/28 13:56:24  jalet 
    91 # Unneeded code. 
    92 # 
    93 # Revision 1.34  2003/04/29 22:03:38  jalet 
    94 # Better error handling. 
    95 # 
    96 # Revision 1.33  2003/04/28 08:25:48  jalet 
    97 # Small display bug in repykota was fixed. 
    98 # 
    99 # Revision 1.32  2003/04/23 22:13:56  jalet 
    100 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    101 # 
    102 # Revision 1.31  2003/04/23 09:58:17  jalet 
    103 # Prices per page/job are now displayed 
    104 # 
    105 # Revision 1.30  2003/04/18 08:34:51  jalet 
    106 # Minor fix. 
    107 # 
    108 # Revision 1.29  2003/04/18 08:29:30  jalet 
    109 # Minor bug fix 
    110 # 
    111 # Revision 1.28  2003/04/17 09:36:30  jalet 
    112 # Bad alignment in output 
    113 # 
    114 # Revision 1.27  2003/04/17 09:26:21  jalet 
    115 # repykota now reports account balances too. 
    116 # 
    117 # Revision 1.26  2003/04/16 12:35:49  jalet 
    118 # Groups quota work now ! 
    119 # 
    120 # Revision 1.25  2003/04/15 11:30:57  jalet 
    121 # More work done on money print charging. 
    122 # Minor bugs corrected. 
    123 # All tools now access to the storage as priviledged users, repykota excepted. 
    124 # 
    125 # Revision 1.24  2003/04/14 20:05:20  jalet 
    126 # Reversed test. 
    127 # 
    128 # Revision 1.23  2003/04/11 14:42:54  jalet 
    129 # Translations 
    130 # 
    131 # Revision 1.21  2003/04/10 21:47:20  jalet 
    132 # Job history added. Upgrade script neutralized for now ! 
    133 # 
    134 # Revision 1.20  2003/04/08 21:31:39  jalet 
    135 # (anything or 0) = anything !!! Go back to school Jerome ! 
    136 # 
    137 # Revision 1.19  2003/04/08 21:13:44  jalet 
    138 # Prepare --groups option to work. 
    139 # 
    140 # Revision 1.18  2003/04/08 21:10:18  jalet 
    141 # Checks --groups option presence instead of --users because --users is the default. 
    142 # 
    143 # Revision 1.17  2003/03/29 13:45:27  jalet 
    144 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    145 # Two README files were added. 
    146 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    147 # 
    148 # Revision 1.16  2003/03/09 23:56:21  jalet 
    149 # Option noquota added to do accounting only. 
    150 # 
    151 # Revision 1.15  2003/03/09 23:39:14  jalet 
    152 # Simplified translations. 
    153 # 
    154 # Revision 1.14  2003/02/27 09:04:02  jalet 
    155 # Missing translation 
    156 # 
    157 # Revision 1.13  2003/02/27 08:44:01  jalet 
    158 # Check to see if the printer was ever used at all, and displays "unknown" 
    159 # as the pagecounter value in this casCheck to see if the printer was ever used at all, and displays "unknown" 
    160 # as the pagecounter value in this case. 
    161 # 
    162 # Revision 1.12  2003/02/17 23:02:23  jalet 
    163 # getGraceDelay for printer 
    164 # 
    165 # Revision 1.11  2003/02/10 12:12:34  jalet 
    166 # Translations. 
    167 # 
    168 # Revision 1.10  2003/02/10 12:07:30  jalet 
    169 # Now repykota should output the recorded total page number for each printer too. 
    170 # 
    171 # Revision 1.9  2003/02/09 13:40:29  jalet 
    172 # typo 
    173 # 
    174 # Revision 1.8  2003/02/09 12:56:53  jalet 
    175 # Internationalization begins... 
    176 # 
    177 # Revision 1.7  2003/02/08 23:17:20  jalet 
    178 # repykota now outputs life time page counters and the total pages printed by 
    179 # all users/groups on each printer. 
    180 # 
    181 # Revision 1.6  2003/02/07 23:39:16  jalet 
    182 # Typos 
    183 # 
    184 # Revision 1.5  2003/02/07 08:38:36  jalet 
    185 # Missing conversion. 
    186 # empty line between two printers 
    187 # 
    188 # Revision 1.4  2003/02/07 08:34:15  jalet 
    189 # Test wrt date limit was wrong 
    190 # 
    191 # Revision 1.3  2003/02/07 00:08:52  jalet 
    192 # Typos 
    193 # 
    194 # Revision 1.2  2003/02/06 23:58:05  jalet 
    195 # repykota should be ok 
    196 # 
    19724# 
    19825# 
  • pykota/trunk/bin/warnpykota

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.37  2005/01/17 08:44:24  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.36  2004/10/12 17:08:32  jalet 
    30 # alreadydone mapping was reset in each iteration, this is fixed. 
    31 # 
    32 # Revision 1.35  2004/10/12 09:14:03  jalet 
    33 # Ensures that warnpykota still test other quota entries for each user if 
    34 # he has not been warned, even if limited by his account balance. 
    35 # 
    36 # Revision 1.34  2004/10/12 09:09:04  jalet 
    37 # Now warnpykota warns users limited by balance only once per launch. 
    38 # 
    39 # Revision 1.33  2004/10/12 08:58:53  jalet 
    40 # Now warnpykota only warns users who have already printed, to not confuse 
    41 # users who have just opened their account. 
    42 # 
    43 # Revision 1.32  2004/10/11 22:53:05  jalet 
    44 # Postponed string interpolation to help message's output method 
    45 # 
    46 # Revision 1.31  2004/10/11 12:49:06  jalet 
    47 # Renders help translatable 
    48 # 
    49 # Revision 1.30  2004/10/06 10:05:47  jalet 
    50 # Minor changes to allow any PyKota administrator to launch enhanced versions 
    51 # of the commands, and not only the root user. 
    52 # 
    53 # Revision 1.29  2004/06/18 13:34:49  jalet 
    54 # Now all tracebacks include PyKota's version number 
    55 # 
    56 # Revision 1.28  2004/06/07 18:43:41  jalet 
    57 # Fixed over-verbose exits when displaying help or version number 
    58 # 
    59 # Revision 1.27  2004/06/03 21:50:34  jalet 
    60 # Improved error logging. 
    61 # crashrecipient directive added. 
    62 # Now exports the job's size in bytes too. 
    63 # 
    64 # Revision 1.26  2004/01/08 14:10:32  jalet 
    65 # Copyright year changed. 
    66 # 
    67 # Revision 1.25  2003/10/09 21:25:26  jalet 
    68 # Multiple printer names or wildcards can be passed on the command line 
    69 # separated with commas. 
    70 # Beta phase. 
    71 # 
    72 # Revision 1.24  2003/10/07 09:07:28  jalet 
    73 # Character encoding added to please latest version of Python 
    74 # 
    75 # Revision 1.23  2003/08/18 16:35:28  jalet 
    76 # New pychecker pass, on the tools this time. 
    77 # 
    78 # Revision 1.22  2003/07/29 20:55:17  jalet 
    79 # 1.14 is out ! 
    80 # 
    81 # Revision 1.21  2003/07/07 12:19:52  jalet 
    82 # Now repykota and warnpykota --groups check the groups the user is a member of 
    83 # in the print quota database, not in the system passwd/group files 
    84 # 
    85 # Revision 1.20  2003/06/25 14:10:01  jalet 
    86 # Hey, it may work (edpykota --reset excepted) ! 
    87 # 
    88 # Revision 1.19  2003/04/29 22:03:38  jalet 
    89 # Better error handling. 
    90 # 
    91 # Revision 1.18  2003/04/23 22:13:56  jalet 
    92 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    93 # 
    94 # Revision 1.17  2003/04/17 13:32:17  jalet 
    95 # bad documentation string 
    96 # 
    97 # Revision 1.16  2003/04/16 12:35:49  jalet 
    98 # Groups quota work now ! 
    99 # 
    100 # Revision 1.15  2003/04/10 21:47:20  jalet 
    101 # Job history added. Upgrade script neutralized for now ! 
    102 # 
    103 # Revision 1.14  2003/04/08 21:31:39  jalet 
    104 # (anything or 0) = anything !!! Go back to school Jerome ! 
    105 # 
    106 # Revision 1.13  2003/04/08 21:13:44  jalet 
    107 # Prepare --groups option to work. 
    108 # 
    109 # Revision 1.12  2003/04/08 21:10:18  jalet 
    110 # Checks --groups option presence instead of --users because --users is the default. 
    111 # 
    112 # Revision 1.11  2003/03/29 13:45:27  jalet 
    113 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    114 # Two README files were added. 
    115 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    116 # 
    117 # Revision 1.10  2003/03/25 11:45:32  jalet 
    118 # Clearer help. 
    119 # 
    120 # Revision 1.9  2003/03/09 23:39:14  jalet 
    121 # Simplified translations. 
    122 # 
    123 # Revision 1.8  2003/02/10 12:07:30  jalet 
    124 # Now repykota should output the recorded total page number for each printer too. 
    125 # 
    126 # Revision 1.7  2003/02/09 13:40:29  jalet 
    127 # typo 
    128 # 
    129 # Revision 1.6  2003/02/09 12:56:53  jalet 
    130 # Internationalization begins... 
    131 # 
    132 # Revision 1.5  2003/02/07 23:24:38  jalet 
    133 # Empty line deleted 
    134 # 
    135 # Revision 1.4  2003/02/06 23:25:40  jalet 
    136 # Cleaner docstring 
    137 # 
    138 # Revision 1.3  2003/02/06 23:20:02  jalet 
    139 # warnpykota doesn't need any user/group name argument, mimicing the 
    140 # warnquota disk quota tool. 
    141 # 
    142 # Revision 1.2  2003/02/06 22:54:33  jalet 
    143 # warnpykota should be ok 
    144 # 
    14524# 
    14625# 
  • pykota/trunk/cgi-bin/dumpykota.cgi

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.5  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.4  2005/01/17 08:44:24  jalet 
    33 # Modified copyright years 
    34 # 
    35 # Revision 1.3  2005/01/10 14:57:29  jalet 
    36 # Fixed the default datatype which is now set to 'history' 
    37 # 
    38 # Revision 1.2  2005/01/08 19:47:00  jalet 
    39 # Fixed a bad copy&paste 
    40 # 
    41 # Revision 1.1  2005/01/08 19:13:11  jalet 
    42 # dumpykota.cgi was added to allow the use of dumpykota through the web. 
    43 # This makes real time interfacing with the third party software phpPrintAnalyzer 
    44 # a breeze ! 
    4524# 
    4625# 
  • pykota/trunk/cgi-bin/printquota.cgi

    r2146 r2147  
    2323# $Id$ 
    2424# 
    25 # $Log$ 
    26 # Revision 1.45  2005/02/13 22:22:03  jalet 
    27 # Added missing fields 
    28 # 
    29 # Revision 1.44  2005/01/19 08:49:41  jalet 
    30 # Now dumpykota.cgi behaves like printquota.cgi wrt the REMOTE_USER environment 
    31 # variables if the script is username+password protected. 
    32 # Small fix in printquota.cgi wrt ldap auth with Apache : the workaround was 
    33 # not used everywhere. 
    34 # 
    35 # Revision 1.43  2005/01/17 08:44:24  jalet 
    36 # Modified copyright years 
    37 # 
    38 # Revision 1.42  2005/01/08 17:19:02  jalet 
    39 # Fixed incorrect import statement 
    40 # 
    41 # Revision 1.41  2005/01/08 17:13:08  jalet 
    42 # Move some functions outside of the CGI to allow their use in other CGI scripts 
    43 # 
    44 # Revision 1.40  2004/10/23 19:28:18  jalet 
    45 # Small fix to the cgi script to please Freshmeat's fmII URL validator/1.1 
    46 # 
    47 # Revision 1.39  2004/10/13 09:38:25  jalet 
    48 # Added a translatable message from the CGI script 
    49 # 
    50 # Revision 1.38  2004/10/02 13:47:46  jalet 
    51 # The CGI script doesn't depend anymore on what is in the submit button 
    52 # to display the print quota report. 
    53 # 
    54 # Revision 1.37  2004/10/02 05:48:56  jalet 
    55 # Should now correctly deal with charsets both when storing into databases and when 
    56 # retrieving datas. Works with both PostgreSQL and LDAP. 
    57 # 
    58 # Revision 1.36  2004/09/02 10:34:09  jalet 
    59 # Fixed problem with mod_auth_ldap Apache module 
    60 # 
    61 # Revision 1.35  2004/07/24 20:10:10  jalet 
    62 # Incorrect number of parameters in error method 
    63 # 
    64 # Revision 1.34  2004/07/24 20:07:13  jalet 
    65 # Added special Python comment to remove warning at runtime 
    66 # 
    67 # Revision 1.33  2004/07/21 19:24:48  jalet 
    68 # Inversion 
    69 # 
    70 # Revision 1.32  2004/07/21 19:20:05  jalet 
    71 # Missing translation in CGI script 
    72 # 
    73 # Revision 1.31  2004/07/21 13:32:02  jalet 
    74 # All messages should be translatable now. 
    75 # 
    76 # Revision 1.30  2004/07/01 17:45:48  jalet 
    77 # Added code to handle the description field for printers 
    78 # 
    79 # Revision 1.29  2004/06/06 21:07:55  jalet 
    80 # Improved CGI script to allow history on printers and hostnames. 
    81 # Better (?) colors in stylesheet. 
    82 # 
    83 # Revision 1.28  2004/06/05 22:42:41  jalet 
    84 # Improved web history reports 
    85 # 
    86 # Revision 1.27  2004/05/26 14:49:40  jalet 
    87 # First try at saving the job-originating-hostname in the database 
    88 # 
    89 # Revision 1.26  2004/03/24 19:37:04  jalet 
    90 # Doesn't retrieve users or printers objects to display the history, 
    91 # this is not needed, and saves a lot of time (and database queries 
    92 # if storagecahing is disabled) 
    93 # 
    94 # Revision 1.25  2004/01/12 15:28:45  jalet 
    95 # Now can output the user's history on several printers at the same time. 
    96 # 
    97 # Revision 1.24  2004/01/12 14:52:03  jalet 
    98 # Cuts the date string 
    99 # 
    100 # Revision 1.23  2004/01/12 14:35:01  jalet 
    101 # Printing history added to CGI script. 
    102 # 
    103 # Revision 1.22  2004/01/09 07:58:53  jalet 
    104 # Changed URL to PyKota's logo 
    105 # 
    106 # Revision 1.21  2004/01/08 14:10:32  jalet 
    107 # Copyright year changed. 
    108 # 
    109 # Revision 1.20  2004/01/07 16:07:17  jalet 
    110 # The stylesheet is again expected to be local, it was a bad idea to use 
    111 # the one on my server. 
    112 # 
    113 # Revision 1.19  2004/01/06 16:05:45  jalet 
    114 # Will now search the stylesheet on my own website. 
    115 # 
    116 # Revision 1.18  2003/12/27 16:49:25  uid67467 
    117 # Should be ok now. 
    118 # 
    119 # Revision 1.16  2003/12/02 14:40:20  jalet 
    120 # Some code refactoring. 
    121 # New HTML reporter added, which is now used in the CGI script for web based 
    122 # print quota reports. It will need some de-uglyfication though... 
    123 # 
    124 # Revision 1.15  2003/10/24 22:06:42  jalet 
    125 # Initial support for browser's language preference added. 
    126 # 
    127 # Revision 1.14  2003/10/10 19:48:07  jalet 
    128 # Now displays version number 
    129 # 
    130 # Revision 1.13  2003/08/25 11:23:05  jalet 
    131 # More powerful CGI script for quota reports 
    132 # 
    133 # Revision 1.12  2003/07/29 20:55:17  jalet 
    134 # 1.14 is out ! 
    135 # 
    136 # Revision 1.11  2003/07/01 12:37:31  jalet 
    137 # Nicer UI 
    138 # 
    139 # Revision 1.10  2003/07/01 07:30:32  jalet 
    140 # Message changed. 
    141 # 
    142 # Revision 1.9  2003/06/30 13:47:26  jalet 
    143 # Allows multiple user / group names masks in the input field 
    144 # 
    145 # Revision 1.8  2003/06/30 13:32:01  jalet 
    146 # Much more powerful CGI script for quota reports 
    147 # 
    148 # Revision 1.7  2003/06/30 12:46:15  jalet 
    149 # Extracted reporting code. 
    150 # 
    151 # Revision 1.6  2003/04/23 22:13:56  jalet 
    152 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    153 # 
    154 # Revision 1.5  2003/04/17 21:30:09  jalet 
    155 # Now includes the logo 
    156 # 
    157 # Revision 1.4  2003/04/08 21:20:25  jalet 
    158 # CGI Script now displays a link to PyKota's website. 
    159 # 
    160 # Revision 1.3  2003/03/29 13:45:27  jalet 
    161 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    162 # Two README files were added. 
    163 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    164 # 
    165 # Revision 1.2  2003/02/12 11:31:51  jalet 
    166 # doesn't use the jaxml module anymore 
    167 # 
    168 # Revision 1.1  2003/02/10 13:41:38  jalet 
    169 # repykota cgi script added. 
    170 # cleaner doc. 
    17125# 
    17226 
  • pykota/trunk/checkdeps.py

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.6  2005/03/05 18:54:54  jalet 
    27 # Improved the installation documentation. 
    28 # Now checkdeps also checks for the presence of GhostScript, which 
    29 # may be needed if PyKota's bannering facility is used or if some 
    30 # printer driver produces non-DSC compliant PostScript. 
    31 # 
    32 # Revision 1.5  2005/02/14 23:37:58  jalet 
    33 # Added a check for the presence of pythn-psyco 
    34 # 
    35 # Revision 1.4  2005/01/17 08:44:23  jalet 
    36 # Modified copyright years 
    37 # 
    38 # Revision 1.3  2004/11/15 21:11:01  jalet 
    39 # Modified some labels for Python modules 
    40 # 
    41 # Revision 1.2  2004/11/15 21:08:01  jalet 
    42 # Now checks for the presence of ReportLab and PIL 
    43 # 
    44 # Revision 1.1  2004/11/10 22:17:12  jalet 
    45 # Installation script is now non-interactive again, and doesn't install 
    46 # the sample configuration files into /etc/pykota anymore. 
    47 # Dependencies check is now done by running checkdeps.py 
    48 # The database creation scripts will now be included in RPM packages. 
    49 # 
    5024# 
    5125# 
  • pykota/trunk/contributed/pagecount.pl

    r2146 r2147  
    3232# 
    3333# $Id$ 
    34 # 
    35 # $Log$ 
    36 # Revision 1.3  2005/01/17 08:44:24  jalet 
    37 # Modified copyright years 
    38 # 
    39 # Revision 1.2  2004/01/08 14:10:32  jalet 
    40 # Copyright year changed. 
    41 # 
    42 # Revision 1.1  2003/12/27 16:57:42  uid67467 
    43 # Added Perl script which does PJL accounting, contributed by Ren�und Jensen 
    44 # 
    45 # Revision 1.1  2003/12/06 09:03:43  jalet 
    46 # Added Perl script to retrieve printer's internal page counter via PJL, 
    47 # contributed by Ren�und Jensen. 
    48 # 
    4934# 
    5035# 
  • pykota/trunk/docs/autopykota.sgml

    r2146 r2147  
    4747</chapter> 
    4848 
    49 <!-- 
    50  
    51 $Log$ 
    52 Revision 1.2  2005/02/28 00:07:37  jalet 
    53 Added pkmail's doc. 
    54 Used the <command> tag instead of <application> for commands. 
    55 Fixed some typos. 
    56 Added some missing command line options in the commands reference. 
    57  
    58 Revision 1.1  2004/10/06 10:03:16  jalet 
    59 Improved documentation 
    60  
    61 --> 
  • pykota/trunk/docs/dumpykota.sgml

    r2146 r2147  
    9999</chapter> 
    100100 
    101 <!-- 
    102  
    103 $Log$ 
    104 Revision 1.3  2005/02/28 00:07:37  jalet 
    105 Added pkmail's doc. 
    106 Used the <command> tag instead of <application> for commands. 
    107 Fixed some typos. 
    108 Added some missing command line options in the commands reference. 
    109  
    110 Revision 1.2  2004/10/06 10:03:16  jalet 
    111 Improved documentation 
    112  
    113 Revision 1.1  2004/09/27 08:19:14  jalet 
    114 Wrote some doc for dumpykota 
    115  
    116 --> 
  • pykota/trunk/docs/filterpykota.sgml

    r2146 r2147  
    8383</chapter> 
    8484 
    85 <!-- 
    86  
    87 $Log$ 
    88 Revision 1.12  2004/07/16 12:22:45  jalet 
    89 LPRng support early version 
    90  
    91 Revision 1.11  2004/05/25 09:49:52  jalet 
    92 The old pykota filter has been removed. LPRng support disabled for now. 
    93  
    94 Revision 1.10  2004/05/13 13:59:28  jalet 
    95 Code simplifications 
    96  
    97 Revision 1.9  2004/03/03 19:35:36  jalet 
    98 Spelling problem. Thanks to Jurandy Martins 
    99  
    100 Revision 1.8  2003/11/15 14:59:53  jalet 
    101 Documentation wrt the new CUPS backend. 
    102  
    103 Revision 1.7  2003/10/14 20:26:53  jalet 
    104 Better documentation. 
    105 1.15 is out ! 
    106  
    107 Revision 1.6  2003/07/25 13:10:58  jalet 
    108 Improved documentation 
    109  
    110 Revision 1.5  2003/07/25 10:41:29  jalet 
    111 Better documentation. 
    112 pykotme now displays the current user's account balance. 
    113 Some test changed in ldap module. 
    114  
    115 Revision 1.4  2003/04/30 20:00:51  jalet 
    116 Typo 
    117  
    118 Revision 1.3  2003/04/24 21:09:47  jalet 
    119 Documentation slightly improved. 
    120  
    121 Revision 1.2  2003/03/25 09:32:06  jalet 
    122 Improved documentation. 
    123  
    124 Revision 1.1  2003/02/08 00:03:35  jalet 
    125 Documentation skeleton added 
    126  
    127  
    128 --> 
  • pykota/trunk/docs/installation.sgml

    r2146 r2147  
    846846</chapter> 
    847847 
    848 <!-- 
    849  
    850 $Log$ 
    851 Revision 1.33  2005/03/05 18:54:54  jalet 
    852 Improved the installation documentation. 
    853 Now checkdeps also checks for the presence of GhostScript, which 
    854 may be needed if PyKota's bannering facility is used or if some 
    855 printer driver produces non-DSC compliant PostScript. 
    856  
    857 Revision 1.32  2005/02/28 23:17:40  jalet 
    858 Improved documentation 
    859  
    860 Revision 1.31  2005/02/28 22:29:25  jalet 
    861 More complete PostgreSQL configuration. 
    862 Changed all occurences of /etc/pykota/ to ~pykota/ 
    863  
    864 Revision 1.30  2005/02/28 00:07:37  jalet 
    865 Added pkmail's doc. 
    866 Used the <command> tag instead of <application> for commands. 
    867 Fixed some typos. 
    868 Added some missing command line options in the commands reference. 
    869  
    870 Revision 1.29  2004/11/10 22:35:23  jalet 
    871 Changes to the installation documentation 
    872  
    873 Revision 1.28  2004/10/06 10:03:16  jalet 
    874 Improved documentation 
    875  
    876 Revision 1.27  2004/07/21 09:39:03  jalet 
    877 LPRng documentation 
    878  
    879 Revision 1.26  2004/07/16 12:22:46  jalet 
    880 LPRng support early version 
    881  
    882 Revision 1.25  2004/05/25 09:49:53  jalet 
    883 The old pykota filter has been removed. LPRng support disabled for now. 
    884  
    885 Revision 1.24  2004/02/13 08:46:32  jalet 
    886 Fixed documentation wrt installation paths changed 
    887  
    888 Revision 1.23  2004/01/30 17:13:56  jalet 
    889 1.17 
    890  
    891 Revision 1.22  2003/11/15 14:59:53  jalet 
    892 Documentation wrt the new CUPS backend. 
    893  
    894 Revision 1.21  2003/10/14 20:26:53  jalet 
    895 Better documentation. 
    896 1.15 is out ! 
    897  
    898 Revision 1.20  2003/07/25 13:20:32  jalet 
    899 Typo which wasn't 
    900  
    901 Revision 1.19  2003/07/25 13:18:44  jalet 
    902 Typos 
    903  
    904 Revision 1.18  2003/07/25 10:41:29  jalet 
    905 Better documentation. 
    906 pykotme now displays the current user's account balance. 
    907 Some test changed in ldap module. 
    908  
    909 Revision 1.17  2003/06/30 21:44:18  jalet 
    910 1.09 is out ! 
    911  
    912 Revision 1.16  2003/06/24 21:37:05  jalet 
    913 Minor changes 
    914  
    915 Revision 1.15  2003/06/10 16:37:54  jalet 
    916 Deletion of the second user which is not needed anymore. 
    917 Added a debug configuration field in /etc/pykota.conf 
    918 All queries can now be sent to the logger in debug mode, this will 
    919 greatly help improve performance when time for this will come. 
    920  
    921 Revision 1.14  2003/06/05 07:12:29  jalet 
    922 Reorganization of directories 
    923  
    924 Revision 1.13  2003/04/24 21:09:47  jalet 
    925 Documentation slightly improved. 
    926  
    927 Revision 1.12  2003/04/17 21:33:16  jalet 
    928 Version 1.03 is out. 
    929  
    930 Revision 1.11  2003/03/25 09:32:06  jalet 
    931 Improved documentation. 
    932  
    933 Revision 1.10  2003/03/23 17:59:56  jalet 
    934 Clarify a point. 
    935  
    936 Revision 1.9  2003/03/23 17:57:20  jalet 
    937 Deleted a repetition. 
    938  
    939 Revision 1.8  2003/03/22 15:34:50  jalet 
    940 More complete installation documentation. 
    941  
    942 Revision 1.7  2003/03/22 14:26:45  jalet 
    943 Download instructions added. 
    944  
    945 Revision 1.6  2003/03/22 14:06:02  jalet 
    946 Quota Storage Server installation is OK for PostgreSQL. 
    947  
    948 Revision 1.5  2003/03/22 13:11:33  jalet 
    949 The port on which the Quota Storage Sever is listening can now 
    950 be set in the configuration file (see sample). 
    951 Better error handling if PygreSQL is not installed. 
    952 Improved documentation. 
    953 Version number changed to 1.02alpha 
    954  
    955 Revision 1.4  2003/03/22 07:20:38  jalet 
    956 More information wrt PostgreSQL tcp/ip configuration. 
    957  
    958 Revision 1.3  2003/03/18 22:18:25  jalet 
    959 The documentation will only be a sequence of chapters in a single part, not 
    960 multiple parts each including chapters. 
    961  
    962 Revision 1.2  2003/03/18 22:10:54  jalet 
    963 Documentation improvements. 
    964  
    965 Revision 1.1  2003/02/08 00:03:35  jalet 
    966 Documentation skeleton added 
    967  
    968  
    969 --> 
  • pykota/trunk/docs/pkhint.sgml

    r2146 r2147  
    4949</chapter> 
    5050 
    51 <!-- 
    52  
    53 $Log$ 
    54 Revision 1.2  2005/02/28 22:29:25  jalet 
    55 More complete PostgreSQL configuration. 
    56 Changed all occurences of /etc/pykota/ to ~pykota/ 
    57  
    58 Revision 1.1  2004/03/18 10:32:23  jalet 
    59 Added pkhint's documentation 
    60  
    61 --> 
  • pykota/trunk/docs/pkmail.sgml

    r2146 r2147  
    100100</chapter> 
    101101 
    102 <!-- 
    103  
    104 $Log$ 
    105 Revision 1.1  2005/02/28 00:07:37  jalet 
    106 Added pkmail's doc. 
    107 Used the <command> tag instead of <application> for commands. 
    108 Fixed some typos. 
    109 Added some missing command line options in the commands reference. 
    110  
    111  
    112 --> 
  • pykota/trunk/docs/pkprinters.sgml

    r2146 r2147  
    4141</chapter> 
    4242 
    43 <!-- 
    44  
    45 $Log$ 
    46 Revision 1.2  2005/02/28 00:07:37  jalet 
    47 Added pkmail's doc. 
    48 Used the <command> tag instead of <application> for commands. 
    49 Fixed some typos. 
    50 Added some missing command line options in the commands reference. 
    51  
    52 Revision 1.1  2004/03/16 14:42:31  jalet 
    53 Improved documentation 
    54  
    55  
    56 --> 
  • pykota/trunk/docs/pykosd.sgml

    r2146 r2147  
    5454</chapter> 
    5555 
    56 <!-- 
    57  
    58 $Log$ 
    59 Revision 1.2  2004/07/19 22:37:13  jalet 
    60 pykosd is now a very good tool 
    61  
    62 Revision 1.1  2004/07/16 12:22:46  jalet 
    63 LPRng support early version 
    64  
    65 --> 
  • pykota/trunk/docs/pykota.sgml

    r2146 r2147  
    138138</book> 
    139139 
    140 <!-- 
    141  
    142 $Log$ 
    143 Revision 1.17  2005/02/28 00:07:37  jalet 
    144 Added pkmail's doc. 
    145 Used the <command> tag instead of <application> for commands. 
    146 Fixed some typos. 
    147 Added some missing command line options in the commands reference. 
    148  
    149 Revision 1.16  2005/01/17 08:44:24  jalet 
    150 Modified copyright years 
    151  
    152 Revision 1.15  2004/10/06 10:03:16  jalet 
    153 Improved documentation 
    154  
    155 Revision 1.14  2004/09/27 08:19:14  jalet 
    156 Wrote some doc for dumpykota 
    157  
    158 Revision 1.13  2004/07/16 12:22:46  jalet 
    159 LPRng support early version 
    160  
    161 Revision 1.12  2004/03/18 10:32:23  jalet 
    162 Added pkhint's documentation 
    163  
    164 Revision 1.11  2004/03/16 14:42:31  jalet 
    165 Improved documentation 
    166  
    167 Revision 1.10  2004/01/12 23:16:42  jalet 
    168 Copyright year. 
    169  
    170 Revision 1.9  2003/11/18 08:39:49  jalet 
    171 Documentation's licensed changed from GNU FDL to GNU GPL, to please Debian. 
    172  
    173 Revision 1.8  2003/08/18 19:20:19  jalet 
    174 I don't know what I did, but I know this was incorrect ! 
    175 Documentation compiles again. 
    176  
    177 Revision 1.7  2003/07/29 09:54:03  jalet 
    178 Added configurable LDAP mail attribute support 
    179  
    180 Revision 1.6  2003/07/25 13:10:58  jalet 
    181 Improved documentation 
    182  
    183 Revision 1.5  2003/07/25 10:41:29  jalet 
    184 Better documentation. 
    185 pykotme now displays the current user's account balance. 
    186 Some test changed in ldap module. 
    187  
    188 Revision 1.4  2003/03/25 09:32:06  jalet 
    189 Improved documentation. 
    190  
    191 Revision 1.3  2003/03/18 22:18:25  jalet 
    192 The documentation will only be a sequence of chapters in a single part, not 
    193 multiple parts each including chapters. 
    194  
    195 Revision 1.2  2003/02/08 00:13:49  jalet 
    196 What is the tag for the zip code ? 
    197  
    198 Revision 1.1  2003/02/08 00:03:35  jalet 
    199 Documentation skeleton added 
    200  
    201  
    202 --> 
  • pykota/trunk/docs/pykotme.sgml

    r2146 r2147  
    8888</chapter> 
    8989 
    90 <!-- 
    91  
    92 $Log$ 
    93 Revision 1.6  2005/02/28 00:07:37  jalet 
    94 Added pkmail's doc. 
    95 Used the <command> tag instead of <application> for commands. 
    96 Fixed some typos. 
    97 Added some missing command line options in the commands reference. 
    98  
    99 Revision 1.5  2003/10/12 20:47:51  jalet 
    100 Doc enhanced. 
    101  
    102 Revision 1.4  2003/07/25 13:18:44  jalet 
    103 Typos 
    104  
    105 Revision 1.3  2003/07/25 13:16:44  jalet 
    106 Typo 
    107  
    108 Revision 1.2  2003/07/25 13:10:58  jalet 
    109 Improved documentation 
    110  
    111 Revision 1.1  2003/07/25 10:41:30  jalet 
    112 Better documentation. 
    113 pykotme now displays the current user's account balance. 
    114 Some test changed in ldap module. 
    115  
    116  
    117 --> 
  • pykota/trunk/docs/repykota.sgml

    r2146 r2147  
    149149</chapter> 
    150150 
    151 <!-- 
    152  
    153 $Log$ 
    154 Revision 1.10  2005/02/28 22:29:25  jalet 
    155 More complete PostgreSQL configuration. 
    156 Changed all occurences of /etc/pykota/ to ~pykota/ 
    157  
    158 Revision 1.9  2005/02/28 00:07:37  jalet 
    159 Added pkmail's doc. 
    160 Used the <command> tag instead of <application> for commands. 
    161 Fixed some typos. 
    162 Added some missing command line options in the commands reference. 
    163  
    164 Revision 1.8  2004/10/06 10:03:16  jalet 
    165 Improved documentation 
    166  
    167 Revision 1.7  2004/01/12 23:10:35  jalet 
    168 PyKota 1.16beta1 is finally out. 
    169  
    170 Revision 1.6  2003/10/12 20:47:51  jalet 
    171 Doc enhanced. 
    172  
    173 Revision 1.5  2003/07/25 13:10:58  jalet 
    174 Improved documentation 
    175  
    176 Revision 1.4  2003/04/24 21:09:47  jalet 
    177 Documentation slightly improved. 
    178  
    179 Revision 1.3  2003/03/25 09:32:06  jalet 
    180 Improved documentation. 
    181  
    182 Revision 1.2  2003/03/08 22:22:40  jalet 
    183 First bit of documentation 
    184  
    185 Revision 1.1  2003/02/08 00:03:35  jalet 
    186 Documentation skeleton added 
    187  
    188  
    189 --> 
  • pykota/trunk/docs/scripts.sgml

    r2146 r2147  
    116116</chapter> 
    117117 
    118 <!-- 
    119  
    120 $Log$ 
    121 Revision 1.2  2004/05/18 14:48:48  jalet 
    122 Big code changes to completely remove the need for "requester" directives, 
    123 jsut use "hardware(... your previous requester directive's content ...)" 
    124  
    125 Revision 1.1  2004/03/16 14:42:31  jalet 
    126 Improved documentation 
    127  
    128  
    129 --> 
  • pykota/trunk/docs/warnpykota.sgml

    r2146 r2147  
    7373</chapter> 
    7474 
    75 <!-- 
    76  
    77 $Log$ 
    78 Revision 1.7  2005/02/28 00:07:37  jalet 
    79 Added pkmail's doc. 
    80 Used the <command> tag instead of <application> for commands. 
    81 Fixed some typos. 
    82 Added some missing command line options in the commands reference. 
    83  
    84 Revision 1.6  2004/10/06 10:03:16  jalet 
    85 Improved documentation 
    86  
    87 Revision 1.5  2003/07/25 13:10:58  jalet 
    88 Improved documentation 
    89  
    90 Revision 1.4  2003/04/24 21:09:47  jalet 
    91 Documentation slightly improved. 
    92  
    93 Revision 1.3  2003/03/25 12:30:37  jalet 
    94 Added warnpykota command synopsis 
    95  
    96 Revision 1.2  2003/03/25 09:32:06  jalet 
    97 Improved documentation. 
    98  
    99 Revision 1.1  2003/02/08 00:03:35  jalet 
    100 Documentation skeleton added 
    101  
    102 --> 
  • pykota/trunk/initscripts/mysql/pykota-mysql.sql

    r2146 r2147  
    1818-- 
    1919-- $Id$ 
    20 -- 
    21 -- $Log$ 
    22 -- Revision 1.2  2005/01/17 08:44:24  jalet 
    23 -- Modified copyright years 
    24 -- 
    25 -- Revision 1.1  2004/06/20 19:14:20  jalet 
    26 -- Added first draft of MySQL initialization script 
    27 -- 
    2820-- 
    2921-- 
  • pykota/trunk/initscripts/postgresql/pykota-postgresql.sql

    r2146 r2147  
    1818-- 
    1919-- $Id$ 
    20 -- 
    21 -- $Log$ 
    22 -- Revision 1.16  2005/02/13 22:02:29  jalet 
    23 -- Big database structure changes. Upgrade script is now included as well as 
    24 -- the new LDAP schema. 
    25 -- Introduction of the -o | --overcharge command line option to edpykota. 
    26 -- The output of repykota is more complete, but doesn't fit in 80 columns anymore. 
    27 -- Introduction of the new 'maxdenybanners' directive. 
    28 -- 
    29 -- Revision 1.15  2005/01/23 10:58:22  jalet 
    30 -- Added a few indexes for the database 
    31 -- 
    32 -- Revision 1.14  2005/01/17 08:44:24  jalet 
    33 -- Modified copyright years 
    34 -- 
    35 -- Revision 1.13  2005/01/10 23:23:25  jalet 
    36 -- Added the billing code to the history 
    37 -- 
    38 -- Revision 1.12  2004/12/23 18:40:18  jalet 
    39 -- Added the coefficient table, and many columns to existing tables 
    40 -- 
    41 -- Revision 1.11  2004/06/20 16:15:21  jalet 
    42 -- Added "description" attribute for printers 
    43 -- 
    44 -- Revision 1.10  2004/06/03 23:14:09  jalet 
    45 -- Now stores the job's size in bytes in the database. 
    46 -- Preliminary work on payments storage : database schemas are OK now, 
    47 -- but no code to store payments yet. 
    48 -- Removed schema picture, not relevant anymore. 
    49 -- 
    50 -- Revision 1.9  2004/05/13 11:15:29  jalet 
    51 -- Added hostname field in job history 
    52 -- 
    53 -- Revision 1.8  2004/01/08 14:10:32  jalet 
    54 -- Copyright year changed. 
    55 -- 
    56 -- Revision 1.7  2003/12/27 16:49:25  uid67467 
    57 -- Should be ok now. 
    58 -- 
    59 -- Revision 1.6  2003/11/23 19:01:36  jalet 
    60 -- Job price added to history 
    61 -- 
    62 -- Revision 1.5  2003/11/21 14:28:45  jalet 
    63 -- More complete job history. 
    64 -- 
    65 -- Revision 1.4  2003/07/16 21:53:07  jalet 
    66 -- Really big modifications wrt new configuration file's location and content. 
    67 -- 
    68 -- Revision 1.3  2003/07/09 20:17:07  jalet 
    69 -- Email field added to PostgreSQL schema 
    70 -- 
    71 -- Revision 1.2  2003/06/10 16:37:54  jalet 
    72 -- Deletion of the second user which is not needed anymore. 
    73 -- Added a debug configuration field in /etc/pykota.conf 
    74 -- All queries can now be sent to the logger in debug mode, this will 
    75 -- greatly help improve performance when time for this will come. 
    76 -- 
    77 -- Revision 1.1  2003/06/05 07:12:31  jalet 
    78 -- Reorganization of directories 
    79 -- 
    8020-- 
    8121-- 
  • pykota/trunk/initscripts/postgresql/upgrade-to-1.14.sql

    r2146 r2147  
    1919-- $Id$ 
    2020-- 
    21 -- $Log$ 
    22 -- Revision 1.3  2004/01/08 14:10:32  jalet 
    23 -- Copyright year changed. 
    24 -- 
    25 -- Revision 1.2  2003/07/16 21:53:07  jalet 
    26 -- Really big modifications wrt new configuration file's location and content. 
    27 -- 
    28 -- Revision 1.1  2003/07/09 20:17:07  jalet 
    29 -- Email field added to PostgreSQL schema 
    30 -- 
    31 -- 
    32 -- 
    33 -- This script has to be used if you already 
    34 -- have a pre-1.14 version of PyKota to upgrade 
    35 -- your database schema.  
    36 -- 
    37 -- YOU DON'T NEED TO USE IT IF YOU'VE JUST INSTALLED PYKOTA 
    3821-- 
    3922                         
  • pykota/trunk/initscripts/postgresql/upgrade-to-1.16.sql

    r2146 r2147  
    1818-- 
    1919-- $Id$ 
    20 -- 
    21 -- $Log$ 
    22 -- Revision 1.4  2004/01/08 14:10:32  jalet 
    23 -- Copyright year changed. 
    24 -- 
    25 -- Revision 1.3  2003/12/27 16:49:25  uid67467 
    26 -- Should be ok now. 
    27 -- 
    28 -- Revision 1.2  2003/11/23 19:01:36  jalet 
    29 -- Job price added to history 
    30 -- 
    31 -- Revision 1.1  2003/11/21 14:29:14  jalet 
    32 -- Forgot to add this file... 
    3320-- 
    3421-- 
  • pykota/trunk/initscripts/postgresql/upgrade-to-1.19.sql

    r2146 r2147  
    1818-- 
    1919-- $Id$ 
    20 -- 
    21 -- $Log$ 
    22 -- Revision 1.3  2004/06/20 16:15:21  jalet 
    23 -- Added "description" attribute for printers 
    24 -- 
    25 -- Revision 1.2  2004/06/03 23:14:10  jalet 
    26 -- Now stores the job's size in bytes in the database. 
    27 -- Preliminary work on payments storage : database schemas are OK now, 
    28 -- but no code to store payments yet. 
    29 -- Removed schema picture, not relevant anymore. 
    30 -- 
    31 -- Revision 1.1  2004/05/13 11:15:29  jalet 
    32 -- Added hostname field in job history 
    3320-- 
    3421-- 
  • pykota/trunk/initscripts/postgresql/upgrade-to-1.21.sql

    r2146 r2147  
    1818-- 
    1919-- $Id$ 
    20 -- 
    21 -- $Log$ 
    22 -- Revision 1.1  2005/02/13 22:15:43  jalet 
    23 -- Missing upgrade script 
    2420-- 
    2521-- 
  • pykota/trunk/initscripts/postgresql/VERYOLDpykota-upgrade-postgresql.sql

    r2146 r2147  
    1818-- 
    1919-- $Id$ 
    20 -- 
    21 -- $Log$ 
    22 -- Revision 1.2  2004/01/08 14:10:32  jalet 
    23 -- Copyright year changed. 
    24 -- 
    25 -- Revision 1.1  2003/06/05 07:12:31  jalet 
    26 -- Reorganization of directories 
    27 -- 
    2820-- 
    2921-- 
  • 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# 
  • pykota/trunk/setup.py

    r2146 r2147  
    2222# 
    2323# $Id$ 
    24 # 
    25 # $Log$ 
    26 # Revision 1.62  2005/01/17 08:44:23  jalet 
    27 # Modified copyright years 
    28 # 
    29 # Revision 1.61  2005/01/08 19:13:11  jalet 
    30 # dumpykota.cgi was added to allow the use of dumpykota through the web. 
    31 # This makes real time interfacing with the third party software phpPrintAnalyzer 
    32 # a breeze ! 
    33 # 
    34 # Revision 1.60  2004/11/21 21:50:02  jalet 
    35 # Introduced the new pkmail command as a simple email gateway 
    36 # 
    37 # Revision 1.59  2004/11/15 19:59:34  jalet 
    38 # PyKota banners now basically work ! 
    39 # 
    40 # Revision 1.58  2004/11/12 23:46:43  jalet 
    41 # Heavy work on pkbanner. Not finished yet though, but mostly works. 
    42 # 
    43 # Revision 1.57  2004/11/10 22:40:45  jalet 
    44 # Logos are installed now 
    45 # 
    46 # Revision 1.56  2004/11/10 22:17:12  jalet 
    47 # Installation script is now non-interactive again, and doesn't install 
    48 # the sample configuration files into /etc/pykota anymore. 
    49 # Dependencies check is now done by running checkdeps.py 
    50 # The database creation scripts will now be included in RPM packages. 
    51 # 
    52 # Revision 1.55  2004/10/16 10:20:32  jalet 
    53 # Now installs translated manual pages 
    54 # 
    55 # Revision 1.54  2004/10/13 07:45:01  jalet 
    56 # Modified installation script to please both me and the Debian packagers 
    57 # 
    58 # Revision 1.53  2004/10/04 21:25:29  jalet 
    59 # dumpykota can now output datas in the XML format 
    60 # 
    61 # Revision 1.52  2004/09/30 09:52:45  jalet 
    62 # Initial release of autopykota. Reading help or manpage is greatly 
    63 # encouraged ! 
    64 # 
    65 # Revision 1.51  2004/09/21 21:31:35  jalet 
    66 # Installation script now checks for availability of Python-SNMP (http://pysnmp.sf.net) 
    67 # 
    68 # Revision 1.50  2004/09/14 22:29:12  jalet 
    69 # First version of dumpykota. Works fine but only with PostgreSQL backend 
    70 # for now. 
    71 # 
    72 # Revision 1.49  2004/07/28 13:00:02  jalet 
    73 # Now takes care of .sxi and .sxc files if any 
    74 # 
    75 # Revision 1.48  2004/07/27 07:14:24  jalet 
    76 # Now warns the user if pyosd is not present 
    77 # 
    78 # Revision 1.47  2004/07/16 12:22:45  jalet 
    79 # LPRng support early version 
    80 # 
    81 # Revision 1.46  2004/07/07 13:21:26  jalet 
    82 # Introduction of the pykosd command 
    83 # 
    84 # Revision 1.45  2004/07/06 09:37:01  jalet 
    85 # Integrated most of the Debian packaging work made by Sergio Gonz�z Gonz�z 
    86 # 
    87 # Revision 1.44  2004/06/05 22:03:49  jalet 
    88 # Payments history is now stored in database 
    89 # 
    90 # Revision 1.43  2004/05/25 09:49:41  jalet 
    91 # The old pykota filter has been removed. LPRng support disabled for now. 
    92 # 
    93 # Revision 1.42  2004/05/18 14:48:46  jalet 
    94 # Big code changes to completely remove the need for "requester" directives, 
    95 # jsut use "hardware(... your previous requester directive's content ...)" 
    96 # 
    97 # Revision 1.41  2004/05/13 14:17:32  jalet 
    98 # Warning about changed accounter and requester directives 
    99 # 
    100 # Revision 1.40  2004/05/13 13:59:27  jalet 
    101 # Code simplifications 
    102 # 
    103 # Revision 1.39  2004/04/08 17:07:41  jalet 
    104 # pkpgcounter added 
    105 # 
    106 # Revision 1.38  2004/03/18 09:18:09  jalet 
    107 # Installation now checks for old scripts 
    108 # 
    109 # Revision 1.37  2004/03/03 19:35:36  jalet 
    110 # Spelling problem. Thanks to Jurandy Martins 
    111 # 
    112 # Revision 1.36  2004/02/25 15:10:38  jalet 
    113 # Preliminary snmpprinterstatus command added. 
    114 # 
    115 # Revision 1.35  2004/02/12 22:43:58  jalet 
    116 # Better integration in Debian and more LSB compliance, thanks to 
    117 # Peter Hawkins. 
    118 # 
    119 # Revision 1.34  2004/02/07 13:45:51  jalet 
    120 # Preliminary work on the pkhint command 
    121 # 
    122 # Revision 1.33  2004/02/04 11:16:59  jalet 
    123 # pkprinters command line tool added. 
    124 # 
    125 # Revision 1.32  2004/01/18 20:52:50  jalet 
    126 # Portuguese portuguese translation replaces brasilian portuguese one, which 
    127 # moves in its own directory. 
    128 # Installation script modified to reorganise installed documentation and include 
    129 # the documentation on OpenOffice.org + ODBC 
    130 # 
    131 # Revision 1.31  2004/01/15 12:50:41  jalet 
    132 # Installation scripts now tells where the documentation was installed. 
    133 # 
    134 # Revision 1.30  2004/01/12 15:45:03  jalet 
    135 # Now installs documentation in /usr/share/doc/pykota too. 
    136 # 
    137 # Revision 1.29  2004/01/08 14:10:32  jalet 
    138 # Copyright year changed. 
    139 # 
    140 # Revision 1.28  2003/12/27 16:49:25  uid67467 
    141 # Should be ok now. 
    142 # 
    143 # Revision 1.28  2003/12/06 09:03:43  jalet 
    144 # Added Perl script to retrieve printer's internal page counter via PJL, 
    145 # contributed by Ren�und Jensen. 
    146 # 
    147 # Revision 1.27  2003/11/28 08:31:28  jalet 
    148 # Shell script to wait for AppleTalk enabled printers being idle was added. 
    149 # 
    150 # Revision 1.26  2003/11/08 16:05:31  jalet 
    151 # CUPS backend added for people to experiment. 
    152 # 
    153 # Revision 1.25  2003/10/08 07:01:19  jalet 
    154 # Job history can be disabled. 
    155 # Some typos in README. 
    156 # More messages in setup script. 
    157 # 
    158 # Revision 1.24  2003/10/07 09:07:27  jalet 
    159 # Character encoding added to please latest version of Python 
    160 # 
    161 # Revision 1.23  2003/07/29 20:55:17  jalet 
    162 # 1.14 is out ! 
    163 # 
    164 # Revision 1.22  2003/07/29 09:54:03  jalet 
    165 # Added configurable LDAP mail attribute support 
    166 # 
    167 # Revision 1.21  2003/07/28 09:11:12  jalet 
    168 # PyKota now tries to add its attributes intelligently in existing LDAP 
    169 # directories. 
    170 # 
    171 # Revision 1.20  2003/07/23 16:51:32  jalet 
    172 # waitprinter.sh is now included to prevent PyKota from asking the 
    173 # printer's internal page counter while a job is still being printer. 
    174 # 
    175 # Revision 1.19  2003/07/16 21:53:07  jalet 
    176 # Really big modifications wrt new configuration file's location and content. 
    177 # 
    178 # Revision 1.18  2003/07/03 09:44:00  jalet 
    179 # Now includes the pykotme utility 
    180 # 
    181 # Revision 1.17  2003/06/30 12:46:15  jalet 
    182 # Extracted reporting code. 
    183 # 
    184 # Revision 1.16  2003/06/06 20:49:15  jalet 
    185 # Very latest schema. UNTESTED. 
    186 # 
    187 # Revision 1.15  2003/05/17 16:32:30  jalet 
    188 # Also outputs the original import error message. 
    189 # 
    190 # Revision 1.14  2003/05/17 16:31:38  jalet 
    191 # Dies gracefully if DistUtils is not present. 
    192 # 
    193 # Revision 1.13  2003/04/29 18:37:54  jalet 
    194 # Pluggable accounting methods (actually doesn't support external scripts) 
    195 # 
    196 # Revision 1.12  2003/04/23 22:13:56  jalet 
    197 # Preliminary support for LPRng added BUT STILL UNTESTED. 
    198 # 
    199 # Revision 1.11  2003/04/17 13:49:29  jalet 
    200 # Typo 
    201 # 
    202 # Revision 1.10  2003/04/17 13:48:39  jalet 
    203 # Better help 
    204 # 
    205 # Revision 1.9  2003/04/17 13:47:28  jalet 
    206 # Help added during installation. 
    207 # 
    208 # Revision 1.8  2003/04/15 17:49:29  jalet 
    209 # Installation script now checks the presence of Netatalk 
    210 # 
    211 # Revision 1.7  2003/04/03 20:03:37  jalet 
    212 # Installation script now allows to install the sample configuration file. 
    213 # 
    214 # Revision 1.6  2003/03/29 13:45:26  jalet 
    215 # GPL paragraphs were incorrectly (from memory) copied into the sources. 
    216 # Two README files were added. 
    217 # Upgrade script for PostgreSQL pre 1.01 schema was added. 
    218 # 
    219 # Revision 1.5  2003/03/29 13:08:28  jalet 
    220 # Configuration is now expected to be found in /etc/pykota.conf instead of 
    221 # in /etc/cups/pykota.conf 
    222 # Installation script can move old config files to the new location if needed. 
    223 # Better error handling if configuration file is absent. 
    224 # 
    225 # Revision 1.4  2003/03/29 09:47:00  jalet 
    226 # More powerful installation script. 
    227 # 
    228 # Revision 1.3  2003/03/26 17:48:36  jalet 
    229 # First shot at trying to detect the availability of the needed software 
    230 # during the installation. 
    231 # 
    232 # Revision 1.2  2003/03/09 16:49:04  jalet 
    233 # The installation script installs the man pages too now. 
    234 # 
    235 # Revision 1.1  2003/02/05 21:28:17  jalet 
    236 # Initial import into CVS 
    237 # 
    23824# 
    23925#