Changeset 1258 for pykota/trunk/bin
- Timestamp:
- 01/08/04 17:24:49 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r1257 r1258 24 24 # 25 25 # $Log$ 26 # Revision 1.65 2004/01/08 16:24:49 jalet 27 # edpykota now supports adding printers to printer groups. 28 # 26 29 # Revision 1.64 2004/01/08 14:10:32 jalet 27 30 # Copyright year changed. … … 276 279 by separating them with commas. 277 280 278 -g | --groups Edit groups print quotas instead of users. 281 -G | --pgroups pg1[,pg2...] Adds the printer(s) to the printer groups 282 pg1, pg2, etc... which must already exist. 283 A printer group is just like a normal printer, 284 only that it is usually unknown from the printing 285 system. Create printer groups exactly the same 286 way that you create printers, then add other 287 printers to them with this option. 288 Accounting is done on a printer and on all 289 the printer groups it belongs to, quota checking 290 is done on a printer and on all the printer groups 291 it belongs to. 292 293 -g | --groups Edit users groups print quotas instead of users. 279 294 280 295 -p | --prototype u|g Uses user u or group g as a prototype to set … … 366 381 This will set the page price for printer lp to 0.1. Job price 367 382 will not be changed. 383 384 $ edpykota --printer hplj1,hplj2 --pgroups Laser,HP 385 386 This will put printers hplj1 and hplj2 in printers groups Laser and HP. 387 When printing either on hplj1 or hplj2, print quota will also be 388 checked and accounted for on virtual printers Laser and HP. 368 389 369 390 This program is free software; you can redistribute it and/or modify … … 464 485 names = [ "*" ] # all users 465 486 487 printersgroups = [] 488 if options["pgroups"] : 489 printersgroups = self.storage.getMatchingPrinters(options["pgroups"]) 490 466 491 changed = {} # tracks changes made at the user/group level 467 492 for printer in printers : 493 for pgroup in printersgroups : 494 pgroup.addPrinterToGroup(printer) 495 468 496 if options["charge"] : 469 497 (perpage, perjob) = charges … … 576 604 "printer" : "*", \ 577 605 } 578 short_options = "vhdc:l:b:i:naugrp:P:S:H: "579 long_options = ["help", "version", "charge=", "delete", "limitby=", "balance=", "ingroups=", "noquota", "add", "users", "groups", "reset", "prototype=", "printer=", "softlimit=", "hardlimit=" ]606 short_options = "vhdc:l:b:i:naugrp:P:S:H:G:" 607 long_options = ["help", "version", "charge=", "delete", "limitby=", "balance=", "ingroups=", "noquota", "add", "users", "groups", "reset", "prototype=", "printer=", "softlimit=", "hardlimit=", "pgroups="] 580 608 581 609 # Initializes the command line tool … … 602 630 options["ingroups"] = options["i"] or options["ingroups"] 603 631 options["charge"] = options["c"] or options["charge"] 632 options["pgroups"] = options["G"] or options["pgroups"] 604 633 605 634 if options["help"] :