Changeset 1500

Show
Ignore:
Timestamp:
05/25/04 11:49:53 (21 years ago)
Author:
jalet
Message:

The old pykota filter has been removed. LPRng support disabled for now.

Location:
pykota/trunk
Files:
1 removed
8 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/Makefile.am

    r1430 r1500  
    66        mailandpopup.sh         \ 
    77        papwaitprinter.sh       \ 
    8         pykota                          \ 
    98        waitprinter.sh 
    109 
  • pykota/trunk/docs/filterpykota.sgml

    r1475 r1500  
    2323    A filter is a computer program which takes data in one format as its input, and outputs the 
    2424    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 accepts  
     25    contains many filters. For example there's one filter named <filename>pstops</filename> which accepts  
    2626    PostScript data as its input, and, as its name implies, outputs PostScript data too, but after having 
    2727    eventually rearranged the pages to fit several pages on a single sheet of paper, or other manipulations 
     
    3030   
    3131  <para> 
    32     The <application>pstops</application> filter described above is also in charge of doing basic page 
     32    The <filename>pstops</filename> filter described above is also in charge of doing basic page 
    3333    accounting, but <application>PyKota</application> currently doesn't use this facility since it may 
    3434    prove to be unreliable depending on the drivers used or if a paper jam occurs for example. 
     
    4242   
    4343  <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  
    4748    <xref linkend="installation" endterm="installation"> chapter. 
    4849  </para> 
    4950   
    5051  <para> 
    51     Currently with a <application>CUPS</application> backend, the <application>pykota</application> filter is  
    52     deprecated. You have to use the <application>cupspykota</application> CUPS backend instead. 
    53     This CUPS backend ensures that jobs can't bypass the filtering mechanism, so you can use 
     52    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 
    5455    any printer with any driver and any command line option, and you can be sure that your 
    5556    print job will be correctly accounted for. 
     
    6465   
    6566  <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, 
    6768    so it has to detect which system you are using (<application>CUPS</application> or <application>LPRng</application>) 
    6869    and behave like if it was specifically designed for your printing system. Fortunately there's not a lot 
     
    7374  <para> 
    7475    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  
    8177    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.  
    8579  </para> 
    8680   
     
    9185    standard input. Your command must print the job's size in number of 
    9286    pages on a single line on its standard output. This number is then 
    93     read by PyKota and 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. 
    9488    Of course checks are also done like with the <literal>hardware</literal> 
    9589    accounting method, to see if the current job is allowed to be printed or not. 
     
    9791   
    9892  <para> 
    99     If a problem occurs, it is logged either to the filter's standard output or to the system logger, depending on 
     93    If a problem occurs, it is logged either to the filter's standard error or to the system logger, depending on 
    10094    your preferences in <application>PyKota</application>'s configuration files. Also if a print quota is reached 
    10195    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. 
    10398  </para> 
    10499   
     
    108103 
    109104$Log$ 
     105Revision 1.11  2004/05/25 09:49:52  jalet 
     106The old pykota filter has been removed. LPRng support disabled for now. 
     107 
    110108Revision 1.10  2004/05/13 13:59:28  jalet 
    111109Code simplifications 
  • pykota/trunk/docs/installation.sgml

    r1347 r1500  
    646646      <title>With LPRng</title> 
    647647      <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 ########## 
    656649      </para> 
    657650       
     
    696689 
    697690$Log$ 
     691Revision 1.25  2004/05/25 09:49:53  jalet 
     692The old pykota filter has been removed. LPRng support disabled for now. 
     693 
    698694Revision 1.24  2004/02/13 08:46:32  jalet 
    699695Fixed documentation wrt installation paths changed 
  • pykota/trunk/FAQ

    r1441 r1500  
    6363  * How can I use my 'dumb printer' with CUPS and PyKota.   
    6464   
    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. 
    7068     
    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. 
    9373           
    9474  * I've got a great number of users. How can I automatically 
     
    11999    With these two files the problem can usually be diagnosed within 
    120100    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 cupspykota 
    125     CUPS backend, which ensures that all print jobs will be 
    126     accounted for. The use of the old pykota filter is deprecated 
    127     with CUPS. It remains the filter of choice for LPRng though, 
    128     or when you absolutely need to support a 'dumb printer' (see 
    129     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 your 
    135     problem, try to set your print driver to PostScript mode 
    136     and check the "maximum compatibility" box in its configuration, 
    137     instead of "maximum speed". Often HP printers come with both 
    138     a PCL and a PostScript driver under Windows. Don't install the  
    139     PCL one. 
    140101     
    141102  * How can I share print quota between some printers only (not all) ?    
     
    188149       
    189150    For current printer and all the printers groups it is  
    190     a member of, if any. 
     151    a member of, if any, recursively. 
    191152    This may be difficult to grasp, but offers unprecedented 
    192153    flexibility. 
  • pykota/trunk/NEWS

    r1499 r1500  
    2222PyKota NEWS : 
    2323 
     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           
    2431    - 1.19alpha14 : 
    2532     
  • pykota/trunk/pykota/version.py

    r1495 r1500  
    2222# 
    2323 
    24 __version__ = "1.19alpha14_unofficial" 
     24__version__ = "1.19alpha15_unofficial" 
    2525 
    2626__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" 
  • pykota/trunk/README

    r1491 r1500  
    319319          $ /etc/init.d/cupsys restart 
    320320           
    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      
    326321    For new printers : 
    327322     
     
    384379  - LPRng Printing System : 
    385380   
    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       
    397383Now you can begin to populate the PyKota's database with printers, 
    398384users and groups : 
  • pykota/trunk/setup.py

    r1483 r1500  
    2424# 
    2525# $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# 
    2629# Revision 1.42  2004/05/18 14:48:46  jalet 
    2730# Big code changes to completely remove the need for "requester" directives, 
     
    438441 
    439442directory = 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"])) 
     443data_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"])) 
    441444 
    442445setup(name = "pykota", version = __version__,