Changeset 1755

Show
Ignore:
Timestamp:
09/28/04 19:45:31 (20 years ago)
Author:
jalet
Message:

Added the --hardreset command line option to edpykota

Location:
pykota/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r1584 r1755  
    2424# 
    2525# $Log$ 
     26# Revision 1.77  2004/09/28 17:45:31  jalet 
     27# Added the --hardreset command line option to edpykota 
     28# 
    2629# Revision 1.76  2004/07/01 19:56:40  jalet 
    2730# Better dispatching of error messages 
     
    334337  -n | --noquota       Doesn't set a quota but only does accounting. 
    335338   
    336   -r | --reset         Resets the printed page counter for the user 
    337                        or group to zero. The life time page counter  
    338                        is kept unchanged. 
     339  -r | --reset         Resets the actual page counter for the user 
     340                       or group to zero on the specified printers.  
     341                       The life time page counter is kept unchanged. 
     342                        
     343  -R | --hardreset     Resets the actual and life time page counters 
     344                       for the user or group to zero on the specified  
     345                       printers.  
    339346                        
    340347  -l | --limitby l     Choose if the user/group is limited in printing                      
     
    394401  well as every user whose name begins with 'jo'. 
    395402  Their life time page counter on each printer will be kept unchanged. 
     403  You can also reset the life time page counters by using the 
     404  --hardreset | -R command line option. 
    396405   
    397406  $ edpykota --printer hpcolor --noquota jerome 
     
    622631                        if options["reset"] : 
    623632                            entrypquota.reset() 
     633                        elif options["hardreset"] :     
     634                            entrypquota.hardreset() 
    624635                             
    625636                        if balance : 
     
    660671                     "printer" : "*", \ 
    661672                   } 
    662         short_options = "vhdc:l:b:i:naugrp:P:S:H:G:" 
    663         long_options = ["help", "version", "charge=", "delete", "limitby=", "balance=", "ingroups=", "noquota", "add", "users", "groups", "reset", "prototype=", "printer=", "softlimit=", "hardlimit=", "pgroups="] 
     673        short_options = "vhdc:l:b:i:naugrp:P:S:H:G:R" 
     674        long_options = ["help", "version", "charge=", "delete", "limitby=", "balance=", "ingroups=", "noquota", "add", "users", "groups", "reset", "hardreset", "prototype=", "printer=", "softlimit=", "hardlimit=", "pgroups="] 
    664675         
    665676        # Initializes the command line tool 
     
    687698        options["charge"] = options["c"] or options["charge"] 
    688699        options["pgroups"] = options["G"] or options["pgroups"] 
     700        options["hardreset"] = options["R"] or options["hardreset"]  
    689701         
    690702        if options["help"] : 
  • pykota/trunk/docs/edpykota.sgml

    r1168 r1755  
    1616      <listitem> 
    1717        <para> 
    18           Add printers ; 
     18          Add printers (it's preferable to use the <application>pkprinters</application> command for this though) ; 
    1919        </para> 
    2020      </listitem> 
     
    5252      <listitem> 
    5353        <para> 
    54           Choose the way you will limit printing : either by page quota or by account balance value. 
     54          Choose the way you will limit printing : either by page quota or by account balance value ; 
     55        </para> 
     56      </listitem> 
     57      <listitem> 
     58        <para> 
     59          Reset page counters. 
    5560        </para> 
    5661      </listitem> 
     
    6368 
    6469$Log$ 
     70Revision 1.5  2004/09/28 17:45:31  jalet 
     71Added the --hardreset command line option to edpykota 
     72 
    6573Revision 1.4  2003/10/14 20:26:53  jalet 
    6674Better documentation. 
  • pykota/trunk/man/edpykota.1

    r1724 r1755  
    22.TH EDPYKOTA "1" "September 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 edpykota \- manual page for edpykota 1.20alpha12_unofficial 
     4edpykota \- manual page for edpykota 1.20alpha17_unofficial 
    55.SH DESCRIPTION 
    6 edpykota v1.20alpha12_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6edpykota v1.20alpha17_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77A Print Quota editor for PyKota. 
    88.PP 
     
    7373.TP 
    7474\fB\-r\fR | \fB\-\-reset\fR 
    75 Resets the printed page counter for the user 
    76 or group to zero. The life time page counter 
    77 is kept unchanged. 
     75Resets the actual page counter for the user 
     76or group to zero on the specified printers. 
     77The life time page counter is kept unchanged. 
     78.TP 
     79\fB\-R\fR | \fB\-\-hardreset\fR 
     80Resets the actual and life time page counters 
     81for the user or group to zero on the specified 
     82printers. 
    7883.TP 
    7984\fB\-l\fR | \fB\-\-limitby\fR l 
     
    137142well as every user whose name begins with 'jo'. 
    138143Their life time page counter on each printer will be kept unchanged. 
     144You can also reset the life time page counters by using the 
     145\fB\-\-hardreset\fR | \fB\-R\fR command line option. 
    139146.IP 
    140147\f(CW$ edpykota --printer hpcolor --noquota jerome\fR 
  • pykota/trunk/NEWS

    r1751 r1755  
    2424    - 1.20alpha17 : 
    2525     
     26        - Added --hardreset command line option to edpykota. 
     27         
    2628        - Fixed problem with accented chars in title, filename 
    2729          or options and LDAP backend. 
  • pykota/trunk/pykota/storage.py

    r1743 r1755  
    2222# 
    2323# $Log$ 
     24# Revision 1.62  2004/09/28 17:45:31  jalet 
     25# Added the --hardreset command line option to edpykota 
     26# 
    2427# Revision 1.61  2004/09/24 21:19:48  jalet 
    2528# Did a pass of PyChecker 
     
    430433        self.parent.writeUserPQuotaPagesCounters(self, 0, int(self.LifePageCounter or 0)) 
    431434        self.PageCounter = 0 
     435         
     436    def hardreset(self) :     
     437        """Resets actual and life time page counters to 0.""" 
     438        self.parent.writeUserPQuotaPagesCounters(self, 0, 0) 
     439        self.PageCounter = self.LifePageCounter = 0 
    432440         
    433441    def computeJobPrice(self, jobsize) :     
  • pykota/trunk/TODO

    r1753 r1755  
    2525          history, to be able to discover duplicate print 
    2626          jobs. 
    27            
    28         - Add --hardreset command line option to 
    29           edpykota to also reset lifetime page counters to 0. 
    3027           
    3128        - Maybe put "gracedelay" in the database.