Changeset 1578

Show
Ignore:
Timestamp:
06/29/04 09:53:11 (20 years ago)
Author:
jalet
Message:

Improved pkhint

Location:
pykota/trunk
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pkhint

    r1546 r1578  
    2424# 
    2525# $Log$ 
     26# Revision 1.12  2004/06/29 07:53:11  jalet 
     27# Improved pkhint 
     28# 
    2629# Revision 1.11  2004/06/18 13:34:48  jalet 
    2730# Now all tracebacks include PyKota's version number 
     
    122125                '/bin/nc -w 2 %(printer)s %(port)s </usr/share/pykota/pagecount.pjl 2>/dev/null | /usr/bin/tail -2', \ 
    123126              ] 
    124  
     127               
    125128class PKHint(PyKotaTool) : 
    126129    """A class to autodetect the best accounting method for printers.""" 
     
    236239                            accounter = 'hardware(' + netpjlcommand + ')' 
    237240                            configuration.append((printer, accounter)) 
    238                 elif devicetype == "direct" :  
    239                     sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 
    240                 elif devicetype == "serial" :  
    241                     sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 
     241                        else :     
     242                            configuration.append((printer, "software(/usr/bin/pkpgcounter)")) 
     243                # elif devicetype == "direct" :  
     244                #    sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 
     245                #elif devicetype == "serial" :  
     246                #    sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 
     247                #else : 
     248                #    sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 
    242249                else : 
    243                     sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) 
     250                    configuration.append((printer, "software(/usr/bin/pkpgcounter)")) 
    244251                     
    245252        if not configuration :             
     
    247254        else : 
    248255            print "\nPut the following lines into your /etc/pykota/pykota.conf file :\n" 
     256            print "# BEWARE : if software accounting is suggested, this doesn't mean" 
     257            print "# that hardware accounting wouldn't work, this only means that PyKota" 
     258            print "# wasn't able to autodetect which hardware accounting method to use." 
    249259            for (printer, accounter) in configuration : 
    250260                print "[%s]" % printer 
     
    254264if __name__ == "__main__" :  
    255265    sys.stderr.write("BEWARE : This tool doesn't support LPRng's printcap files yet.\n") 
    256     sys.stderr.write("This tool is currently highly experimental, so don't rely on it.\n") 
    257266    retcode = 0 
    258267    try : 
  • pykota/trunk/FAQ

    r1538 r1578  
    5959   
    6060    In PyKota, the term 'dumb printer' defines a printer which doesn't  
    61     understand PostScript or PCL5 AND doesn't have an internal page  
    62     counter, AND for which you don't know how to compute a job's size  
    63     in number of pages by analyzing its content. Any printer which  
    64     is not a 'dumb printer' according to the above definition is  
    65     supported by PyKota. 
     61    understand PostScript, PCL5, PCLXL (aka PCL6) or PDF AND doesn't  
     62    have an internal page counter, AND for which you don't know how to  
     63    compute a job's size in number of pages by analyzing its content.  
     64    Any printer which is not a 'dumb printer' according to the above  
     65    definition is supported by PyKota. 
    6666 
    6767  * How can I make PyKota work with my non-postscript printer under  
     
    7878    Page Description Language. 
    7979     
    80     PyKota natively understands PostScript and PCL5, 
    81     but PCL6 support is in the works, and more PDLs 
    82     will be added in the future. However you can always 
    83     plug your own PDL analyzer in PyKota. 
     80    PyKota natively understands PostScript, PCL5, PCLXL (aka PCL6) 
     81    and PDF. More PDLs will be added in the future. However you can  
     82    always plug your own PDL analyzer in PyKota. 
    8483           
    8584  * I've got a great number of users. How can I automatically 
  • pykota/trunk/man/edpykota.1

    r1540 r1578  
    22.TH EDPYKOTA "1" "June 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 edpykota \- manual page for edpykota 1.19alpha20_unofficial 
     4edpykota \- manual page for edpykota 1.19alpha28_unofficial 
    55.SH DESCRIPTION 
    6 edpykota v1.19alpha20_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6edpykota v1.19alpha28_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77A Print Quota editor for PyKota. 
    88.PP 
  • pykota/trunk/man/pkhint.1

    r1540 r1578  
    22.TH PKHINT "1" "June 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 pkhint \- manual page for pkhint 1.19alpha20_unofficial 
     4pkhint \- manual page for pkhint 1.19alpha28_unofficial 
    55.SH DESCRIPTION 
    6 pkhint v1.19alpha20_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6pkhint v1.19alpha28_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77A tool to give hints on what accounting method is best for each printer. 
    88.PP 
  • pykota/trunk/man/pkprinters.1

    r1540 r1578  
    22.TH PKPRINTERS "1" "June 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 pkprinters \- manual page for pkprinters 1.19alpha20_official 
     4pkprinters \- manual page for pkprinters 1.19alpha28_unofficial 
    55.SH DESCRIPTION 
    6 pkprinters v1.19alpha20_official (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6pkprinters v1.19alpha28_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77A Printers Manager for PyKota. 
    88.PP 
  • pykota/trunk/man/pykotme.1

    r1540 r1578  
    22.TH PYKOTME "1" "June 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 pykotme \- manual page for pykotme 1.19alpha20_unofficial 
     4pykotme \- manual page for pykotme 1.19alpha28_unofficial 
    55.SH DESCRIPTION 
    6 pykotme v1.19alpha20_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6pykotme v1.19alpha28_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77.PP 
    88Gives print quotes to users. 
  • pykota/trunk/man/repykota.1

    r1540 r1578  
    22.TH REPYKOTA "1" "June 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 repykota \- manual page for repykota 1.19alpha20_unofficial 
     4repykota \- manual page for repykota 1.19alpha28_unofficial 
    55.SH DESCRIPTION 
    6 repykota v1.19alpha20_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6repykota v1.19alpha28_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77.PP 
    88Generates print quota reports. 
  • pykota/trunk/man/warnpykota.1

    r1540 r1578  
    22.TH WARNPYKOTA "1" "June 2004" "C@LL - Conseil Internet & Logiciels Libres" "User Commands" 
    33.SH NAME 
    4 warnpykota \- manual page for warnpykota 1.19alpha20_unofficial 
     4warnpykota \- manual page for warnpykota 1.19alpha28_unofficial 
    55.SH DESCRIPTION 
    6 warnpykota v1.19alpha20_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     6warnpykota v1.19alpha28_unofficial (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
    77.PP 
    88Sends mail to users over print quota. 
  • pykota/trunk/NEWS

    r1575 r1578  
    2424    - 1.19alpha28 : 
    2525     
     26        - Improved pkhint 
     27         
    2628        - First working PCL6 (aka PCLXL) parser ! 
    2729          Doesn't handle copies yet. 
  • pykota/trunk/README

    r1575 r1578  
    7171          This is completely configurable. 
    7272           
    73         - Supports DSC compliant PostScript, PDF, PCL5 and  
     73        - Supports DSC compliant PostScript, PDF, PCL5, and 
    7474          PCLXL (aka PCL6) printers natively for software  
    7575          accounting methods. More formats to come. 
     
    239239  on Psyco's website. 
    240240   
    241   Installing Psyco is not mandatory, but it woud speedup PCL5 parsing 
     241  Installing Psyco is not mandatory, but it will speedup PCL5 parsing 
    242242  by almost 3 times. PostScript and PDF parsing can also benefit, 
    243243  but in an almost unnoticeable manner since this part of the code 
     
    245245  and if you install Psyco you will never regret it ! 
    246246  Same remark applies for PCL6 (aka PCLXL) but performance improvement 
    247   is yet to be tested (it is high anyway). 
     247  is yet to be fully tested (it is very high anyway). 
    248248   
    249249  You may also benefit from having the following tools installed to