- Timestamp:
- 09/19/05 19:26:41 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 15 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkturnkey
r2435 r2466 41 41 command line usage : 42 42 43 pkturnkey [options] 43 pkturnkey [options] [printqueues names] 44 44 45 45 options : … … 92 92 To REALLY initialize the database instead of simulating it, please 93 93 use the -f | --force command line switch. 94 95 You can limit the initialization to only a subset of the existing 96 printers, by passing their names at the end of the command line. 94 97 """) 95 98 96 99 class PKTurnKey(Tool) : 97 100 """A class for an initialization tool.""" 98 def listPrinters(self ) :101 def listPrinters(self, namestomatch) : 99 102 """Returns a list of tuples (queuename, deviceuri) for all existing print queues.""" 100 103 self.printInfo("Extracting all print queues.") … … 107 110 deviceuri = end.strip() 108 111 queuename = begin.split()[-1] 109 printers.append((queuename, deviceuri)) 112 if self.matchString(queuename, namestomatch) : 113 printers.append((queuename, deviceuri)) 114 else : 115 self.printInfo("Print queue %s skipped." % queuename) 110 116 return printers 111 117 … … 160 166 self.printInfo(_("Printer %s is not managed by PyKota yet. Please modify printers.conf and restart CUPS.") % p, "warn") 161 167 162 def createUsers(self, users, dryrun=0) :168 def createUsers(self, users, printers, dryrun=0) : 163 169 """Creates all users in PyKota's database.""" 164 170 if users : 165 command = "edpykota --add --noquota %s" % " ".join(['"%s"' % u for u in users]) 171 printersnames = [p[0] for p in printers] 172 command = "edpykota --add --noquota --printer %s %s" % (",".join(['"%s"' % p for p in printersnames]), \ 173 " ".join(['"%s"' % u for u in users])) 166 174 self.runCommand(command, dryrun) 167 175 168 def createGroups(self, groups, dryrun=0) :176 def createGroups(self, groups, printers, dryrun=0) : 169 177 """Creates all groups in PyKota's database.""" 170 178 if groups : 171 commands = ["edpykota --groups --add --noquota %s" % " ".join(['"%s"' % g for g in groups.keys()])] 179 printersnames = [p[0] for p in printers] 180 commands = ["edpykota --add --groups --noquota --printer %s %s" % (",".join(['"%s"' % p for p in printersnames]), \ 181 " ".join(['"%s"' % g for g in groups.keys()]))] 172 182 revmembership = {} 173 183 for (groupname, usernames) in groups.items() : … … 184 194 raise PyKotaToolError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 185 195 186 # TODO : names not used for now187 196 if not names : 188 197 names = ["*"] … … 259 268 groups = [] 260 269 261 printers = self.listPrinters( )270 printers = self.listPrinters(names) 262 271 if printers : 263 272 self.createPrinters(printers, dryrun) 264 self.createUsers([entry[0] for entry in users], dryrun)265 self.createGroups(groups, dryrun)273 self.createUsers([entry[0] for entry in users], printers, dryrun) 274 self.createGroups(groups, printers, dryrun) 266 275 267 276 if dryrun : -
pykota/trunk/man/de/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/el_GR/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/es/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/fr/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/it/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/nb_NO/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "September 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NAME 4 pkturnkey \- manual page for pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- manual page for pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/pt_BR/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/pt/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/sv_SE/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/th/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/tr/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/man/zh_TW/pkturnkey.1
r2453 r2466 2 2 .TH PKTURNKEY "1" "septembre 2005" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 3 3 .SH NOM 4 pkturnkey \- page de manuel de pkturnkey 1.23alpha3 0_unofficial4 pkturnkey \- page de manuel de pkturnkey 1.23alpha31_unofficial 5 5 .SH DESCRIPTION 6 pkturnkey v1.23alpha3 0_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com6 pkturnkey v1.23alpha31_unofficial (c) 2003, 2004, 2005 Jerome Alet \- alet@librelogiciel.com 7 7 .PP 8 8 A turn key tool for PyKota. When launched, this command will initialize … … 13 13 command line usage : 14 14 .IP 15 pkturnkey [options] 15 pkturnkey [options] [printqueues names] 16 16 .PP 17 17 options : … … 75 75 To REALLY initialize the database instead of simulating it, please 76 76 use the \fB\-f\fR | \fB\-\-force\fR command line switch. 77 .IP 78 You can limit the initialization to only a subset of the existing 79 printers, by passing their names at the end of the command line. 77 80 .PP 78 81 This program is free software; you can redistribute it and/or modify -
pykota/trunk/NEWS
r2465 r2466 27 27 in pkprinters. These modes are now also honored when printing. 28 28 29 - Allows the admin to restrict the number of print queues which will 30 be treated by pkturnkey by passing queues' names as additionnal 31 arguments on pkturnkey's command line. 32 29 33 - 1.23alpha30 : 30 34