[cups.development] Script for accounting

Jerome Alet alet at librelogiciel.com
Tue Apr 5 07:16:31 PDT 2005

On Tue, Apr 05, 2005 at 09:18:15AM -0400, apkwa wrote:
> I'm new in CUPS (I am using LPRng). The reason why I don't use Cups yet, is only because of user quota.
> I don't want to use Pykota, it needs too much dependencies.
> So I'm going to write my own script for user accounting but I don't know if it's possible with Cups.
> I mean, LPRng can use ifhp filter which allows to provide our own script. This script is launched with filestart or fileend and other arguments.
> Is it possible to make such a script works with Cups?

Not sure if ifhp could be used directly, however you could use accsnmp which should
work with most network printers.

You'll find a link to accsnmp on CUPS' website. It depends on Perl.

As an alternative you could use a framework like Tea4CUPS with has no dependency
beside Python. Tea4CUPS allows you to launch an unlimited number of scripts or
commands (your own or third parties' ones), before, after or during the job's datas
are sent to the real printer. Tea4CUPS now provides a way for your own scripts to 
cancel the print job at will, making the implementation of your own print quota
solution as easy as you want it :-)

Tea4CUPS : http://www.librelogiciel.com/software/

NB : Tea4CUPS is only made of a standalone and self contained Python script, and
a configuration file.


Jerome Alet

More information about the cups mailing list