Changeset 1330

Show
Ignore:
Timestamp:
02/04/04 12:17:00 (21 years ago)
Author:
jalet
Message:

pkprinters command line tool added.

Location:
pykota/trunk
Files:
2 added
24 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/man/edpykota.1

    r1323 r1330  
    11.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.33. 
    2 .TH EDPYKOTA "1" "January 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
     2.TH EDPYKOTA "1" "February 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 edpykota \- manual page for edpykota 1.17_unofficial 
     4edpykota \- manual page for edpykota 1.18alpha2_unofficial 
    55.SH DESCRIPTION 
    6 edpykota v1.16beta1_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6edpykota v1.18alpha2_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77A Print Quota editor for PyKota. 
    88.PP 
  • pykota/trunk/man/genman.sh

    r1287 r1330  
    1414# $Id$ 
    1515# 
    16 for prog in edpykota pykotme repykota warnpykota ; do  
     16for prog in edpykota pykotme repykota warnpykota pkprinters ; do  
    1717    help2man --section=1 --manual "User Commands" --source="C@LL - Conseil Internet & Logiciels Libres" --output=$prog.1 --no-info $prog ;  
    1818done 
  • pykota/trunk/MANIFEST.in

    r1307 r1330  
    1 include README FAQ COPYING LICENSE TODO NEWS CREDITS SECURITY MANIFEST.in clean.sh bin/cupspykota bin/pykota bin/edpykota bin/warnpykota bin/repykota bin/pykotme bin/waitprinter.sh bin/papwaitprinter.sh bin/mailandpopup.sh bin/README 
     1include README FAQ COPYING LICENSE TODO NEWS CREDITS SECURITY MANIFEST.in clean.sh bin/cupspykota bin/pykota bin/edpykota bin/warnpykota bin/repykota bin/pykotme bin/pkprinters bin/waitprinter.sh bin/papwaitprinter.sh bin/mailandpopup.sh bin/README 
    22recursive-include po README *.po *.mo *.pot 
    33recursive-include man README *.sh *.1 
  • pykota/trunk/man/pykotme.1

    r1323 r1330  
    11.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.33. 
    2 .TH PYKOTME "1" "January 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
     2.TH PYKOTME "1" "February 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 pykotme \- manual page for pykotme 1.17_unofficial 
     4pykotme \- manual page for pykotme 1.18alpha2_unofficial 
    55.SH DESCRIPTION 
    6 pykotme v1.16beta1_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6pykotme v1.18alpha2_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77.PP 
    88Gives print quotes to users. 
  • pykota/trunk/man/repykota.1

    r1323 r1330  
    11.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.33. 
    2 .TH REPYKOTA "1" "January 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
     2.TH REPYKOTA "1" "February 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 repykota \- manual page for repykota 1.17_unofficial 
     4repykota \- manual page for repykota 1.18alpha2_unofficial 
    55.SH DESCRIPTION 
    6 repykota v1.16beta1_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6repykota v1.18alpha2_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77.PP 
    88Generates print quota reports. 
  • pykota/trunk/man/warnpykota.1

    r1323 r1330  
    11.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.33. 
    2 .TH WARNPYKOTA "1" "January 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
     2.TH WARNPYKOTA "1" "February 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 warnpykota \- manual page for warnpykota 1.17_unofficial 
     4warnpykota \- manual page for warnpykota 1.18alpha2_unofficial 
    55.SH DESCRIPTION 
    6 warnpykota v1.16beta1_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6warnpykota v1.18alpha2_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77.PP 
    88Sends mail to users over print quota. 
  • pykota/trunk/NEWS

    r1328 r1330  
    2222PyKota NEWS : 
    2323 
     24    - 1.18alpha2 : 
     25     
     26        - Added the pkprinters command line tool to manage printers 
     27          exclusively. 
     28         
    2429    - 1.18alpha1 : 
    2530     
  • pykota/trunk/po/br/pykota.po

    r1307 r1330  
    8484msgstr "Voce deve informar usuario ou grupo na linha de comando" 
    8585 
     86msgid "You have to pass printer names on the command line" 
     87msgstr "Voce deve informar impressora na linha de comando" 
     88 
    8689#, python-format 
    8790msgid "Prototype %s not found in Quota Storage for printer %s." 
  • pykota/trunk/po/en/pykota.po

    r1295 r1330  
    8888msgstr "" 
    8989 
     90msgid "You have to pass printer names on the command line" 
     91msgstr "" 
     92 
    9093#, python-format 
    9194msgid "Prototype %s not found in Quota Storage for printer %s." 
  • pykota/trunk/po/es/pykota.po

    r1295 r1330  
    8686"Usted tiene que pasar nombres de usuarios o grupos en la l�a de comandos" 
    8787 
     88msgid "You have to pass printer names on the command line" 
     89msgstr "Usted tiene que pasar nombres de impresoras en la l�a de comandos" 
     90 
    8891#, python-format 
    8992msgid "Prototype %s not found in Quota Storage for printer %s." 
  • pykota/trunk/po/fr/pykota.po

    r1295 r1330  
    9191"commande" 
    9292 
     93msgid "You have to pass printer names on the command line" 
     94msgstr "Vous devez passer des noms d'imprimantes sur la ligne de commande" 
     95 
    9396#, python-format 
    9497msgid "Prototype %s not found in Quota Storage for printer %s." 
  • pykota/trunk/po/pt/pykota.po

    r1307 r1330  
    8484msgstr "�Obrigat� a utiliza� de nomes de utilizador ou grupo na linha de comando" 
    8585 
     86msgid "You have to pass printer names on the command line" 
     87msgstr "�Obrigat� a utiliza� de nomes de impressora na linha de comando" 
     88 
    8689#, python-format 
    8790msgid "Prototype %s not found in Quota Storage for printer %s." 
  • pykota/trunk/po/pykota.pot

    r1295 r1330  
    8888msgstr "" 
    8989 
     90msgid "You have to pass printer names on the command line" 
     91msgstr "" 
     92 
    9093#, python-format 
    9194msgid "Prototype %s not found in Quota Storage for printer %s." 
  • pykota/trunk/po/se/pykota.po

    r1299 r1330  
    8888msgstr "Du m�e skicka med anv�are- eller gruppnamn p�ommandoraden" 
    8989 
     90msgid "You have to pass printer names on the command line" 
     91msgstr "Du m�e skicka med skrivarnamn p�ommandoraden" 
     92 
    9093#, python-format 
    9194msgid "Prototype %s not found in Quota Storage for printer %s." 
  • pykota/trunk/pykota/storage.py

    r1285 r1330  
    2222# 
    2323# $Log$ 
     24# Revision 1.39  2004/02/04 11:16:59  jalet 
     25# pkprinters command line tool added. 
     26# 
    2427# Revision 1.38  2004/01/12 22:43:40  jalet 
    2528# New formula to compute a job's price 
     
    272275            self.PricePerJob = float(priceperjob) 
    273276        self.parent.writePrinterPrices(self) 
     277         
     278    def delete(self) :     
     279        """Deletes a printer from the Quota Storage.""" 
     280        self.parent.beginTransaction() 
     281        try : 
     282            self.parent.deletePrinter(self) 
     283        except PyKotaStorageError, msg :     
     284            self.parent.rollbackTransaction() 
     285            raise PyKotaStorageError, msg 
     286        else :     
     287            self.parent.commitTransaction() 
    274288         
    275289class StorageUserPQuota(StorageObject) : 
  • pykota/trunk/pykota/storages/ldapstorage.py

    r1320 r1330  
    2222# 
    2323# $Log$ 
     24# Revision 1.50  2004/02/04 11:17:00  jalet 
     25# pkprinters command line tool added. 
     26# 
    2427# Revision 1.49  2004/01/29 22:35:45  jalet 
    2528# Small fix from Matt. 
     
    974977            else :     
    975978                self.doDelete(group.ident) 
    976              
     979                 
     980    def deletePrinter(self, printer) :     
     981        """Completely deletes an user from the Quota Storage.""" 
     982        result = self.doSearch("(&(objectClass=pykotaLastJob)(pykotaPrinterName=%s))" % printer.Name, base=self.info["lastjobbase"]) 
     983        for (ident, fields) in result : 
     984            self.doDelete(ident) 
     985        result = self.doSearch("(&(objectClass=pykotaJob)(pykotaPrinterName=%s))" % printer.Name, base=self.info["jobbase"]) 
     986        for (ident, fields) in result : 
     987            self.doDelete(ident) 
     988        result = self.doSearch("(&(objectClass=pykotaGroupPQuota)(pykotaPrinterName=%s))" % printer.Name, base=self.info["groupquotabase"]) 
     989        for (ident, fields) in result : 
     990            self.doDelete(ident) 
     991        result = self.doSearch("(&(objectClass=pykotaUserPQuota)(pykotaPrinterName=%s))" % printer.Name, base=self.info["userquotabase"]) 
     992        for (ident, fields) in result : 
     993            self.doDelete(ident) 
     994        for parent in self.getParentPrinters(printer) :   
     995            parent.uniqueMember.remove(printer.ident) 
     996            fields = { 
     997                       "uniqueMember" : parent.uniqueMember, 
     998                     }   
     999            self.doModify(parent.ident, fields)          
     1000        self.doDelete(printer.ident)     
  • pykota/trunk/pykota/storages/sql.py

    r1327 r1330  
    2222# 
    2323# $Log$ 
     24# Revision 1.35  2004/02/04 11:17:00  jalet 
     25# pkprinters command line tool added. 
     26# 
    2427# Revision 1.34  2004/02/02 22:44:16  jalet 
    2528# Preliminary work on Relationnal Database Independance via DB-API 2.0 
     
    408411                 ] :   
    409412            self.doModify(q) 
    410          
     413             
     414    def deletePrinter(self, printer) :     
     415        """Completely deletes a printer from the Quota Storage.""" 
     416        for q in [  
     417                    "DELETE FROM printergroupsmembers WHERE groupid=%s OR printerid=%s" % (self.doQuote(printer.ident), self.doQuote(printer.ident)), 
     418                    "DELETE FROM jobhistory WHERE printerid=%s" % self.doQuote(printer.ident), 
     419                    "DELETE FROM grouppquota WHERE printerid=%s" % self.doQuote(printer.ident), 
     420                    "DELETE FROM userpquota WHERE printerid=%s" % self.doQuote(printer.ident), 
     421                    "DELETE FROM printers WHERE id=%s" % self.doQuote(printer.ident), 
     422                  ] : 
     423            self.doModify(q) 
     424         
  • pykota/trunk/pykota/version.py

    r1325 r1330  
    2222# 
    2323 
    24 __version__ = "1.18alpha1_unofficial" 
     24__version__ = "1.18alpha2_unofficial" 
    2525 
    2626__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" 
  • pykota/trunk/setup.py

    r1307 r1330  
    2424# 
    2525# $Log$ 
     26# Revision 1.33  2004/02/04 11:16:59  jalet 
     27# pkprinters command line tool added. 
     28# 
    2629# Revision 1.32  2004/01/18 20:52:50  jalet 
    2730# Portuguese portuguese translation replaces brasilian portuguese one, which 
     
    380383      url = "http://www.librelogiciel.com/software/", 
    381384      packages = [ "pykota", "pykota.storages", "pykota.requesters", "pykota.loggers", "pykota.accounters", "pykota.reporters" ], 
    382       scripts = [ "bin/cupspykota", "bin/pykota", "bin/edpykota", "bin/repykota", "bin/warnpykota", "bin/pykotme", "bin/waitprinter.sh", "bin/papwaitprinter.sh", "bin/mailandpopup.sh", "contributed/pagecount.pl" ], 
     385      scripts = [ "bin/cupspykota", "bin/pykota", "bin/edpykota", "bin/repykota", "bin/warnpykota", "bin/pykotme", "bin/pkprinters", "bin/waitprinter.sh", "bin/papwaitprinter.sh", "bin/mailandpopup.sh", "contributed/pagecount.pl" ], 
    383386      data_files = data_files) 
    384387