Changeset 1500
- Timestamp:
- 05/25/04 11:49:53 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 1 removed
- 8 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/Makefile.am
r1430 r1500 6 6 mailandpopup.sh \ 7 7 papwaitprinter.sh \ 8 pykota \9 8 waitprinter.sh 10 9 -
pykota/trunk/docs/filterpykota.sgml
r1475 r1500 23 23 A filter is a computer program which takes data in one format as its input, and outputs the 24 24 same data but transformed into another format. <application>CUPS</application> already 25 contains many filters. For example there's one filter named < application>pstops</application> which accepts25 contains many filters. For example there's one filter named <filename>pstops</filename> which accepts 26 26 PostScript data as its input, and, as its name implies, outputs PostScript data too, but after having 27 27 eventually rearranged the pages to fit several pages on a single sheet of paper, or other manipulations … … 30 30 31 31 <para> 32 The < application>pstops</application> filter described above is also in charge of doing basic page32 The <filename>pstops</filename> filter described above is also in charge of doing basic page 33 33 accounting, but <application>PyKota</application> currently doesn't use this facility since it may 34 34 prove to be unreliable depending on the drivers used or if a paper jam occurs for example. … … 42 42 43 43 <para> 44 So to do its own accounting, <application>PyKota</application> has its own filter, named <application>pykota</application>, 45 which you have to plug into the different set of filters used by your printing system of choice. The procedure to 46 install the <application>pykota</application> filter is described in the 44 So to do its own accounting, <application>PyKota</application> has its own filters, for <application>CUPS</application> 45 it's named <filename>cupspykota</filename>, which is in fact a <application>CUPS</application> backends wrapper, 46 and for <application>LPRng</application> it's named ########## TODO ########## . 47 The procedure to plug the correct filter into your printing system is described in the 47 48 <xref linkend="installation" endterm="installation"> chapter. 48 49 </para> 49 50 50 51 <para> 51 Currently with a <application>CUPS</application> backend, the <application>pykota</application> filter is52 deprecated. You have to use the <application>cupspykota</application> CUPS backend instead.53 Th is CUPS backendensures that jobs can't bypass the filtering mechanism, so you can use52 Currently with a <application>CUPS</application> internal accounting mechanism, the <filename>pstops</filename> 53 filter can be bypassed. That's why <application>PyKota</application> uses its own backend. 54 The <filename>cupspykota</filename> backend wrapper ensures that jobs can't bypass the filtering mechanism, so you can use 54 55 any printer with any driver and any command line option, and you can be sure that your 55 56 print job will be correctly accounted for. … … 64 65 65 66 <para> 66 When you submit a print job, <application> cupspykota</application> (with CUPS) or <application>pykota</application> (with LPRng)is automatically launched by your printing system,67 When you submit a print job, <application>PyKota</application>'s accounting mechanism is automatically launched by your printing system, 67 68 so it has to detect which system you are using (<application>CUPS</application> or <application>LPRng</application>) 68 69 and behave like if it was specifically designed for your printing system. Fortunately there's not a lot … … 73 74 <para> 74 75 When using the <literal>hardware</literal> accounting method, 75 <application>pykota</application> asks the printer for its internal page counter, reads from the Quota DataBase the internal 76 page counter for this printer when the previous job was launched, computes the difference, and report it as the 77 previous job's size in the Quota DataBase. It then updates the last user's print quota and account balance, and 78 warn him if he is over quota or if his account balance is below 0. Finally it checks if the user who launched the 79 current job is below or above his print quota, and either allows or denies the job's datas to pass to the underlying 80 layer (the printer itself). The <application>cupspykota</application> CUPS backend on the other hand, 76 the <application>cupspykota</application> CUPS backend 81 77 asks the printer for its internal page counter at the start and at the end of the print job, and 82 computes the values' difference so accounting is done immediately. This way it doesn't let open a window for abuse in the case 83 several printers are managed. That's why the use of <application>cupspykota</application> 84 instead of <application>pykota</application> is recommended with CUPS. 78 computes the values' difference so accounting is done immediately. 85 79 </para> 86 80 … … 91 85 standard input. Your command must print the job's size in number of 92 86 pages on a single line on its standard output. This number is then 93 read by PyKotaand used to update the current user's quota information.87 read by <application>PyKota</application> and used to update the current user's quota information. 94 88 Of course checks are also done like with the <literal>hardware</literal> 95 89 accounting method, to see if the current job is allowed to be printed or not. … … 97 91 98 92 <para> 99 If a problem occurs, it is logged either to the filter's standard outputor to the system logger, depending on93 If a problem occurs, it is logged either to the filter's standard error or to the system logger, depending on 100 94 your preferences in <application>PyKota</application>'s configuration files. Also if a print quota is reached 101 95 you may choose if the administrator, the user, both or no-one will receive an email message explaining 102 the situation and proposing a solution. 96 the situation and proposing a solution. You can even configure another action instead of sending email 97 messages if you want. 103 98 </para> 104 99 … … 108 103 109 104 $Log$ 105 Revision 1.11 2004/05/25 09:49:52 jalet 106 The old pykota filter has been removed. LPRng support disabled for now. 107 110 108 Revision 1.10 2004/05/13 13:59:28 jalet 111 109 Code simplifications -
pykota/trunk/docs/installation.sgml
r1347 r1500 646 646 <title>With LPRng</title> 647 647 <para> 648 To plug PyKota into your <application>LPRng</application> setup, 649 you have to modify the <filename>/etc/printcap</filename>. 650 You just have to add the following lines to each queue on 651 which you want to use PyKota : 652 <screen> 653 :achk=true 654 :as=|/usr/share/pykota/pykota 655 </screen> 648 ######### TODO ########## 656 649 </para> 657 650 … … 696 689 697 690 $Log$ 691 Revision 1.25 2004/05/25 09:49:53 jalet 692 The old pykota filter has been removed. LPRng support disabled for now. 693 698 694 Revision 1.24 2004/02/13 08:46:32 jalet 699 695 Fixed documentation wrt installation paths changed -
pykota/trunk/FAQ
r1441 r1500 63 63 * How can I use my 'dumb printer' with CUPS and PyKota. 64 64 65 The solution is to plug the pykota filter into the 66 filtering chain when the print job is still in 67 PostScript format, before being converted to the 68 dumb printer's native format. You can't use the 69 cupspykota CUPS backend with 'dumb printers'. 65 You have to use a software accounter directive, and 66 create a script which understands your printer's 67 Page Description Language. 70 68 71 Here's how to do : 72 73 - Disable raw mode by modifying *.convs and 74 *.types files in /etc/cups, then restart 75 CUPS. 76 77 - If you print from Windows through Samba, 78 don't put '-o raw' in the print command 79 definition in smb.conf 80 81 - Under Windows, use a PostScript driver 82 set to maximum compatibility mode. 83 84 - Modify *.convs and *.types files to 85 insert the pykota filter into the 86 filtering chain, as described 87 here (url should be on a single line) : 88 89 http://cgi.librelogiciel.com/pipermail/ ... 90 ... pykota/attachments/20030721/753239b5/attachment.eml 91 92 and restart CUPS. 69 PyKota natively understands PostScript and PCL5, 70 but PCL6 support is in the works, and more PDLs 71 will be added in the future. However you can always 72 plug your own PDL analyzer in PyKota. 93 73 94 74 * I've got a great number of users. How can I automatically … … 119 99 With these two files the problem can usually be diagnosed within 120 100 minutes. Send them to the mailing list and wait for an answer. 121 122 * Some, not all, print jobs are never accounted for, why ?123 124 From version 1.16alpha7, you can now use the cupspykota125 CUPS backend, which ensures that all print jobs will be126 accounted for. The use of the old pykota filter is deprecated127 with CUPS. It remains the filter of choice for LPRng though,128 or when you absolutely need to support a 'dumb printer' (see129 definition above).130 131 * When printing from Windows, the jobs are never accounted for,132 but from *nix they are. Could you explain the reason for this ?133 134 First refer to the point above. If this doesn't solve your135 problem, try to set your print driver to PostScript mode136 and check the "maximum compatibility" box in its configuration,137 instead of "maximum speed". Often HP printers come with both138 a PCL and a PostScript driver under Windows. Don't install the139 PCL one.140 101 141 102 * How can I share print quota between some printers only (not all) ? … … 188 149 189 150 For current printer and all the printers groups it is 190 a member of, if any .151 a member of, if any, recursively. 191 152 This may be difficult to grasp, but offers unprecedented 192 153 flexibility. -
pykota/trunk/NEWS
r1499 r1500 22 22 PyKota NEWS : 23 23 24 25 - 1.19alpha15 : 26 27 - The old pykota filter is now removed. This means that 28 currently PyKota doesn't support LPRng anymore, but 29 LPRng support will be re-added, improved, in the near future. 30 24 31 - 1.19alpha14 : 25 32 -
pykota/trunk/pykota/version.py
r1495 r1500 22 22 # 23 23 24 __version__ = "1.19alpha1 4_unofficial"24 __version__ = "1.19alpha15_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" -
pykota/trunk/README
r1491 r1500 319 319 $ /etc/init.d/cupsys restart 320 320 321 For dumb printers :322 323 The FAQ contains both the PyKota's definition of a 'dumb'324 printer, and how to deal with them.325 326 321 For new printers : 327 322 … … 384 379 - LPRng Printing System : 385 380 386 Modify the /etc/printcap file to add two lines identical to these ones : 387 388 :achk=true 389 :as=|/usr/share/pykota/pykota 390 391 For each printer on which you want to use print accounting. 392 393 And then save the file and restart LPRng : 394 395 $ /etc/init.d/lprng restart 396 381 For now LPRng support in PyKota is deactivated. Please be patient. 382 397 383 Now you can begin to populate the PyKota's database with printers, 398 384 users and groups : -
pykota/trunk/setup.py
r1483 r1500 24 24 # 25 25 # $Log$ 26 # Revision 1.43 2004/05/25 09:49:41 jalet 27 # The old pykota filter has been removed. LPRng support disabled for now. 28 # 26 29 # Revision 1.42 2004/05/18 14:48:46 jalet 27 30 # Big code changes to completely remove the need for "requester" directives, … … 438 441 439 442 directory = os.sep.join(["share", "pykota"]) 440 data_files.append((directory, ["bin/cupspykota", "bin/ pykota", "bin/waitprinter.sh", "bin/papwaitprinter.sh", "bin/mailandpopup.sh", "contributed/pagecount.pl", "untested/pjl/pagecount.pjl", "untested/pjl/status.pjl", "untested/netatalk/netatalk.sh", "untested/netatalk/pagecount.ps"]))443 data_files.append((directory, ["bin/cupspykota", "bin/waitprinter.sh", "bin/papwaitprinter.sh", "bin/mailandpopup.sh", "contributed/pagecount.pl", "untested/pjl/pagecount.pjl", "untested/pjl/status.pjl", "untested/netatalk/netatalk.sh", "untested/netatalk/pagecount.ps"])) 441 444 442 445 setup(name = "pykota", version = __version__,