Changeset 3073
- Timestamp:
- 11/27/06 22:06:14 (18 years ago)
- Location:
- pykota/trunk
- Files:
-
- 33 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkprinters
r3052 r3073 54 54 55 55 -D | --description d Adds a textual description to printers. 56 56 57 -C | --cups Also modifies the DeviceURI in CUPS' printers.conf 58 57 59 -c | --charge p[,j] Sets the price per page and per job to charge. 58 60 Job price is optional. … … 171 173 raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 172 174 175 docups = options["cups"] 176 173 177 if not options["list"] : 174 178 percent = Percent(self) … … 202 206 percent.display("\n%s..." % _("Deletion")) 203 207 self.storage.deleteManyPrinters(printers) 204 percent.display("\n%s...\n" % _("Rerouting printers to CUPS")) 205 for printer in printers : 206 uri = self.getPrinterDeviceURI(printer.Name) 207 if self.isPrinterCaptured(deviceuri=uri) : 208 newuri = uri.replace("cupspykota:", "") 209 if newuri.startswith("//") : 210 newuri = newuri[2:] 211 self.regainPriv() # to avoid having to enter password. 212 os.system('lpadmin -p "%s" -v "%s"' % (printer.Name, newuri)) 213 self.logdebug("Printer %s rerouted to %s" % (printer.Name, newuri)) 214 self.dropPriv() 215 percent.oneMore() 208 if docups : 209 percent.display("\n%s...\n" % _("Rerouting printers to CUPS")) 210 for printer in printers : 211 uri = self.getPrinterDeviceURI(printer.Name) 212 if self.isPrinterCaptured(deviceuri=uri) : 213 newuri = uri.replace("cupspykota:", "") 214 if newuri.startswith("//") : 215 newuri = newuri[2:] 216 self.regainPriv() # to avoid having to enter password. 217 os.system('lpadmin -p "%s" -v "%s"' % (printer.Name, newuri)) 218 self.logdebug("Printer %s rerouted to %s" % (printer.Name, newuri)) 219 self.dropPriv() 220 percent.oneMore() 216 221 percent.display("\n") 217 222 else : … … 268 273 oldprinter = self.storage.addPrinter(printer) 269 274 270 uri = self.getPrinterDeviceURI(printer.Name) 271 if not self.isPrinterCaptured(deviceuri=uri) : 272 newuri = "cupspykota://%s" % uri 273 self.regainPriv() # to avoid having to enter password. 274 os.system('lpadmin -p "%s" -v "%s"' % (printer.Name, newuri)) 275 self.logdebug("Printer %s rerouted to %s" % (printer.Name, newuri)) 276 self.dropPriv() 275 if docups : 276 uri = self.getPrinterDeviceURI(printer.Name) 277 if not self.isPrinterCaptured(deviceuri=uri) : 278 newuri = "cupspykota://%s" % uri 279 self.regainPriv() # to avoid having to enter password. 280 os.system('lpadmin -p "%s" -v "%s"' % (printer.Name, newuri)) 281 self.logdebug("Printer %s rerouted to %s" % (printer.Name, newuri)) 282 self.dropPriv() 277 283 278 284 if oldprinter is not None : … … 315 321 retcode = 0 316 322 try : 317 short_options = "hva c:D:dg:lrsnpm:"318 long_options = ["help", "version", "add", "c harge=", "description=", \323 short_options = "hvaCc:D:dg:lrsnpm:" 324 long_options = ["help", "version", "add", "cups", "charge=", "description=", \ 319 325 "delete", "groups=", "list", "remove", \ 320 326 "skipexisting", "passthrough", "nopassthrough", \ … … 332 338 options["version"] = options["v"] or options["version"] 333 339 options["add"] = options["a"] or options["add"] 340 options["cups"] = options["C"] or options["cups"] 334 341 options["charge"] = options["c"] or options["charge"] 335 342 options["description"] = options["D"] or options["description"] -
pykota/trunk/man/de/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/el_GR/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/es/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/fr/pkprinters.1
r3065 r3073 30 30 .HP 31 31 \fB\-D\fR | \fB\-\-description\fR d Ajoute une description textuelle aux imprimantes. 32 .TP 33 \fB\-C\fR | \fB\-\-cups\fR 34 Modifie �lement la DeviceURI dans le fichier 35 printers.conf de CUPS. 32 36 .TP 33 37 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/it/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/nb_NO/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/pl/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/pt_BR/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/pt/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/sv_SE/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/th/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/tr/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/man/zh_TW/pkprinters.1
r3065 r3073 29 29 .HP 30 30 \fB\-D\fR | \fB\-\-description\fR d Adds a textual description to printers. 31 .TP 32 \fB\-C\fR | \fB\-\-cups\fR 33 Also modifies the DeviceURI in CUPS' printers.conf 31 34 .TP 32 35 \fB\-c\fR | \fB\-\-charge\fR p[,j] -
pykota/trunk/NEWS
r3052 r3073 22 22 PyKota NEWS : 23 23 24 - 1.25alpha17 (2006-11-27) : 25 26 - pkprinters now only modifies CUPS' printers.conf when the 27 -C | --cups command line switch is used. 28 29 - 1.25alpha16 (2006-11-12) : 30 31 - Several fixes to CGI scripts wrt i18n. 32 33 - Introduced the pkrefund command line tool to refund jobs. 34 35 - Several i18n fixes. 36 37 - Several minor fixes to documentation and translations. 38 24 39 - 1.25alpha15 (2006-11-06) : 25 40 -
pykota/trunk/po/de/pykota.po
r3069 r3073 1739 1739 " \n" 1740 1740 " -D | --description d Adds a textual description to printers.\n" 1741 " \n" 1741 "\n" 1742 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1743 "\n" 1742 1744 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1743 1745 " Job price is optional.\n" -
pykota/trunk/po/el_GR/pykota.po
r3069 r3073 1740 1740 " \n" 1741 1741 " -D | --description d Adds a textual description to printers.\n" 1742 " \n" 1742 "\n" 1743 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1744 "\n" 1743 1745 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1744 1746 " Job price is optional.\n" -
pykota/trunk/po/es/pykota.po
r3069 r3073 1756 1756 " \n" 1757 1757 " -D | --description d Adds a textual description to printers.\n" 1758 " \n" 1758 "\n" 1759 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1760 "\n" 1759 1761 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1760 1762 " Job price is optional.\n" -
pykota/trunk/po/fr/pykota.po
r3069 r3073 2810 2810 " \n" 2811 2811 " -D | --description d Adds a textual description to printers.\n" 2812 " \n" 2812 "\n" 2813 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 2814 "\n" 2813 2815 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 2814 2816 " Job price is optional.\n" … … 2905 2907 " \n" 2906 2908 " -D | --description d Ajoute une description textuelle aux imprimantes.\n" 2907 " \n" 2909 "\n" 2910 " -C | --cups Modifie �lement la DeviceURI dans le fichier\n" 2911 " printers.conf de CUPS.\n" 2912 "\n" 2908 2913 " -c | --charge p[,j] Fixes les co�ar page et par travail.\n" 2909 2914 " Le co�r travail d'impression est optionnel.\n" -
pykota/trunk/po/it/pykota.po
r3069 r3073 1742 1742 " \n" 1743 1743 " -D | --description d Adds a textual description to printers.\n" 1744 " \n" 1744 "\n" 1745 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1746 "\n" 1745 1747 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1746 1748 " Job price is optional.\n" -
pykota/trunk/po/nb_NO/pykota.po
r3069 r3073 1749 1749 " \n" 1750 1750 " -D | --description d Adds a textual description to printers.\n" 1751 " \n" 1751 "\n" 1752 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1753 "\n" 1752 1754 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1753 1755 " Job price is optional.\n" -
pykota/trunk/po/pl/pykota.po
r3069 r3073 2252 2252 " \n" 2253 2253 " -D | --description d Adds a textual description to printers.\n" 2254 " \n" 2254 "\n" 2255 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 2256 "\n" 2255 2257 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 2256 2258 " Job price is optional.\n" … … 2350 2352 " \n" 2351 2353 " -D | --description d Dodaje opis tekstowy dla drukarki.\n" 2352 " \n" 2354 "\n" 2355 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 2356 "\n" 2353 2357 " -c | --charge p[,j] Ustala cen�a stron�raz za zadanie drukowania.\n" 2354 2358 " Cena za zadanie drukowania jest argumentem " -
pykota/trunk/po/pt_BR/pykota.po
r3072 r3073 1737 1737 " \n" 1738 1738 " -D | --description d Adds a textual description to printers.\n" 1739 " \n" 1739 "\n" 1740 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1741 "\n" 1740 1742 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1741 1743 " Job price is optional.\n" -
pykota/trunk/po/pt/pykota.po
r3069 r3073 1740 1740 " \n" 1741 1741 " -D | --description d Adds a textual description to printers.\n" 1742 " \n" 1742 "\n" 1743 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1744 "\n" 1743 1745 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1744 1746 " Job price is optional.\n" -
pykota/trunk/po/pykota.pot
r3069 r3073 1719 1719 " \n" 1720 1720 " -D | --description d Adds a textual description to printers.\n" 1721 " \n" 1721 "\n" 1722 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1723 "\n" 1722 1724 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1723 1725 " Job price is optional.\n" -
pykota/trunk/po/sv_SE/pykota.po
r3069 r3073 1755 1755 " \n" 1756 1756 " -D | --description d Adds a textual description to printers.\n" 1757 " \n" 1757 "\n" 1758 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1759 "\n" 1758 1760 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1759 1761 " Job price is optional.\n" -
pykota/trunk/po/th/pykota.po
r3069 r3073 1733 1733 " \n" 1734 1734 " -D | --description d Adds a textual description to printers.\n" 1735 " \n" 1735 "\n" 1736 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1737 "\n" 1736 1738 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1737 1739 " Job price is optional.\n" -
pykota/trunk/po/tr/pykota.po
r3069 r3073 1745 1745 " \n" 1746 1746 " -D | --description d Adds a textual description to printers.\n" 1747 " \n" 1747 "\n" 1748 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1749 "\n" 1748 1750 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1749 1751 " Job price is optional.\n" -
pykota/trunk/po/zh_TW/pykota.po
r3069 r3073 1725 1725 " \n" 1726 1726 " -D | --description d Adds a textual description to printers.\n" 1727 " \n" 1727 "\n" 1728 " -C | --cups Also modifies the DeviceURI in CUPS' printers.conf\n" 1729 "\n" 1728 1730 " -c | --charge p[,j] Sets the price per page and per job to charge.\n" 1729 1731 " Job price is optional.\n" -
pykota/trunk/pykota/version.py
r3053 r3073 22 22 # 23 23 24 __version__ = "1.25alpha1 6_unofficial"24 __version__ = "1.25alpha17_unofficial" 25 25 26 26 __doc__ = "PyKota : a complete Printing Quota Solution for CUPS."