Index: /pykota/trunk/bin/pkturnkey
===================================================================
--- /pykota/trunk/bin/pkturnkey (revision 2435)
+++ /pykota/trunk/bin/pkturnkey (revision 2466)
@@ -41,5 +41,5 @@
 command line usage :
 
-  pkturnkey [options]
+  pkturnkey [options] [printqueues names]
 
 options :
@@ -92,9 +92,12 @@
   To REALLY initialize the database instead of simulating it, please
   use the -f | --force command line switch.
+  
+  You can limit the initialization to only a subset of the existing
+  printers, by passing their names at the end of the command line.
 """)
         
 class PKTurnKey(Tool) :
     """A class for an initialization tool."""
-    def listPrinters(self) :
+    def listPrinters(self, namestomatch) :
         """Returns a list of tuples (queuename, deviceuri) for all existing print queues."""
         self.printInfo("Extracting all print queues.")
@@ -107,5 +110,8 @@
             deviceuri = end.strip()
             queuename = begin.split()[-1]
-            printers.append((queuename, deviceuri))
+            if self.matchString(queuename, namestomatch) :
+                printers.append((queuename, deviceuri))
+            else :    
+                self.printInfo("Print queue %s skipped." % queuename)
         return printers    
         
@@ -160,14 +166,18 @@
                 self.printInfo(_("Printer %s is not managed by PyKota yet. Please modify printers.conf and restart CUPS.") % p, "warn")
         
-    def createUsers(self, users, dryrun=0) :
+    def createUsers(self, users, printers, dryrun=0) :
         """Creates all users in PyKota's database."""
         if users :
-            command = "edpykota --add --noquota %s" % " ".join(['"%s"' % u for u in users])
+            printersnames = [p[0] for p in printers]
+            command = "edpykota --add --noquota --printer %s %s" % (",".join(['"%s"' % p for p in printersnames]), \
+                                                                    " ".join(['"%s"' % u for u in users]))
             self.runCommand(command, dryrun)
             
-    def createGroups(self, groups, dryrun=0) :
+    def createGroups(self, groups, printers, dryrun=0) :
         """Creates all groups in PyKota's database."""
         if groups :
-            commands = ["edpykota --groups --add --noquota %s" % " ".join(['"%s"' % g for g in groups.keys()])]
+            printersnames = [p[0] for p in printers]
+            commands = ["edpykota --add --groups --noquota --printer %s %s" % (",".join(['"%s"' % p for p in printersnames]), \
+                                                                               " ".join(['"%s"' % g for g in groups.keys()]))]
             revmembership = {}
             for (groupname, usernames) in groups.items() :
@@ -184,5 +194,4 @@
             raise PyKotaToolError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command."))
             
-        # TODO : names not used for now    
         if not names :
             names = ["*"]
@@ -259,9 +268,9 @@
             groups = []
             
-        printers = self.listPrinters()                    
+        printers = self.listPrinters(names)
         if printers :
             self.createPrinters(printers, dryrun)
-            self.createUsers([entry[0] for entry in users], dryrun)
-            self.createGroups(groups, dryrun)
+            self.createUsers([entry[0] for entry in users], printers, dryrun)
+            self.createGroups(groups, printers, dryrun)
         
         if dryrun :
Index: /pykota/trunk/man/sv_SE/pkturnkey.1
===================================================================
--- /pykota/trunk/man/sv_SE/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/sv_SE/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/pt/pkturnkey.1
===================================================================
--- /pykota/trunk/man/pt/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/pt/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/tr/pkturnkey.1
===================================================================
--- /pykota/trunk/man/tr/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/tr/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/el_GR/pkturnkey.1
===================================================================
--- /pykota/trunk/man/el_GR/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/el_GR/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/de/pkturnkey.1
===================================================================
--- /pykota/trunk/man/de/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/de/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/nb_NO/pkturnkey.1
===================================================================
--- /pykota/trunk/man/nb_NO/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/nb_NO/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/pkturnkey.1
===================================================================
--- /pykota/trunk/man/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "September 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NAME
-pkturnkey \- manual page for pkturnkey 1.23alpha30_unofficial
+pkturnkey \- manual page for pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/zh_TW/pkturnkey.1
===================================================================
--- /pykota/trunk/man/zh_TW/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/zh_TW/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/pt_BR/pkturnkey.1
===================================================================
--- /pykota/trunk/man/pt_BR/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/pt_BR/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/fr/pkturnkey.1
===================================================================
--- /pykota/trunk/man/fr/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/fr/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/es/pkturnkey.1
===================================================================
--- /pykota/trunk/man/es/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/es/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/th/pkturnkey.1
===================================================================
--- /pykota/trunk/man/th/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/th/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/man/it/pkturnkey.1
===================================================================
--- /pykota/trunk/man/it/pkturnkey.1 (revision 2453)
+++ /pykota/trunk/man/it/pkturnkey.1 (revision 2466)
@@ -2,7 +2,7 @@
 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands"
 .SH NOM
-pkturnkey \- page de manuel de pkturnkey 1.23alpha30_unofficial
+pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial
 .SH DESCRIPTION
-pkturnkey v1.23alpha30_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
+pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com
 .PP
 A turn key tool for PyKota. When launched, this command will initialize
@@ -13,5 +13,5 @@
 command line usage :
 .IP
-pkturnkey [options]
+pkturnkey [options] [printqueues names]
 .PP
 options :
@@ -75,4 +75,7 @@
 To REALLY initialize the database instead of simulating it, please
 use the \fB\-f\fR | \fB\-\-force\fR command line switch.
+.IP
+You can limit the initialization to only a subset of the existing
+printers, by passing their names at the end of the command line.
 .PP
 This program is free software; you can redistribute it and/or modify
Index: /pykota/trunk/NEWS
===================================================================
--- /pykota/trunk/NEWS (revision 2465)
+++ /pykota/trunk/NEWS (revision 2466)
@@ -27,4 +27,8 @@
           in pkprinters. These modes are now also honored when printing.
           
+        - Allows the admin to restrict the number of print queues which will
+          be treated by pkturnkey by passing queues' names as additionnal 
+          arguments on pkturnkey's command line.
+          
     - 1.23alpha30 :
     
